Communication control method and apparatus, host device, slave device, and photovoltaic system
By automatically switching between the host device and the slave device's communication frequency band in the photovoltaic system, the problems of PLC communication signal attenuation and high packet loss rate are solved, and the stability of communication quality is improved.
Patent Information
- Application Number
- PCT/CN2024/073411
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-29
- Filing Date
- 2024-01-22
- Publication Date
- 2025-06-05
AI Technical Summary
PLC communication signals are susceptible to noise and material of power cables in power cables, resulting in unstable communication quality and high packet loss rate. Especially when the equipment is far away, the signal attenuation is serious.
The communication packet loss rate of the slave device is monitored through the host device. If the preset threshold is exceeded, the host device switches the communication frequency band of the slave device to the low frequency band to reduce the packet loss rate and improve the communication quality.
This method effectively reduces the packet loss rate of PLC communication, improves the stability of communication quality, reduces the impact of crosstalk, and does not require manual rectification of cables or machine locations.
Smart Images

Figure CN2024073411_05062025_PF_FP_ABST
Abstract
Description
Communication control method, device, host device, slave device and photovoltaic system
[0001] This application claims priority to a domestic application filed with the Patent Office of China on November 29, 2023, with application number CN202311648420.6 and invention name “Communication control method, device, host device, slave device and photovoltaic system”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present invention relates to the field of electric power technology, and in particular to a communication control method, device, host device, slave device and photovoltaic system. Background Art
[0003] Power line communication (PLC) uses power cables as the communication medium. Power cables contain noise, which can cause signal loss. The type and material of the cables also affect the signal quality. If the devices at the two ends of the communication are far apart and the power cables are long, the PLC signal attenuation can be significant, leading to high packet loss and unstable communication quality.
[0004] Summary of the Invention
[0005] In view of this, an object of the present invention is to provide a communication control method, apparatus, host device, slave device and photovoltaic system to reduce the packet loss rate of communication and improve the stability of communication quality.
[0006] In a first aspect, an embodiment of the present invention provides a communication control method, which is applied to a photovoltaic system; in the photovoltaic system, a host device and a slave device are connected via a power cable; the method includes: the host device uses a first frequency band to communicate with the slave device, and counts the communication packet loss rate of the slave device within a specified historical time period; if the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the slave device to be switched to a second frequency band; wherein the frequency band value of the second frequency band is lower than the frequency band value of the first frequency band.
[0007] The above-mentioned slave devices include multiple ones; if the communication packet loss rate of the slave device is greater than the preset packet loss rate threshold, the host device controls the step of switching the communication frequency band of the first device to the second frequency band, including: if the communication packet loss rate of the first device among the slave devices is greater than the preset packet loss rate threshold, the host device controls the communication frequency band of the first device to be switched to the second frequency band, and the communication frequency band of the slave devices other than the first device remains at the first frequency band.
[0008] If the communication packet loss rate of the first device among the slave devices is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the first device to be switched to the second frequency band, and the communication frequency band of the slave devices other than the first device remains at the first frequency band. The above method also includes: the host device uses the second frequency band to communicate with the first device, and uses the first frequency band to communicate with the slave devices other than the first device.
[0009] The above-mentioned step of the host device using the first frequency band to communicate with the slave device includes: the host device uses the first frequency band to send a communication message to the slave device and starts timing; within a preset timing period, the host device waits to receive a reply message from the slave device to the communication message.
[0010] The above-mentioned step of counting the communication packet loss rate of the slave device within the specified historical time period includes: the host device obtains the communication message volume of the communication messages sent to the slave device within the specified historical time period, and the reply message volume of the reply messages received in response to the communication messages; based on the ratio of the reply message volume to the communication message volume, the communication packet loss rate of the slave device is determined.
[0011] The above-mentioned host device controls the step of switching the communication frequency band of the first device to the second frequency band, including: the host device sends a frequency band setting instruction to the first device; the first device receives the frequency band setting instruction and switches the communication frequency band of the first device to the second frequency band; the host device saves the correspondence between the device address associated with the first device and the second frequency band.
[0012] Before the step of the host device sending a frequency band setting instruction to the first device, the method further includes: the host device generating a correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the initial state, the communication frequency bands in the correspondence are all the first frequency band; the step of the host device saving the correspondence between the device address associated with the first device and the second frequency band includes: the host device updates the communication frequency band corresponding to the device address associated with the first device to the second frequency band in the correspondence.
[0013] The above-mentioned steps of using the second frequency band to communicate with the first device, and the host device using the first frequency band to communicate with slave devices other than the first device, include: the host device obtains the message to be sent, and extracts the target device address from the message to be sent; determines the target communication frequency band corresponding to the target device address from the correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the correspondence, the device address associated with the first device corresponds to the second frequency band, and the device address associated with the slave devices other than the first device corresponds to the first frequency band; if the target communication frequency band is the first frequency band, the host device uses the first frequency band to send the message to be sent to the slave device associated with the target device address; if the target communication frequency band is the second frequency band, the host device uses the second frequency band to send the message to be sent to the first device associated with the target device address.
[0014] The above-mentioned step of the host device using the first frequency band to send the message to be sent to the slave device associated with the target device address if the target communication frequency band is the first frequency band includes: if the target communication frequency band is the first frequency band, the host device obtains the communication frequency band of the host device; if the communication frequency band is the second frequency band, the host device switches the communication frequency band to the first frequency band, and uses the first frequency band to send the message to be sent to the slave device associated with the target device address.
[0015] The above-mentioned step of using the second frequency band to send the message to be sent to the first device associated with the target device address if the target communication frequency band is the second frequency band includes: if the target communication frequency band is the second frequency band, the host device obtains the communication frequency band of the host device; if the communication frequency band is the first frequency band, the host device switches the communication frequency band to the second frequency band, and uses the second frequency band to send the message to be sent to the first device associated with the target device address.
[0016] The above-mentioned host device is also communicatively connected to the host computer; the above-mentioned method also includes: the host device receives a relationship setting instruction issued by the host computer, obtains the device to be set and the frequency band to be set from the relationship setting instruction; in the corresponding relationship, updates the communication frequency band corresponding to the device address associated with the device to be set to the frequency band to be set.
[0017] The above-mentioned host device is also communicatively connected to the data collector in the photovoltaic system; the above-mentioned method also includes: the host device obtains the broadcast message sent by the data collector and broadcasts the broadcast message using the first frequency band; the slave device using the first frequency band receives the broadcast message; the host device switches the communication frequency band from the first frequency band to the second frequency band, and broadcasts the broadcast message using the second frequency band; and the slave device using the second frequency band receives the broadcast message.
[0018] In a second aspect, an embodiment of the present invention provides a communication control device, which is arranged in a photovoltaic system; in the photovoltaic system, a host device and a slave device are connected via a power cable; the device includes: a first communication module, for the host device to communicate with the slave device using a first frequency band, and to count the communication packet loss rate of the slave device within a specified historical time period; a first control module, for if the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the slave device to be switched to a second frequency band; wherein the frequency band value of the second frequency band is lower than the frequency band value of the first frequency band.
[0019] In a third aspect, an embodiment of the present invention provides a host device, the host device includes a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement any communication control method of the first aspect.
[0020] In a fourth aspect, an embodiment of the present invention provides a slave device, comprising a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor; the slave device is connected to the host device of the third aspect via a power cable.
[0021] In a fifth aspect, an embodiment of the present invention provides a photovoltaic system, which includes a host device of the third aspect and a slave device of the fourth aspect; the host device uses a first frequency band to communicate with the slave device, and counts the communication packet loss rate of the slave device within a specified historical time period; if the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the slave device to be switched to a second frequency band; wherein the frequency band value of the second frequency band is lower than the frequency band value of the first frequency band.
[0022] The above-mentioned host device is connected to the data collector; the slave device is connected to the inverter.
[0023] The above-mentioned slave devices include multiple ones; if the communication packet loss rate of the first device among the slave devices is greater than the preset packet loss rate threshold, the host device controls the communication frequency band of the first device to be switched to the second frequency band, and the communication frequency band of the slave devices other than the first device remains at the first frequency band.
[0024] The host device uses the second frequency band to communicate with the first device, and uses the first frequency band to communicate with slave devices other than the first device.
[0025] The host device sends a communication message to the slave device using the first frequency band and starts timing; within a preset timing period, the host device waits to receive a reply message from the slave device for the communication message.
[0026] The master device obtains the communication message volume of the communication messages sent to the slave device and the reply message volume of the reply messages received in response to the communication messages within a specified historical time period; and determines the communication packet loss rate of the slave device based on the ratio of the reply message volume to the communication message volume.
[0027] The host device sends a frequency band setting instruction to the first device; the first device receives the frequency band setting instruction and switches the communication frequency band of the first device to the second frequency band; the host device saves the corresponding relationship between the device address associated with the first device and the second frequency band.
[0028] The above-mentioned host device generates a correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the initial state, the communication frequency bands in the correspondence are all the first frequency band; after the host device sends a frequency band setting instruction to the first device, the host device updates the communication frequency band corresponding to the device address associated with the first device to the second frequency band in the correspondence.
[0029] The above-mentioned host device obtains the message to be sent and extracts the target device address from the message to be sent; determines the target communication frequency band corresponding to the target device address from the correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the correspondence, the device address associated with the first device corresponds to the second frequency band, and the device addresses associated with the slave devices other than the first device correspond to the first frequency band; if the target communication frequency band is the first frequency band, the host device uses the first frequency band to send the message to be sent to the slave device associated with the target device address; if the target communication frequency band is the second frequency band, the host device uses the second frequency band to send the message to be sent to the first device associated with the target device address.
[0030] If the target communication frequency band is the first frequency band, the host device obtains the communication frequency band of the host device; if the communication frequency band is the second frequency band, the host device switches the communication frequency band to the first frequency band and uses the first frequency band to send the message to be sent to the slave device associated with the target device address.
[0031] If the target communication frequency band is the second frequency band, the host device obtains the communication frequency band of the host device; if the communication frequency band is the first frequency band, the host device switches the communication frequency band to the second frequency band, and uses the second frequency band to send the message to be sent to the first device associated with the target device address.
[0032] The host device is also connected to the host computer for communication; the host device receives the relationship setting instruction issued by the host computer, obtains the device to be set and the frequency band to be set from the relationship setting instruction; in the corresponding relationship, updates the communication frequency band corresponding to the device address associated with the device to be set to the frequency band to be set.
[0033] The above-mentioned host device is also communicatively connected to the data collector in the photovoltaic system; the host device obtains the broadcast message sent by the data collector and broadcasts the broadcast message using the first frequency band; the slave device using the first frequency band receives the broadcast message; the host device switches the communication frequency band from the first frequency band to the second frequency band, and broadcasts the broadcast message using the second frequency band; the slave device using the second frequency band receives the broadcast message.
[0034] The embodiments of the present invention bring the following beneficial effects:
[0035] The above-mentioned communication control method, device, host device, slave device and photovoltaic system, wherein the method is applied to a photovoltaic system; in the photovoltaic system, the host device and the slave device are connected via a power cable; the method comprises: the host device uses a first frequency band to communicate with the slave device, and counts the communication packet loss rate of the slave device within a specified historical time period; if the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the slave device to be switched to a second frequency band; wherein the frequency band value of the second frequency band is lower than the frequency band value of the first frequency band.
[0036] In this mode, when the host device communicates with the slave device, if the communication packet loss rate of the slave device is high, the communication frequency band of the slave device is automatically switched to a low-frequency band. The host device uses the low-frequency band to communicate with the slave device, thereby reducing the communication packet loss rate and improving the stability of the communication quality.
[0037] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0038] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0040] FIG1 is a schematic diagram of a type of power cable provided by an embodiment of the present invention;
[0041] FIG2 is a schematic diagram of an intra-array communication network provided by an embodiment of the present invention;
[0042] FIG3 is a flow chart of a communication control method provided by an embodiment of the present invention;
[0043] FIG4 is a schematic diagram of a connection method between a host device and a slave device provided by an embodiment of the present invention;
[0044] FIG5 is a schematic diagram of a correspondence between a device address and a communication frequency band provided by an embodiment of the present invention;
[0045] FIG6 is a flow chart of establishing a corresponding relationship based on packet loss rate feedback according to an embodiment of the present invention;
[0046] 7 is a flow chart of a host device sending a communication message according to an embodiment of the present invention;
[0047] FIG8 is a schematic structural diagram of a communication control device provided by an embodiment of the present invention;
[0048] FIG9 is a schematic diagram of a host device provided by an embodiment of the present invention;
[0049] FIG10 is a schematic structural diagram of a photovoltaic system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0051] Among related technologies, PLC (Power Line Communication) has gradually replaced traditional RS485 communication methods for inverters, becoming the mainstream communication method for photovoltaic inverters within power plants, as it eliminates the cost and labor associated with laying communication cables. PLC networks offer a variety of frequency bands, primarily categorized into two types: high frequency (e.g., 2-6 MHz) and low frequency (e.g., 0.3-2 MHz).
[0052] PLC brings convenience to communication, but it also brings instability to communication.
[0053] On the one hand, since the communication medium uses the inverter's power cable, which is filled with grid and inverter noise, the type and material of the power cable also pose significant challenges. Power cables are generally classified into single-core copper, single-core aluminum, multi-core copper, and multi-core aluminum. As shown in Figure 1, multi-core cables are bundled together, minimizing PLC signal loss. However, since single-core cables have three separate wires (A, B, C, and D), improper bundling can result in significant PLC signal loss at some inverter nodes.
[0054] On the other hand, due to the construction location of some power stations, the inverters are too far away, which ultimately leads to significant PLC signal attenuation, unstable PLC communication, and high packet loss rate.
[0055] In particular, during mountainous power station construction, due to the terrain's steep slopes and construction difficulties, individual inverters within the same array are often located at the foot of the mountain or on the other side of the slope, exceeding the recommended distances specified in construction specifications. In such cases, the frequency band used by the array may experience high packet loss rates or inverters may go offline, creating information islands. As shown in Figure 2, the communication network within an array consists of a data logger and multiple inverters. The PLC master device is built into the logger, and the PLC slave devices are built into the inverters. Inverter INV2 is located too far from the logger, resulting in excessive PLC attenuation.
[0056] To solve the above two problems of large signal attenuation, the PLC frequency band in the network is usually reduced to a low frequency to obtain a greater transmission signal strength, but this will also cause crosstalk problems.
[0057] Based on the above problems, this embodiment provides a communication control method, apparatus, host device, slave device and photovoltaic system, which can be applied to power line carrier communication.
[0058] Figure 3 is a flow chart of a communication control method according to an embodiment of the present invention. The present invention discloses a communication control method applicable to a host device in power line carrier communication, wherein the host device and slave devices are connected via a power cable. The host device may be one or more, and the slave devices may also be one or more.
[0059] In one example, the host device and the slave device shown in FIG4 are connected to each other via a three-phase power line. The method includes:
[0060] S301, the master device communicates with the slave device using a first frequency band, and calculates the communication packet loss rate of the slave device within a specified historical time period;
[0061] The first frequency band is typically set to a high frequency band. The specified historical time period is the period after the power supply is powered on; power-on refers to the process of turning on the power supply and energizing the device. The communication packet loss rate can be calculated as the ratio of lost data packets to the total number of transmitted data packets. Under normal circumstances, the communication packet loss rate should be kept within a certain range.
[0062] For example, the master device communicates with the slave device using a first frequency band. After the power device is powered on, the communication packet loss rate of the slave device is counted every 30 minutes. When the statistical time point is reached, the communication packet loss rate of each slave device in the past 30 minutes from the statistical time point is counted.
[0063] S302: If the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold, the master device controls the communication frequency band of the slave device to be switched to a second frequency band; wherein the frequency band value of the second frequency band is lower than the frequency band value of the first frequency band;
[0064] Each inverter device corresponds to a slave device. The above-mentioned preset packet loss rate threshold is a preset percentage. The above-mentioned second frequency band is usually set to a low frequency band.
[0065] That is, if the communication packet loss rate of the slave device is greater than the preset packet loss rate threshold, the slave device is controlled to switch the communication frequency band, and the communication frequency band of the slave device is switched from the first frequency band to the second frequency band whose frequency band value is lower than the first frequency band.
[0066] In actual implementation, when the communication packet loss rate of the slave device is higher than the standard value of 5%, it is generally considered that the communication signal attenuation is large and the packet loss is serious; at this time, if the communication frequency band of the slave device is a high frequency band, the slave device is controlled to switch the high frequency band to a low frequency band.
[0067] The above-mentioned communication control method is applied to a photovoltaic system, where the host device and the slave device are connected via a power cable, including: the host device uses a first frequency band to communicate with the slave device, and calculates the communication packet loss rate of the slave device within a specified historical time period; if the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the slave device to be switched to a second frequency band; wherein the frequency band value of the second frequency band is lower than the frequency band value of the first frequency band.
[0068] In this mode, when the host device communicates with the slave device, if the communication packet loss rate of the slave device is high, the communication frequency band of the slave device is automatically switched to a low-frequency band. The host device uses the low-frequency band to communicate with the slave device, thereby reducing the communication packet loss rate and improving the stability of the communication quality.
[0069] In an optional embodiment, the slave devices include multiple slave devices; when switching the communication frequency band of the slave devices, if the communication packet loss rate of the first device in the slave devices is greater than the preset packet loss rate threshold, the host device controls the communication frequency band of the first device to be switched to the second frequency band, and the communication frequency band of the slave devices other than the first device remains at the first frequency band.
[0070] That is to say, there are multiple slave devices connected to the host device through a power cable; if the communication packet loss rate of the first device among the slave devices is greater than the preset packet loss rate threshold, the host device controls the first device to switch the communication frequency band, and switches the communication frequency band of the first device from the first frequency band to the second frequency band whose frequency band value is lower than the first frequency band, and the communication frequency band of the slave devices other than the first device still remains the first frequency band.
[0071] In actual implementation, when the communication packet loss rate of the first device is higher than the standard value of 5%, it is generally considered that the communication signal attenuation is large and the packet loss is serious; at this time, if the communication frequency band of the first device is a high-frequency band, the first device is controlled to switch the high-frequency band to a low-frequency band, and the communication frequency band of the slave devices other than the first device still remains in the high-frequency band.
[0072] In an optional manner, the host device uses the second frequency band to communicate with the first device, and uses the first frequency band to communicate with slave devices other than the first device.
[0073] That is to say, there are multiple slave devices connected to the host device through power cables; when the communication packet loss rate of the first device among the slave devices is greater than the preset packet loss rate threshold, the host device controls the communication frequency band of the first device to be switched to the second frequency band, and the host device uses the second frequency band to communicate with the first device. In addition, the host device uses the first frequency band to communicate with the slave devices other than the first device among the slave devices.
[0074] In one example, when the packet loss rate of the first device among the slave devices is higher than the standard value of 5%, the host device controls to switch the communication frequency band of the first device to a low frequency band, and then the host device uses the low frequency band to communicate with the first device, and uses the high frequency band to communicate with the slave devices among the slave devices except the first device.
[0075] In an optional manner, the host device sends a communication message to the slave device using a first frequency band and starts timing; within a preset timing duration, the host device waits to receive a reply message from the slave device to the communication message.
[0076] The above communication messages are usually Modbus messages, which is an application layer message transmission protocol.
[0077] In actual implementation, the master device and slave device are connected to the same communication link. When the master device sends a communication message to the slave device using the first frequency band, a timer begins. Then, within a preset timer duration, the master device waits for a reply message from the slave device in response to the communication message. If the master device does not receive a reply message within the preset timer duration, it is considered a packet loss.
[0078] In one example, after the host device sends a communication message to the slave device using the high frequency band, a 2-second timing period begins. During these 2 seconds, the host device remains in the high frequency band, waiting for a reply message from the slave device to the communication message.
[0079] It should be noted that the communication frequency band used by the host device to send communication messages and receive reply messages is consistent with the communication frequency band used by the slave device to receive communication messages and send reply messages.
[0080] Furthermore, the host device obtains the communication message volume of the communication messages sent to the slave device within a specified historical time period, and the reply message volume of the reply messages received for the communication messages; based on the ratio of the reply message volume to the communication message volume, the communication packet loss rate of the slave device is determined.
[0081] The above-mentioned communication message volume and reply message volume are the number of communication messages and the number of reply messages.
[0082] That is to say, within the specified historical time period, for each slave device, the host device obtains the communication message volume tx of the communication messages sent to the slave device, and the reply message volume rx of the reply messages received in response to the communication messages, calculates the ratio of the reply message volume rx to the communication message volume tx, and then subtracts the ratio from 1 to obtain the communication packet loss rate of the slave device.
[0083] For example, 30 minutes after the power device is powered on, and every 30 minutes thereafter, the host device counts the amount of communication messages sent to each slave device and the amount of reply messages from the slave device, and calculates the communication packet loss rate = 1-rx / tx.
[0084] Furthermore, the host device sends a frequency band setting instruction to the first device, and the first device receives the frequency band setting instruction and switches the communication frequency band of the first device to the second frequency band; the host device saves the correspondence between the device address associated with the first device and the second frequency band.
[0085] The frequency band setting instruction is a special instruction sent by the host device to the first device, which is used to control the first device to change the communication frequency band. The device address is the communication address of the inverter device corresponding to the first device.
[0086] That is, after the host device sends a frequency band setting instruction to the first device, the first device receives the frequency band setting instruction and switches the first device from the current communication frequency band to the second frequency band. Furthermore, the host device records and stores the correspondence between the device address associated with the first device and the second frequency band. This correspondence is a topological relationship, which refers to the spatial connection and adjacency between the device address and the communication frequency band.
[0087] For example, the correspondence between the device address associated with the slave device and the communication frequency band is shown in Figure 5. The device address associated with the slave device is the first address of the communication message, that is, the number corresponding to each inverter device.
[0088] In one example, assuming that the packet loss of the slave device corresponding to inverter device No. 2 is serious and the communication signal attenuation is large, and the current communication frequency band of the slave device corresponding to inverter device No. 2 is a high-frequency band, the host device sends a frequency band setting instruction to the slave device corresponding to inverter device No. 2, and the first device receives the frequency band setting instruction and switches the communication frequency band of the slave device corresponding to inverter device No. 2 as shown in FIG5 from the high-frequency band to the low-frequency band. At the same time, the host device saves the correspondence between the device address associated with inverter device No. 2 and the low-frequency band; for example, it is stored in a flash memory (i.e., FLASH EEPROM, also known as flash memory) to realize a power-off memory function. The power-off memory function enables the various operating states of the power equipment to be instantly memorized and locked after a sudden power outage, so that it can still operate according to the set state after power is restored.
[0089] In an optional manner, before the host device sends a frequency band setting instruction, the host device generates a correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the initial state, the communication frequency bands in the correspondence are all the first frequency band; when the host device establishes a correspondence between the device address and the communication frequency band, the host device updates the communication frequency band corresponding to the device address associated with the first device to the second frequency band in the correspondence.
[0090] First, before the host device sends a frequency band setting instruction to the first device, it pre-generates a correspondence between the device address associated with the slave device and the communication frequency band.
[0091] It should be noted that, in the initial state, the communication frequency bands corresponding to the device addresses associated with the slave devices are all first frequency bands. For example, the communication frequency bands in the corresponding relationship are all high frequency bands.
[0092] Then, when the first device completes the frequency band switch, the host device saves the correspondence between the device address associated with the first device and the second frequency band. At this point, the host device can search for the device address associated with the first device in the correspondence and then update the communication frequency band corresponding to the device address associated with the first device to the second frequency band. In the example shown in Figure 5, the host device can search for device address No. 2 associated with the first device in the correspondence and then set the communication frequency band corresponding to device address No. 2 associated with the first device to the low frequency band.
[0093] In one embodiment, a flow chart of establishing a corresponding relationship based on packet loss rate feedback is shown in Figure 6. The steps of this flow chart are described below.
[0094] 1) When the system is powered on, or the PLC host device performs packet loss rate statistics every 30 minutes;
[0095] 2) The PLC host device accumulates the number of messages Tx sent to each inverter device and the number of messages Rx received, and calculates the packet loss rate = Rx / Tx. When the packet loss rate is higher than the standard value of 5%, it is considered that the signal attenuation is large and the packet loss is serious. It is necessary to switch the communication frequency band of this inverter to a low frequency.
[0096] 3) The host device changes the inverter's PLC frequency band to a low frequency through the frequency band setting instruction, and records the address and frequency band and stores them in the flash.
[0097] 4) After the host device is powered on or reset again, the corresponding topology relationship is automatically read.
[0098] After the frequency band is set, each time the PLC host device receives a message sent by the data collector, it needs to determine the first address of the message and select the frequency band based on the stored correspondence.
[0099] Specifically, the host device obtains the message to be sent and extracts the target device address from the message to be sent; from the correspondence between the device address associated with the slave device and the communication frequency band, the target communication frequency band corresponding to the target device address is determined; wherein, in the correspondence, the device address associated with the first device corresponds to the second frequency band, and the device addresses associated with the slave devices other than the first device correspond to the first frequency band; if the target communication frequency band is the first frequency band, the host device uses the first frequency band to send the message to be sent to the slave device associated with the target device address; if the target communication frequency band is the second frequency band, the host device uses the second frequency band to send the message to be sent to the first device associated with the target device address.
[0100] The target device address is the device address of the target inverter device. The target communication frequency band is the communication frequency band that needs to be set when the master device sends a message to be sent to the slave device.
[0101] First, the host device obtains the message to be sent and extracts the target device address from the message to be sent.
[0102] For example, the host device receives all Modbus messages sent from the data collector, and extracts the first address from the message to be sent.
[0103] Next, the host device determines the target communication frequency band corresponding to the target device address in the correspondence between the device address associated with the slave device and the communication frequency band; in this correspondence, the device address associated with the first device corresponds to the second frequency band, and the device addresses associated with the slave devices other than the first device correspond to the first frequency band.
[0104] In one example, the correspondence between the device address associated with a slave device and the communication frequency band is shown in Figure 5. The master device determines whether the target communication frequency band is a high frequency band or a low frequency band based on the correspondence. Assuming that the slave device corresponding to inverter device No. 2 is the first device, the device address associated with inverter device No. 2 corresponds to the low frequency band, and the slave devices corresponding to inverters No. 1, 3, 5, and excluding inverter device No. 2, correspond to the high frequency band.
[0105] Furthermore, the master device sends a message to be sent to the slave device based on the target communication frequency band. If the target communication frequency band is the first frequency band, the message to be sent is sent to the slave device associated with the target device address using the first frequency band; if the target communication frequency band is the second frequency band, the message to be sent is sent to the first device associated with the target device address using the second frequency band.
[0106] In the example shown in Figure 5, if the target communication frequency band is a high-frequency band, the host device uses the high-frequency band to send the message to be sent to the slave device associated with the inverter device address No. 1, No. 3, No. 4 or No. 5; if the target communication frequency band is a low-frequency band, the host device uses the low-frequency band to send the message to be sent to the slave device associated with the inverter device address No. 2.
[0107] It is understandable that when the target communication frequency band corresponding to the target device address is inconsistent with the communication frequency band of the host device at this time, it is necessary to switch the communication frequency band of the host device.
[0108] In an optional manner, if the target communication frequency band is the first frequency band, the host device obtains the communication frequency band of the host device; if the communication frequency band is the second frequency band, the host device switches the communication frequency band to the first frequency band, and uses the first frequency band to send the message to be sent to the slave device associated with the target device address.
[0109] That is to say, when the target communication frequency band corresponding to the target device address is the first frequency band, first, the host device obtains the current communication frequency band of the host device; then, if the current communication frequency band is the second frequency band, the host device switches the second frequency band to the first frequency band, and the host device uses the first frequency band to send the message to be sent to the slave device associated with the target device address.
[0110] For example, when the communication frequency band corresponding to the first address extracted in the message to be sent is a high-frequency band, the host device first obtains the current communication frequency band of the host device. If the current communication frequency band of the host device is a low-frequency band, the host device switches the low-frequency band to the high-frequency band, and uses the high-frequency band to send the message to be sent to the slave device associated with the first address.
[0111] Similarly, if the target communication frequency band is the second frequency band, the host device obtains the communication frequency band of the host device; if the communication frequency band is the first frequency band, the host device switches the communication frequency band to the second frequency band, and uses the second frequency band to send the message to be sent to the first device associated with the target device address.
[0112] That is to say, when the target communication frequency band corresponding to the target device address is the second frequency band, first, the host device obtains the current communication frequency band of the host device; then, if the current communication frequency band is the first frequency band, the host device switches the first frequency band to the second frequency band, and the host device uses the second frequency band to send the message to be sent to the slave device associated with the target device address.
[0113] For example, when the communication frequency band corresponding to the first address extracted in the message to be sent is a low-frequency band, the host device first obtains the current communication frequency band of the host device. If the current communication frequency band of the host device is a high-frequency band, the host device switches the high-frequency band to a low-frequency band, and uses the low-frequency band to send the message to be sent to the slave device associated with the first address.
[0114] In addition, the correspondence between the device address and the communication frequency band can not only be automatically established through the feedback of the above-mentioned communication packet loss rate, but also be established by manually sending a relationship setting instruction.
[0115] Specifically, the host device is also connected to the host computer for communication; the host device receives the relationship setting instruction issued by the host computer, obtains the device to be set and the frequency band to be set from the relationship setting instruction; in the corresponding relationship, updates the communication frequency band corresponding to the device address associated with the device to be set to the frequency band to be set.
[0116] The above relationship setting instructions are manually set. For example, when the host device is connected to the host computer, the staff can use the USB to RS485 serial port driver to simulate the traditional serial port through the terminal's USB interface, realize the connection and communication between the programming cable and the power line carrier communication device, and configure the parameters of the relationship setting instructions.
[0117] In actual implementation, the host device receives the relationship setting instruction sent by the upper computer, and obtains the device to be set and the frequency band to be set from the relationship setting instruction; then, in the correspondence between the device address and the communication frequency band, the host device updates the communication frequency band corresponding to the device address associated with the device to be set to the frequency band to be set.
[0118] Alternatively, the host device can be connected to a data collector, which can be accessed via the network to configure the parameters of the relationship setting instruction. Specifically, the host device receives the relationship setting instruction sent via the data collector's network human-machine interface, obtains the device to be set and the frequency band to be set, and then, based on the correspondence between device addresses and communication frequency bands, updates the communication frequency band associated with the device address of the device to be set to the frequency band to be set.
[0119] It should be noted that the correspondence between the device address and the communication frequency band can be stored in the host device or sent to the host device through the data collector.
[0120] In one embodiment, a flowchart of the host device sending a communication message is shown in Figure 7. The steps of the flowchart are described below.
[0121] 1) When the first address of the message is the number of the problematic inverter with serious packet loss, the PLC host device needs to switch the communication frequency band for sending the message to a low frequency band. After the switch is completed, the data packet is sent to the physical layer, and the radio frequency is processed and sent to the power line;
[0122] 2) The PLC slave device at the inverter position demodulates the corresponding low-frequency signal when it receives it. After the demodulation is completed, it replies to the PLC master device, which then passes it to the data collector;
[0123] 3) If packet loss occurs, the PLC host device will stay in the current frequency band for a certain period of time, up to 2 seconds;
[0124] 4) The host device receives the next message. If the first address of the message is the inverter, the PLC physical layer switches the communication frequency band for sending the message to the corresponding frequency band.
[0125] In an optional manner, the host device is also communicatively connected to a data collector in the photovoltaic system; the host device obtains a broadcast message sent by the data collector and broadcasts the broadcast message using a first frequency band; a slave device using the first frequency band receives the broadcast message; the host device switches the communication frequency band from the first frequency band to the second frequency band and broadcasts the broadcast message using the second frequency band; and a slave device using the second frequency band receives the broadcast message.
[0126] The above broadcast message does not carry the target device address, that is, the first address information of the broadcast message is zero.
[0127] In actual implementation, different slave devices operate in different communication frequency bands. Therefore, when the host device broadcasts a broadcast message, it usually switches the current communication frequency band to the communication frequency band of the slave device receiving the broadcast message.
[0128] First, the host device is connected to the data collector in the photovoltaic system, receives the broadcast message sent by the data collector through the host device, and broadcasts the broadcast message using the first frequency band so that the slave device in the first frequency band receives the broadcast message.
[0129] Furthermore, after the host device switches the communication frequency band from the first frequency band to the second frequency band, the host device uses the second frequency band to broadcast the broadcast message, so that the slave devices in the second frequency band receive the broadcast message.
[0130] For example, when the host device receives a broadcast message sent by the data collector, it determines that the first address information is zero and needs to be sent to all slave devices. At this time, the host device uses a high-frequency band to broadcast the broadcast message so that the slave devices in the high-frequency band receive the broadcast message; then, the host device switches the communication frequency band from the high-frequency band to the low-frequency band, and uses the low-frequency band to broadcast the broadcast message so that the slave devices in the low-frequency band receive the broadcast message.
[0131] The above communication control method does not require manual adjustment of cables and machine positions. It reduces packet loss rate through automatic frequency band selection, improves communication quality, ensures communication stability, and minimizes the impact of crosstalk.
[0132] For the above method embodiment, referring to the structural diagram of a communication control device shown in FIG8 , the device is provided in a photovoltaic system; in the photovoltaic system, a master device and a slave device are connected via a power cable; the device includes:
[0133] The first communication module 801 is configured for the master device to communicate with the slave device using the first frequency band, and to calculate the communication packet loss rate of the slave device within a specified historical time period;
[0134] The first control module 802 is configured to control the host device to switch the communication frequency band of the slave device to a second frequency band if the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold; wherein the frequency band value of the second frequency band is lower than the frequency band value of the first frequency band.
[0135] In this mode, when the host device communicates with the slave device, if the communication packet loss rate of the slave device is high, the communication frequency band of the slave device is automatically switched to a low-frequency band. The host device uses the low-frequency band to communicate with the slave device, thereby reducing the communication packet loss rate and improving the stability of the communication quality.
[0136] The above-mentioned slave devices include multiple ones; the above-mentioned first control module is also used to control the host device to switch the communication frequency band of the first device to the second frequency band if the communication packet loss rate of the first device among the slave devices is greater than the preset packet loss rate threshold, and the communication frequency band of the slave devices other than the first device remains at the first frequency band.
[0137] The above-mentioned apparatus further includes a second communication module, which is used for the host device to communicate with the first device using the second frequency band, and to communicate with slave devices other than the first device using the first frequency band.
[0138] The first communication module is further configured for the host device to send a communication message to the slave device using the first frequency band and start timing; within a preset timing period, the host device waits to receive a reply message from the slave device for the communication message.
[0139] The above-mentioned first communication module is also used by the host device to obtain the communication message volume of the communication messages sent to the slave device within a specified historical time period, and the reply message volume of the reply messages received in response to the communication messages; based on the ratio of the reply message volume to the communication message volume, determine the communication packet loss rate of the slave device.
[0140] The above-mentioned first control module is also used for the host device to send a frequency band setting instruction to the first device; the first device receives the frequency band setting instruction and switches the communication frequency band of the first device to the second frequency band; the host device saves the correspondence between the device address associated with the first device and the second frequency band.
[0141] The above-mentioned device also includes a first generation module, which is used by the host device to generate a correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the initial state, the communication frequency bands in the correspondence are all first frequency bands; the above-mentioned first control module is also used by the host device to update the communication frequency band corresponding to the device address associated with the first device to the second frequency band in the correspondence.
[0142] The above-mentioned second communication module is also used for the host device to obtain the message to be sent and extract the target device address from the message to be sent; determine the target communication frequency band corresponding to the target device address from the correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the correspondence, the device address associated with the first device corresponds to the second frequency band, and the device addresses associated with the slave devices other than the first device correspond to the first frequency band; if the target communication frequency band is the first frequency band, the host device uses the first frequency band to send the message to be sent to the slave device associated with the target device address; if the target communication frequency band is the second frequency band, the host device uses the second frequency band to send the message to be sent to the first device associated with the target device address.
[0143] The above-mentioned second communication module is also used to, if the target communication frequency band is the first frequency band, the host device obtains the communication frequency band of the host device; if the communication frequency band is the second frequency band, the host device switches the communication frequency band to the first frequency band, and uses the first frequency band to send the message to be sent to the slave device associated with the target device address.
[0144] The above-mentioned second communication module is also used to, if the target communication frequency band is the second frequency band, the host device obtains the communication frequency band of the host device; if the communication frequency band is the first frequency band, the host device switches the communication frequency band to the second frequency band, and uses the second frequency band to send the message to be sent to the first device associated with the target device address.
[0145] The above-mentioned host device is also communicatively connected to the host computer; the above-mentioned device also includes a first update module, which is used for the host device to receive the relationship setting instruction issued by the host computer, obtain the device to be set and the frequency band to be set from the relationship setting instruction; in the corresponding relationship, update the communication frequency band corresponding to the device address associated with the device to be set to the frequency band to be set.
[0146] The above-mentioned host device is also communicatively connected to the data collector in the photovoltaic system; the above-mentioned device also includes a first broadcast module, which is used for the host device to obtain the broadcast message sent by the data collector and broadcast the broadcast message using the first frequency band; the slave device using the first frequency band receives the broadcast message; the host device switches the communication frequency band from the first frequency band to the second frequency band, and broadcasts the broadcast message using the second frequency band; the slave device using the second frequency band receives the broadcast message.
[0147] This embodiment further provides a host device, which includes a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-mentioned communication control method. The host device can be a server or a terminal device.
[0148] This embodiment further provides a slave device, which includes a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor; the slave device is connected to the host device via a power cable.
[0149] As shown in FIG9 , the electronic device includes a processor 100 and a memory 101 . The memory 101 stores machine-executable instructions that can be executed by the processor 100 . The processor 100 executes the machine-executable instructions to implement the above communication control method.
[0150] Furthermore, the electronic device shown in FIG9 further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .
[0151] Memory 101 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between the system network element and at least one other network element is achieved through at least one communication interface 103 (which may be wired or wireless), and may utilize the Internet, a wide area network, a local area network, a metropolitan area network, etc. Bus 102 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, FIG9 shows only one bidirectional arrow, but this does not imply that there is only one bus or only one type of bus.
[0152] The processor 100 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 100 or by software instructions. The processor 100 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as a random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or register. The storage medium is located in the memory 101. The processor 100 reads the information in the memory 101 and, in conjunction with its hardware, completes the steps of the method of the aforementioned embodiment.
[0153] The photovoltaic system includes multiple arrays, which can also be called sub-arrays. Each array includes a data logger, an inverter and a box-type transformer. In the photovoltaic sub-array with the box-type transformer as the basic unit, the PLC communication module installed on the photovoltaic inverter is called a PLC slave device, and the PLC communication module installed on the box-type transformer side is called a PLC master device.
[0154] The data collector and host device are both located in the communication cabinet on the box-type transformer side. Wired communication, such as RS485, is used between the data collector installed on the box-type transformer side and the PLC host device. The data collector sends instructions to the PLC host device, which modulates the instructions into a carrier signal and transmits it via the inverter AC power line on the low-voltage side of the box-type transformer to the inverter end, namely the PLC slave device. The PLC slave device demodulates the carrier signal into instructions and sends them to the inverter for execution. If the inverter needs to upload data, the same instruction issuance method as described above is used. However, the PLC slave device modulates the inverter data into a carrier signal and transmits it via the inverter AC power line to the low-voltage side of the box-type transformer and the PLC host device. The PLC host device demodulates the carrier signal into inverter data and sends it to the data collector, thus achieving two-way communication.
[0155] Based on this, this embodiment also provides a photovoltaic system, as shown in Figure 10, the communication system includes the above-mentioned host device and a slave device; the host device uses a first frequency band to communicate with the slave device, and counts the communication packet loss rate of the slave device in a specified historical time period; if the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the slave device to be switched to a second frequency band; wherein the frequency band value of the second frequency band is lower than the frequency band value of the first frequency band.
[0156] The above-mentioned host device is connected to the data collector; the slave device is connected to the inverter.
[0157] The above-mentioned slave devices include multiple ones; if the communication packet loss rate of the first device among the slave devices is greater than the preset packet loss rate threshold, the host device controls the communication frequency band of the first device to be switched to the second frequency band, and the communication frequency band of the slave devices other than the first device remains at the first frequency band.
[0158] The host device uses the second frequency band to communicate with the first device, and uses the first frequency band to communicate with slave devices other than the first device.
[0159] The host device sends a communication message to the slave device using the first frequency band and starts timing; within a preset timing period, the host device waits to receive a reply message from the slave device for the communication message.
[0160] The master device obtains the communication message volume of the communication messages sent to the slave device and the reply message volume of the reply messages received in response to the communication messages within a specified historical time period; and determines the communication packet loss rate of the slave device based on the ratio of the reply message volume to the communication message volume.
[0161] The host device sends a frequency band setting instruction to the first device; the first device receives the frequency band setting instruction and switches the communication frequency band of the first device to the second frequency band; the host device saves the corresponding relationship between the device address associated with the first device and the second frequency band.
[0162] The above-mentioned host device generates a correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the initial state, the communication frequency bands in the correspondence are all the first frequency band; after the host device sends a frequency band setting instruction to the first device, the host device updates the communication frequency band corresponding to the device address associated with the first device to the second frequency band in the correspondence.
[0163] The above-mentioned host device obtains the message to be sent and extracts the target device address from the message to be sent; determines the target communication frequency band corresponding to the target device address from the correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the correspondence, the device address associated with the first device corresponds to the second frequency band, and the device addresses associated with the slave devices other than the first device correspond to the first frequency band; if the target communication frequency band is the first frequency band, the host device uses the first frequency band to send the message to be sent to the slave device associated with the target device address; if the target communication frequency band is the second frequency band, the host device uses the second frequency band to send the message to be sent to the first device associated with the target device address.
[0164] If the target communication frequency band is the first frequency band, the host device obtains the communication frequency band of the host device; if the communication frequency band is the second frequency band, the host device switches the communication frequency band to the first frequency band and uses the first frequency band to send the message to be sent to the slave device associated with the target device address.
[0165] If the target communication frequency band is the second frequency band, the host device obtains the communication frequency band of the host device; if the communication frequency band is the first frequency band, the host device switches the communication frequency band to the second frequency band, and uses the second frequency band to send the message to be sent to the first device associated with the target device address.
[0166] The host device is also connected to the host computer for communication; the host device receives the relationship setting instruction issued by the host computer, obtains the device to be set and the frequency band to be set from the relationship setting instruction; in the corresponding relationship, updates the communication frequency band corresponding to the device address associated with the device to be set to the frequency band to be set.
[0167] The above-mentioned host device is also communicatively connected to the data collector in the photovoltaic system; the host device obtains the broadcast message sent by the data collector and broadcasts the broadcast message using the first frequency band; the slave device using the first frequency band receives the broadcast message; the host device switches the communication frequency band from the first frequency band to the second frequency band, and broadcasts the broadcast message using the second frequency band; the slave device using the second frequency band receives the broadcast message.
[0168] The above-mentioned photovoltaic system stores the correspondence between the inverter address and the frequency band number in the host device. The host device uses packet loss rate feedback to set the frequency band of the problem inverter with severe packet loss to the low-frequency band. Inverters other than the problem inverter maintain the default high-frequency band for communication. When the data collector asks for the address of the problem inverter, the host device automatically switches to the low-frequency band based on the correspondence between the address and the frequency band to send a message to the problem inverter and wait for the problem inverter to reply. When the data collector asks for the address of the normal inverter, the host device automatically returns to the normal frequency band, which solves the problem of large attenuation of PLC communication signals due to noise in the power cable, the type and material of the power cable, or the long distance between the devices at both ends of the communication. It reduces the packet loss rate, improves the communication quality, ensures the stability of communication, and minimizes the impact of crosstalk.
[0169] In addition, in the description of the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0170] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0171] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0172] Finally, it should be noted that the above embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A communication control method, characterized in that: The method is applied to a photovoltaic system; in the photovoltaic system, a host device and a slave device are connected via a power cable; the method comprises: The host device communicates with the slave device using a first frequency band, and counts a communication packet loss rate of the slave device within a specified historical time period; If the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the slave device to be switched to a second frequency band; wherein the frequency band value of the second frequency band is lower than the frequency band value of the first frequency band.
2. The method according to claim 1, characterized in that The slave device includes a plurality of slave devices; if the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the slave device to be switched to a second frequency band, comprising: If the communication packet loss rate of the first device among the slave devices is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the first device to be switched to the second frequency band, and the communication frequency band of the slave devices other than the first device remains the first frequency band.
3. The method according to claim 2, characterized in that After the step of controlling, by the host device, to switch the communication frequency band of the first device to a second frequency band if the communication packet loss rate of the first device among the slave devices is greater than a preset packet loss rate threshold, and maintaining the communication frequency band of the slave devices other than the first device as the first frequency band, the method further includes: The host device uses the second frequency band to communicate with the first device, and uses the first frequency band to communicate with slave devices other than the first device.
4. The method according to claim 1, characterized in that: The step of the host device communicating with the slave device using the first frequency band includes: The host device sends a communication message to the slave device using the first frequency band and starts timing; Within a preset timing period, the host device waits to receive a reply message from the slave device to the communication message.
5. The method according to claim 1, characterized in that The step of counting the communication packet loss rate of the slave device within a specified historical time period includes: The host device obtains the communication message volume of the communication messages sent to the slave device and the reply message volume of the reply messages received in response to the communication messages within a specified historical time period; Based on the ratio of the reply message volume to the communication message volume, a communication packet loss rate of the slave device is determined.
6. The method according to claim 2, characterized in that The step of the host device controlling the communication frequency band of the first device to be switched to the second frequency band includes: The host device sends a frequency band setting instruction to the first device; The first device receives the frequency band setting instruction and switches the communication frequency band of the first device to a second frequency band; The host device stores a correspondence between a device address associated with the first device and the second frequency band.
7. The method according to claim 6, characterized in that Before the step of the host device sending a frequency band setting instruction to the first device, the method further includes: The host device generates a correspondence between a device address associated with the slave device and a communication frequency band; wherein, in an initial state, the communication frequency bands in the correspondence are all the first frequency bands; The step of storing, by the host device, a correspondence between a device address associated with the first device and the second frequency band, comprises: In the corresponding relationship, the host device updates the communication frequency band corresponding to the device address associated with the first device to the second frequency band.
8. The method according to claim 3, characterized in that The step of the host device using the second frequency band to communicate with the first device, and using the first frequency band to communicate with slave devices other than the first device, comprises: The host device obtains a message to be sent, and extracts a target device address from the message to be sent; Determine the target communication frequency band corresponding to the target device address from the correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the correspondence, the device address associated with the first device stores the second frequency band correspondingly, and the device addresses associated with slave devices other than the first device store the first frequency band correspondingly; If the target communication frequency band is the first frequency band, the host device uses the first frequency band to send the message to be sent to the slave device associated with the target device address; If the target communication frequency band is the second frequency band, the host device uses the second frequency band to send the message to be sent to the first device associated with the target device address.
9. The method according to claim 8, characterized in that If the target communication frequency band is the first frequency band, the step of the host device sending the message to be sent to the slave device associated with the target device address using the first frequency band includes: If the target communication frequency band is the first frequency band, the host device acquires the communication frequency band of the host device; If the communication frequency band is the second frequency band, the host device switches the communication frequency band to the first frequency band, and uses the first frequency band to send the message to be sent to the slave device associated with the target device address.
10. The method according to claim 8, characterized in that If the target communication frequency band is the second frequency band, the step of the host device sending the message to be sent to the first device associated with the target device address using the second frequency band includes: If the target communication frequency band is the second frequency band, the host device acquires the communication frequency band of the host device; If the communication frequency band is the first frequency band, the host device switches the communication frequency band to the second frequency band, and uses the second frequency band to send the message to be sent to the first device associated with the target device address.
11. The method according to claim 7, characterized in that The host device is also connected to the host computer for communication; the method further includes: The host device receives the relationship setting instruction sent by the host computer, and obtains the device to be set and the frequency band to be set from the relationship setting instruction; In the corresponding relationship, the communication frequency band corresponding to the device address associated with the device to be set is updated to the frequency band to be set.
12. The method according to claim 1, characterized in that The host device is also in communication connection with a data collector in the photovoltaic system; the method further comprises: The host device obtains the broadcast message sent by the data collector, and broadcasts the broadcast message using the first frequency band; A slave device using the first frequency band receives the broadcast message; The host device switches the communication frequency band from the first frequency band to the second frequency band, and uses the second frequency band to broadcast the broadcast message; The slave device using the second frequency band receives the broadcast message.
13. A communication control device, characterized in that: The device is arranged in a photovoltaic system; in the photovoltaic system, a host device and a slave device are connected via a power cable; the device comprises: A first communication module, configured for the host device to communicate with the slave device using a first frequency band, and to count a communication packet loss rate of the slave device within a specified historical time period; The first control module is used to control the host device to switch the communication frequency band of the slave device to a second frequency band if the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold; wherein the frequency band value of the second frequency band is lower than the frequency band value of the first frequency band.
14. A host device, characterized in that: The host device includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the communication control method according to any one of claims 1 to 12.
15. A slave device, characterized in that: The slave device comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor; the slave device is connected to the host device according to claim 14 via a power cable.
16. A photovoltaic system, comprising the host device according to claim 14, and the slave device according to claim 15; The host device communicates with the slave device using a first frequency band, and counts a communication packet loss rate of the slave device within a specified historical time period; If the communication packet loss rate of the slave device is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the slave device to be switched to a second frequency band; wherein, A frequency band value of the second frequency band is lower than a frequency band value of the first frequency band.
17. The photovoltaic system according to claim 16, characterized in that: The host device is connected to a data collector; and the slave device is connected to an inverter.
18. The photovoltaic system according to claim 16, characterized in that: The slave device includes a plurality of; If the communication packet loss rate of the first device among the slave devices is greater than a preset packet loss rate threshold, the host device controls the communication frequency band of the first device to be switched to the second frequency band, and the communication frequency band of the slave devices other than the first device remains the first frequency band.
19. The photovoltaic system according to claim 18, characterized in that: The host device uses the second frequency band to communicate with the first device, and uses the first frequency band to communicate with slave devices other than the first device.
20. The photovoltaic system according to claim 16, characterized in that: The host device sends a communication message to the slave device using the first frequency band and starts timing; Within a preset timing period, the host device waits to receive a reply message from the slave device to the communication message.
21. The photovoltaic system according to claim 16, characterized in that: The host device obtains the communication message volume of the communication messages sent to the slave device and the reply message volume of the reply messages received in response to the communication messages within a specified historical time period; Based on the ratio of the reply message volume to the communication message volume, a communication packet loss rate of the slave device is determined.
22. The photovoltaic system according to claim 18, characterized in that: The host device sends a frequency band setting instruction to the first device; The first device receives the frequency band setting instruction and switches the communication frequency band of the first device to a second frequency band; The host device stores a correspondence between a device address associated with the first device and the second frequency band.
23. The photovoltaic system according to claim 22, characterized in that: The host device generates a correspondence between a device address associated with the slave device and a communication frequency band; wherein, in an initial state, the communication frequency bands in the correspondence are all the first frequency bands; After the host device sends a frequency band setting instruction to the first device, the host device updates the communication frequency band corresponding to the device address associated with the first device to the second frequency band in the corresponding relationship.
24. The photovoltaic system according to claim 19, characterized in that: The host device obtains a message to be sent, and extracts a target device address from the message to be sent; Determine the target communication frequency band corresponding to the target device address from the correspondence between the device address associated with the slave device and the communication frequency band; wherein, in the correspondence, the device address associated with the first device stores the second frequency band correspondingly, and the device addresses associated with slave devices other than the first device store the first frequency band correspondingly; If the target communication frequency band is the first frequency band, the host device uses the first frequency band to send the message to be sent to the slave device associated with the target device address; If the target communication frequency band is the second frequency band, the host device uses the second frequency band to send the message to be sent to the first device associated with the target device address.
25. The photovoltaic system according to claim 24, characterized in that: If the target communication frequency band is the first frequency band, the host device acquires the communication frequency band of the host device; If the communication frequency band is the second frequency band, the host device switches the communication frequency band to the first frequency band, and uses the first frequency band to send the message to be sent to the slave device associated with the target device address.
26. The photovoltaic system according to claim 24, characterized in that: If the target communication frequency band is the second frequency band, the host device acquires the communication frequency band of the host device; If the communication frequency band is the first frequency band, the host device switches the communication frequency band to the second frequency band, and uses the second frequency band to send the message to be sent to the first device associated with the target device address.
27. The photovoltaic system according to claim 23, characterized in that: The host device is also connected to the host computer for communication; The host device receives the relationship setting instruction sent by the host computer, and obtains the device to be set and the frequency band to be set from the relationship setting instruction; In the corresponding relationship, the communication frequency band corresponding to the device address associated with the device to be set is updated to the frequency band to be set.
28. The photovoltaic system according to claim 16, characterized in that: The host device is also in communication connection with a data collector in the photovoltaic system; The host device obtains the broadcast message sent by the data collector, and broadcasts the broadcast message using the first frequency band; A slave device using the first frequency band receives the broadcast message; The host device switches the communication frequency band from the first frequency band to the second frequency band, and uses the second frequency band to broadcast the broadcast message; The slave device using the second frequency band receives the broadcast message.
Citation Information
Patent Citations
Communication control method and device, host equipment, slave equipment and photovoltaic system
CN117639842A
A method for realizing adaptive frequency band switching of G3-PLC network communication
CN109039378A
Method for automatically selecting frequency band
CN110771052A
PLC intelligent lamp control method, PLC gateway, PLC lamp and PLC intelligent lamp control system
CN111601414A
Power line carrier communication device
JP2015156543A