Fire fighting system communication method and apparatus based on two bus

By constructing a mathematical model of the electrical characteristics of a two-bus network in a fire protection system, optimizing signal modulation parameters using a multi-objective particle swarm optimization algorithm, and combining asymmetric current modulation and phase detection self-calibration mechanism, the problems of signal attenuation and high bit error rate in the fire protection system are solved, achieving high-efficiency communication reliability and anti-interference capability.

CN122160207APending Publication Date: 2026-06-05BEIJING GAODELIHUA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING GAODELIHUA TECH CO LTD
Filing Date
2026-03-18
Publication Date
2026-06-05

Smart Images

  • Figure CN122160207A_ABST
    Figure CN122160207A_ABST
Patent Text Reader

Abstract

The application discloses a kind of communication method and device of fire-fighting system based on two bus, it is related to fire-fighting communication technical field.The method includes: fire-fighting host is based on the electrical characteristic mathematical model of two bus network, utilizes multi-objective particle swarm algorithm to obtain optimal signal modulation parameter in combination with state vector, and synchronizes to slave equipment;Fire-fighting host generates composite voltage signal containing high-frequency carrier signal and is transmitted to slave equipment;Slave equipment receives signal and carries out direct-current extraction, utilizes high-frequency carrier signal to carry out phase detection and self-calibration to local sampling clock, and demodulates downlink data based on aligned clock;After address matching succeeds, slave equipment uses asymmetric current modulation mode to convert uplink data into asymmetric current signal and is transmitted to fire-fighting host;Fire-fighting host monitors bus current and demodulates and extracts uplink data.The application effectively improves the reliability, anti-interference ability and data transmission efficiency of two bus communication by adaptive optimization modulation parameter and high-precision clock calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fire protection communication technology, and in particular to a fire protection system communication method and device based on a two-bus architecture. Background Technology

[0002] As a critical safety assurance system, the real-time performance and reliability of fire protection systems are of paramount importance. Traditional fire protection systems typically employ a two-wire bus system, achieving both power supply and communication functions through only two wires. However, with the increasing scale of modern buildings and the growing number of fire protection equipment, two-wire bus networks exhibit characteristics such as long distances, multiple nodes, and significant load variations.

[0003] In existing technologies, two-bus communication typically uses a fixed carrier frequency and baud rate. However, due to uneven line impedance distribution, environmental noise interference, and dynamic changes in the number of nodes, fixed communication parameters are difficult to adapt to complex field electrical environments. When the line is long or the load is heavy, signal attenuation is severe, leading to insufficient voltage or reduced signal-to-noise ratio at the end device, thus causing communication errors or interruptions. Furthermore, slave devices usually rely on internal independent crystal oscillators for sampling. Due to the accumulation of crystal oscillator errors and the influence of temperature drift, clock skew between the master and slave devices is easily caused, further increasing the bit error rate. In uplink communication, traditional current modulation methods often suffer from a fixed modulation depth, making it difficult to achieve efficient data return while ensuring power supply.

[0004] Therefore, there is an urgent need for a two-bus communication method that can adapt to network electrical characteristics, improve clock synchronization accuracy, and optimize modulation methods to enhance the overall communication quality and stability of fire protection systems. Summary of the Invention

[0005] This invention provides a communication method and device for a fire protection system based on a two-bus architecture. This invention solves the problems of low communication reliability and poor anti-interference capability in existing technologies.

[0006] In a first aspect, embodiments of the present invention provide a communication method for a fire protection system based on a two-bus architecture, the method comprising: In the fire control panel of the fire protection system, based on the mathematical model of the electrical characteristics of the two-bus network, the multi-objective particle swarm algorithm is used to obtain the optimal signal modulation parameters and synchronize the optimal signal modulation parameters to each slave device. In the fire alarm control panel, a composite voltage signal of the high-frequency carrier signal corresponding to the downlink data is generated according to the optimal signal modulation parameters, and the composite voltage signal is transmitted to the slave device through a two-bus network. In the slave device of the fire protection system, the composite voltage signal received in real time is subjected to DC blocking processing and signal extraction according to the synchronous optimal signal modulation parameters, and the high-frequency carrier signal contained therein is extracted. In the slave device, the local sampling clock is phase-detected and self-calibrated according to the high-frequency carrier signal, and the high-frequency carrier signal is demodulated based on the obtained aligned clock to extract the included downlink data. In the slave device, the address code of the downlink data is matched. If the address match is successful, the uplink response is prepared and the next step is initiated. Otherwise, the corresponding high-frequency carrier signal is ignored. In the slave device, an asymmetric current modulation method is used to modulate the uplink data into an asymmetric current signal, and the asymmetric current signal is transmitted to the fire control panel. In the fire alarm control panel, the bus current of the two-bus network is monitored, the asymmetric current signal contained therein is identified, the asymmetric current signal is demodulated and analyzed, and the uplink data contained therein is extracted.

[0007] The technical solution provided in this application has at least the following beneficial effects: By establishing a mathematical model of the electrical characteristics of a two-bus network and using a multi-objective particle swarm optimization algorithm to calculate the optimal modulation parameters (carrier frequency, baud rate, and voltage amplitude) in real time, the network can adapt to different scales and line types, maximizing communication performance and enhancing adaptability. During optimization, the bit error rate is minimized and the voltage margin is maximized simultaneously, ensuring signal integrity under harsh electromagnetic environments and long-distance transmission, thus improving communication reliability. The introduction of phase detection and self-calibration mechanisms from slave devices eliminates the effects of local clock drift and delay, achieving precise bit synchronization and improving demodulation accuracy. Uplink communication uses asymmetric current modulation, while downlink uses voltage carrier, effectively distinguishing between power supply and communication signals, improving the signal-to-noise ratio, and enhancing anti-interference capabilities.

[0008] In one optional implementation, the fire control panel of the fire protection system, based on a mathematical model of the electrical characteristics of a two-bus network, uses a multi-objective particle swarm optimization algorithm to obtain the optimal signal modulation parameters and synchronize these parameters to each slave device, including: In the fire control panel of the fire protection system, the bus is regarded as a uniform long line with distributed resistance, distributed inductance and distributed capacitance, and a mathematical model of the electrical characteristics of the two-bus network is constructed according to the bus cable type and network structure. Define the state vector of the two-bus network, the state vector including the total current. Main line voltage drop Signal-to-noise ratio and the number of online nodes ; The signal modulation parameters to be optimized are encoded into position vectors for a multi-objective particle swarm optimization (MPS) algorithm. A multi-objective optimization function for the MPS algorithm is defined and used as the fitness function. The signal modulation parameters include the carrier frequency. Communication baud rate and signal voltage amplitude ; Based on the electrical characteristic mathematical model of the two-bus network, combined with the state vector, the multi-objective particle swarm optimization algorithm is used to solve the multi-objective optimization function and obtain the Pareto optimal solution set. Based on the communication mode acquired by the fire alarm control panel, the TOPSIS method is used to select the optimal signal modulation parameters from the Pareto optimal solution set and synchronize the optimal signal modulation parameters to each slave device.

[0009] In one alternative implementation, the formula for the multi-objective optimization function is:

[0010] In the formula, Signal modulation parameter vector X fitness value; Signal modulation parameter vector X The bit error rate; Signal modulation parameter vector X Voltage margin; X This is the signal modulation parameter vector, which is the position vector of the particle in the multi-objective particle swarm algorithm; It is a constant; The formula for the bit error rate function is:

[0011] In the formula, Based on the signal modulation parameter vector X The basic bit error rate is calculated using the state vector; This is the baud rate penalty factor calculated based on the state vector; The node load disturbance factor is calculated based on the state vector. Based on signal modulation parameter vector X Calculated waveform distortion factor; The formula for the voltage margin function is:

[0012] In the formula, Based on the signal modulation parameter vector X The estimated voltage at the end of the circuit is calculated using the state vector; This is the minimum operating voltage.

[0013] In one alternative implementation, based on a mathematical model of the electrical characteristics of a two-bus network, combined with state vectors, a multi-objective particle swarm optimization algorithm is used to solve the multi-objective optimization function, yielding a Pareto optimal solution set, including: Initialize the particle swarm by generating a chaotic sequence using a Logistic mapping and mapping the chaotic sequence to the solution space of the particles. The candidate signal modulation parameters corresponding to each initial particle in the initial particle swarm and the state vector acquired based on the candidate signal modulation parameters are input into the electrical characteristic mathematical model, and the fitness function is used to calculate the corresponding fitness value. Based on the fitness value, the initial particle swarm is sorted into different non-dominated layers. All non-dominated solutions in the first non-dominated layer are stored in the external archive, and the upper limit of the archive capacity of the external archive is maintained by the crowding distance. By introducing a convergence factor and an adaptive Cauchy mutation mechanism, the initial particle swarm is updated to obtain an updated particle swarm. The candidate signal modulation parameters corresponding to each updated particle in the updated particle swarm and the state vector collected based on the candidate signal modulation parameters are input into the electrical characteristic mathematical model, and the fitness function is used to calculate the corresponding fitness value. Based on the fitness value, update the external archive until the number of iterations reaches the iteration threshold, then stop iterating and updating the particle swarm, and output all non-dominated solutions in the external archive as the Pareto optimal solution set.

[0014] In one alternative implementation, based on the communication mode acquired by the fire alarm control panel, the TOPSIS method is used to select the optimal signal modulation parameters from the Pareto optimal solution set, and the optimal signal modulation parameters are synchronized to each slave device, including: Using the TOPSIS method, an initial decision matrix for the Pareto optimal solution set is constructed, and the fitness values ​​of each non-dominated solution in the matrix are normalized to obtain a normalized decision matrix. Based on the current communication mode, the parameter weights are matched and applied to the normalized decision matrix to form a weighted normalized matrix. Define the positive and negative ideal solutions in the weighted normalized matrix, calculate the distance between the Pareto optimal solution set and the positive and negative ideal solutions, and calculate the corresponding relative proximity based on the distance; The non-dominated solution corresponding to the maximum relative proximity in the Pareto optimal solution set is taken as the optimal solution, and the position vector of the optimal solution is decoded to obtain the optimal signal modulation parameters. Based on the optimal carrier frequency in the optimal signal modulation parameters and optimal communication baud rate Configure the first frequency configuration register and the first baud rate divider of the fire alarm control panel; Based on the optimal signal voltage amplitude in the optimal signal modulation parameters Configure the fire control panel with a first programmable gain amplifier and a digital-to-analog converter; The optimal signal modulation parameters are converted into broadcast command frames, and the broadcast command frames are sent to the two-bus network as synchronization words. The synchronization words are then transmitted to the slave devices through the two-bus network.

[0015] In one optional implementation, the fire alarm control panel generates a composite voltage signal of the high-frequency carrier signal corresponding to the downlink data based on optimal signal modulation parameters, and transmits the composite voltage signal to the slave device via a two-bus network, including: In the fire alarm control panel, based on the configured first frequency configuration register and the first baud rate divider, the DDS module is controlled to generate the first base frequency square wave signal using the carrier generator; Based on the configured first programmable gain amplifier and digital-to-analog converter, a carrier generator is used to synthesize and adjust the amplitude of the first fundamental frequency square wave signal to generate a carrier frequency that conforms to the optimal frequency. The corresponding first square wave carrier signal; Based on Manchester coding, downlink data is loaded onto the first square wave carrier signal to obtain the corresponding high-frequency carrier signal, and a phase synchronization code is inserted into the frame header of the high-frequency carrier signal. A power combining circuit is used to couple and superimpose the modulated high-frequency carrier signal onto the DC power supply voltage of the two-bus network, and the composite voltage signal is transmitted to the slave device through the two-bus network.

[0016] In one optional implementation, the slave device of the fire protection system performs DC blocking processing and signal extraction on the real-time received composite voltage signal according to the synchronized optimal signal modulation parameters, extracting the included high-frequency carrier signal, including: In the slave devices of the fire protection system, the broadcast command frames of the optimal signal modulation parameters transmitted by the fire protection control panel are received in real time via a two-wire bus network. The synchronous broadcast command frames are then parsed to obtain the optimal carrier frequency of the optimal signal modulation parameters. Optimal communication baud rate and optimal signal voltage amplitude ; Based on the optimal signal voltage amplitude from the analyzed optimal signal modulation parameters Configure the slave device with a second programmable gain amplifier and analog-to-digital converter; The composite voltage signal is received in real time through a two-bus network, and the composite voltage signal is input to a DC blocking coupling circuit for DC blocking processing to obtain an AC coupling signal after removing DC bias. Based on the configured second programmable gain amplifier and analog-to-digital converter, a carrier receiver is used to adjust the amplitude and shape the waveform of the AC-coupled signal to obtain a high-frequency carrier signal.

[0017] In one optional implementation, the slave device performs phase detection and self-calibration on the local sampling clock based on the high-frequency carrier signal, and demodulates the high-frequency carrier signal based on the obtained aligned clock to extract the included downlink data, including: Based on the optimal carrier frequency in the optimal signal modulation parameters obtained from the analysis and optimal communication baud rate Configure the slave device's second frequency configuration register and second baud rate divider; Based on the configured second baud rate divider, the carrier receiver is used to start the internal clock oscillator and generate a local sampling clock. The digital logic circuit of the carrier receiver is used to detect the rising edge of the high-frequency carrier signal and calculate the time difference between the current phase of the local sampling clock and the rising edge of the high-frequency carrier signal as the phase error. Based on the phase error, a self-calibration algorithm is used to perform phase detection and self-calibration on the local sampling clock to obtain the aligned clock. Based on the position of the transition edge, the center position of each data cycle of the high-frequency carrier signal is calculated as the optimal sampling point. Then, based on the aligned clock, a signal is generated that coincides with the optimal sampling point and conforms to the optimal communication baud rate. The sampling pulse sequence; Based on the Manchester encoding method, the sampled pulse sequence is decoded to obtain the digital binary stream corresponding to the high-frequency carrier signal; Perform a CRC check on the digital binary stream. If the check passes, the data is considered valid and proceeds to the next step. Otherwise, the data is considered invalid and the corresponding digital binary stream is ignored. Based on the configured second frequency configuration register, the digital binary stream is frame parsed to identify the phase synchronization code of the frame header of the high-frequency carrier signal, locate the starting position of the high-frequency carrier signal, and extract the payload data in the middle of the digital binary stream, i.e., the downlink data.

[0018] In one optional implementation, the slave device uses asymmetric current modulation to modulate the uplink data into an asymmetric current signal, and transmits the asymmetric current signal to the fire alarm control panel, including: In the slave device, in response to a successful address match, the uplink data is digitally encoded based on the configured second frequency configuration register and Manchester encoding method to generate a digital baseband signal; Based on the configured digital-to-analog converter and the second programmable gain amplifier, waveform synthesis and amplitude adjustment are performed using the transmit link to generate a waveform that conforms to the optimal carrier frequency. The corresponding second square wave carrier signal; The digital baseband signal of the uplink data is loaded onto the second square wave carrier signal to obtain a high-frequency voltage signal. Based on the asymmetric current modulation method, the high-frequency voltage signal is loaded onto the control terminal of the programmable current source of the transmit link. A programmable current source is used to convert high-frequency voltage signals into asymmetrical current signals via a two-bus network, and the asymmetrical current signals are then transmitted to the fire alarm control panel via the two-bus network.

[0019] Secondly, embodiments of the present invention provide a fire protection system communication device based on a two-bus architecture, used to implement a fire protection system communication method. The device includes: The parameter optimization unit, downlink data modulation unit, and uplink data demodulation unit are located on the fire control panel side; The parameter optimization unit is used in the fire control panel of the fire protection system to obtain the optimal signal modulation parameters based on the mathematical model of the electrical characteristics of the two-bus network, using a multi-objective particle swarm algorithm, and to synchronize the optimal signal modulation parameters to each slave device. The downlink data modulation unit is used to generate a composite voltage signal of the high-frequency carrier signal corresponding to the downlink data in the fire control panel according to the optimal signal modulation parameters, and transmit the composite voltage signal to the slave device through a two-bus network. The uplink data demodulation unit is used in the fire alarm control panel to monitor the bus current of the two-bus network, identify the contained asymmetric current signals, perform current demodulation and data analysis on the asymmetric current signals, and extract the contained uplink data. The slave device side includes a signal extraction unit, a downlink data demodulation unit, an address matching unit, and an uplink data modulation unit. The signal extraction unit is used in the slave equipment of the fire protection system to perform DC blocking processing and signal extraction on the composite voltage signal received in real time according to the synchronous optimal signal modulation parameters, and to extract the high-frequency carrier signal contained therein. The downlink data demodulation unit is used in the slave device to perform phase detection and self-calibration on the local sampling clock according to the high-frequency carrier signal, and to perform data demodulation on the high-frequency carrier signal based on the obtained aligned clock to extract the included downlink data; The address matching unit is used to perform address matching on the address code of downlink data in the slave device. If the address matching is successful, the uplink data modulation unit is called to prepare for uplink response; otherwise, the high-frequency carrier signal extracted by the signal extraction unit is ignored. The uplink data modulation unit is used in the slave device to modulate the uplink data into an asymmetric current signal using an asymmetric current modulation method, and then transmits the asymmetric current signal to the fire control panel. A two-bus network is used to connect the fire control panel and the slave device, and to transmit the composite voltage signal sent by the fire control panel and the asymmetric current signal sent by the slave device.

[0020] A third aspect of this invention provides an electronic device, which includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by at least one processor, such that the at least one processor can perform the method proposed in the first aspect of the present invention.

[0021] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in the first aspect of the present invention. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the steps of a fire protection system communication method based on a two-bus architecture, as provided in an embodiment of the present invention. Figure 3 This is a functional unit diagram of a fire protection system communication device based on a two-bus according to an embodiment of the present invention. Detailed Implementation

[0023] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0024] The present invention will be further described below with reference to the accompanying drawings.

[0025] Reference Figure 1 , Figure 1This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present invention.

[0026] like Figure 1 As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0027] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0028] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and an electronic program for a fire protection system communication device based on a two-bus interface.

[0029] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the electronic device. The electronic device calls the electronic program of the fire protection system communication device based on two buses stored in the memory 1005 through the processor 1001 and executes the fire protection system communication method based on two buses provided in the embodiment of the present invention.

[0030] Reference Figure 2 The present invention provides a communication method for a fire protection system based on a two-bus architecture, the method comprising: S201: In the fire control panel of the fire protection system, based on the mathematical model of the electrical characteristics of the two-bus network, the multi-objective particle swarm algorithm is used to obtain the optimal signal modulation parameters and synchronize the optimal signal modulation parameters to each slave device. S202: In the fire alarm control panel, a composite voltage signal of the high-frequency carrier signal corresponding to the downlink data is generated according to the optimal signal modulation parameters, and the composite voltage signal is transmitted to the slave device through the two-bus network. S203: In the slave device of the fire protection system, according to the synchronous optimal signal modulation parameters, the real-time received composite voltage signal is subjected to DC blocking processing and signal extraction, and the high-frequency carrier signal contained therein is extracted. S204: In the slave device, the local sampling clock is phase-detected and self-calibrated according to the high-frequency carrier signal, and the high-frequency carrier signal is demodulated based on the obtained aligned clock to extract the included downlink data; S205: In the slave device, the address code of the downlink data is matched. If the address match is successful, the uplink response is prepared and the next step is initiated. Otherwise, the corresponding high-frequency carrier signal is ignored. S206: In the slave device, the uplink data is modulated into an asymmetric current signal using an asymmetric current modulation method, and the asymmetric current signal is transmitted to the fire alarm control panel. S207: In the fire alarm control panel, monitor the bus current of the two-bus network, identify the asymmetric current signal contained therein, perform current demodulation and data analysis on the asymmetric current signal, and extract the contained uplink data.

[0031] The technical solution provided in this application has at least the following beneficial effects: By establishing a mathematical model of the electrical characteristics of a two-bus network and using a multi-objective particle swarm optimization algorithm to calculate the optimal modulation parameters (carrier frequency, baud rate, and voltage amplitude) in real time, the network can adapt to different scales and line types, maximizing communication performance and enhancing adaptability. During optimization, the bit error rate is minimized and the voltage margin is maximized simultaneously, ensuring signal integrity under harsh electromagnetic environments and long-distance transmission, thus improving communication reliability. The introduction of phase detection and self-calibration mechanisms from slave devices eliminates the effects of local clock drift and delay, achieving precise bit synchronization and improving demodulation accuracy. Uplink communication uses asymmetric current modulation, while downlink uses voltage carrier, effectively distinguishing between power supply and communication signals, improving the signal-to-noise ratio, and enhancing anti-interference capabilities.

[0032] In one optional implementation, the fire control panel of the fire protection system, based on a mathematical model of the electrical characteristics of a two-bus network, uses a multi-objective particle swarm optimization algorithm to obtain the optimal signal modulation parameters and synchronize these parameters to each slave device, including: S2011: In the fire control panel of the fire protection system, the bus is regarded as a uniform long line with distributed resistance, distributed inductance and distributed capacitance, and a mathematical model of the electrical characteristics of the two-bus network is constructed according to the bus cable type and network structure. In this embodiment, long-line transmission theory (such as Telegrapher's equation) is used to model the two-bus network as a uniform long line with uniformly distributed parameters. Based on the actual type of bus cable laid (such as NH-RVS twisted pair), the distributed resistance, distributed inductance, and distributed capacitance per unit length are determined by referring to tables or through actual measurement. Combined with the actual network structure (such as bus, ring, or tree topology), the total characteristic impedance and transmission constant of the network are calculated. Through the high-precision sampling circuit built into the fire alarm control panel, the output voltage of the bus and the total loop current are collected in real time, and the signal-to-noise ratio is calculated. Simultaneously, the number of online slave devices is counted. This model can simulate the attenuation characteristics and phase shift characteristics of signals at different frequencies, as well as the voltage drop at the end of the line due to its length. S2012: Set the state vector of the two-bus network, the state vector including the total current. Main line voltage drop Signal-to-noise ratio and the number of online nodes ; In this embodiment, the total current The total bus current is collected with a period of 10ms by using a Hall sensor or sampling resistor connected in series in the main circuit. Main line voltage drop By measuring the voltage at the output terminal of the host computer Compared with the terminal voltage estimated by a specific algorithm The difference between them can be obtained; or a standard slave device can be set at the end of the loop as a reference point to transmit its voltage value back in real time. Signal-to-noise ratio During idle periods, the host detects the amplitude of high-frequency noise on the bus and calculates it by comparing it with the amplitude of the transmitted signal. Number of online nodes : Count the number of slave device addresses that returned response signals within the most recent complete polling cycle; S013: Encode the signal modulation parameters to be optimized into a position vector for a multi-objective particle swarm optimization algorithm, define the multi-objective optimization function of the multi-objective particle swarm optimization algorithm, and use the multi-objective optimization function as the fitness function. The signal modulation parameters include the carrier frequency. Communication baud rate and signal voltage amplitude ; In this embodiment, the frequency range (e.g., 10kHz-500kHz, to avoid power frequency interference), baud rate range (e.g., 1kbps-50kbps), and voltage amplitude range (limited by safety standards, e.g., below 24V peak) are set. S2014: A mathematical model of electrical characteristics based on a two-bus network, combined with state vectors, uses a multi-objective particle swarm optimization algorithm to solve the multi-objective optimization function and obtain the Pareto optimal solution set; S2015: Based on the communication mode of the fire alarm control panel, the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) is used to select the optimal signal modulation parameters from the Pareto optimal solution set and synchronize the optimal signal modulation parameters to each slave device.

[0033] In one alternative implementation, the multi-objective optimization function includes a bit error rate function and a voltage margin function; The formula for the multi-objective optimization function is:

[0034] In the formula, Signal modulation parameter vector X fitness value; Signal modulation parameter vector X The bit error rate; Signal modulation parameter vector X Voltage margin; X This is the signal modulation parameter vector, which is the position vector of the particle in the multi-objective particle swarm algorithm; It is a constant; The formula for the bit error rate function is:

[0035] In the formula, Based on the signal modulation parameter vector X The basic bit error rate is calculated using the state vector; This is the baud rate penalty factor calculated based on the state vector; The node load disturbance factor is calculated based on the state vector. Based on signal modulation parameter vector X Calculated waveform distortion factor; Based on carrier frequency The amplitude of the terminal voltage; Set the DC voltage for the host computer; For carrier frequency; For composite voltage signals at carrier frequency Phase shift under line length; Linear signal-to-noise ratio; The signal-to-noise ratio in decibels is the signal-to-noise ratio in the state vector. It is a natural constant; Signal modulation parameter vector X The communication baud rate; Maximum communication baud rate; baud rate calibration parameters; This represents the number of online nodes in the state vector, i.e., the number of online slave devices. This represents the maximum number of nodes. For load interference parameters; The formula for the voltage margin function is:

[0036] In the formula, Based on the signal modulation parameter vector X The estimated voltage at the end of the circuit is calculated using the state vector; Minimum operating voltage; Set the DC voltage for the host computer; This refers to line voltage drop loss; The main line voltage drop in the state vector; For dynamic current surges calculated based on state vectors; The total current in the state vector; For the first The probability that a slave device is in an alarm state; For the first Alarm operating current of each slave device; For slave device indication; This represents the number of online nodes in the state vector; Effective voltage; Signal modulation parameter vector X The signal voltage amplitude in; k These are voltage compensation parameters.

[0037] In one alternative implementation, based on a mathematical model of the electrical characteristics of a two-bus network, combined with state vectors, a multi-objective particle swarm optimization algorithm is used to solve the multi-objective optimization function, yielding a Pareto optimal solution set, including: S20141: Initialize the system by generating a chaotic sequence using a Logistic mapping and mapping the chaotic sequence to the solution space of the particles to obtain the initial particle swarm. The formula is:

[0038] In the formula, For the firstn+ 1. n One chaotic variable; The stability coefficient is typically 4. This sequence is ergodic and random, ensuring that the initial particle swarm is uniformly distributed in the solution space, avoiding getting trapped in local optima, which is superior to traditional random initialization. n Indicator of chaotic variables;

[0039] In the formula, For the initial particle swarm, the first i An initial particle; For the first i One chaotic variable; These are the upper and lower bounds of the search space; For particle indication;

[0040] In the formula, For the first i The initial velocity of the initial particle; A random number in the range (-1, 1); S20142: Input the candidate signal modulation parameters corresponding to each initial particle in the initial particle swarm and the state vector collected based on the candidate signal modulation parameters into the electrical characteristic mathematical model, and use the fitness function to calculate the corresponding fitness value. S20143: Based on the fitness value, perform non-dominated sorting on the initial particle swarm to obtain different non-dominated layers. Store all non-dominated solutions in the first non-dominated layer into an external archive and use the crowding distance to maintain the upper limit of the external archive's archive capacity. S20144: Introducing a convergence factor and an adaptive Cauchy mutation mechanism to update the positions of the initial particle swarm, resulting in an updated particle swarm. The formula is:

[0041] In the formula, Number of iterations t+ 1 of i The rate of update of each particle; Number of iterations t The i The update rate of each particle, which is the initial rate during the first iteration; Number of iterations t The convergence factor improves the inertia weight; Number of iterations t The globally optimal particle; Number of iterations t Thei A new particle is generated, which is the initial particle in the first iteration; Number of iterations t The i The historical optimal position of each particle; t This represents the current iteration number; The cooperation coefficient; A random number between (0, 1); i For particle indication;

[0042] In the formula, These represent the maximum and minimum values ​​of the inertia weight; This is the threshold for the number of iterations; , To adjust the parameters; It is a hyperbolic tangent function; this design results in a larger weight in the early stage, which is beneficial for global search; and a smaller weight with a gradual change in the later stage, which is beneficial for fine-grained local mining.

[0043] In the formula, Number of iterations t+ 1 of i An updated first particle; Based on the adaptive Cauchy mutation mechanism, several updated first particles are randomly selected from the updated first particle group for mutation to obtain an updated second particle group that includes several updated second particles. The formula is:

[0044] In the formula, For the first t+ In the 1st iteration of particle swarm optimization i An updated second particle; It is a standard Cauchy distributed random variable; For the first t The convergence factor of the next iteration; Integrate the updated first particle group and the updated second particle group to obtain a new particle group; S20145: Input the candidate signal modulation parameters corresponding to each updated particle in the updated particle swarm and the state vector collected based on the candidate signal modulation parameters into the electrical characteristic mathematical model, and use the fitness function to calculate the corresponding fitness value. S20146: Update the external archive based on the fitness value until the number of iterations reaches the iteration threshold, then stop iteratively updating the particle swarm and output all non-dominated solutions in the external archive as the Pareto optimal solution set.

[0045] In one alternative implementation, based on the communication mode acquired by the fire alarm control panel, the TOPSIS method is used to select the optimal signal modulation parameters from the Pareto optimal solution set, and the optimal signal modulation parameters are synchronized to each slave device, including: S20151: Using the TOPSIS method, construct the initial decision matrix of the Pareto optimal solution set, and perform normalization on the fitness values ​​of each non-dominated solution in the matrix to obtain the normalized decision matrix. The formula for the decision matrix is:

[0046] In the formula, For decision matrix; Let be the bit error rate of the non-dominated solutions from 1 to m. The voltage margin is the reciprocal of the voltage margin of the first to m nondominated solutions, i.e. , The voltage margin for the first to m nondominated solutions; m This represents the total number of non-dominated solutions in the Pareto optimal solution set.

[0047] In the formula, For the first The first non-dominated solution The normalized values ​​of the objective function form the normalized decision matrix. R ; Objective function indicator for conflict resolution multi-objective functions; This is an indicator of a non-dominated solution; S20152: Based on the current communication mode, match the parameter weighting weights and apply the parameter weighting weights to the normalized decision matrix to form a weighted normalized matrix; The formula is:

[0048] In the formula, For the first The first non-dominated solution The weighted normalized values ​​of the objective function form the weighted normalization matrix. V ; For the first The parameters of the objective function are weighted; for example, in the "fire alarm" mode, the bit error rate is given a higher weight; in the "inspection" mode, the baud rate is given a higher weight (affecting the penalty factor in the bit error rate calculation, indirectly optimizing the speed). S20153: Define the positive and negative ideal solutions in the weighted normalized matrix, calculate the distance between the Pareto optimal solution set and the positive and negative ideal solutions, and calculate the corresponding relative proximity based on the distance; Positive Ideal Solution The set of minimum values ​​for each objective function (since the objective is to be as small as possible), i.e. ,in, The minimum fitness value The weighted normalized value; Negative ideal solution The set of maximum values ​​for each objective function (since the objective is to be as small as possible), i.e. ,in, The maximum fitness value The weighted normalized value; Calculate the first The formulas for the distances from a non-dominated solution to a positive ideal solution and to a negative ideal solution are:

[0049] In the formula, For the first The distance from the normalized set of optimization objective values ​​of non-dominated solutions to the positive ideal solution; For the first The weighted normalized value of the non-dominated solution; The ideal solution;

[0050] In the formula, For the first The distance from the normalized set of optimization objective values ​​of non-dominated solutions to the negative ideal solution; It is a negative ideal solution;

[0051] In the formula, For the first The relative proximity of the non-dominated solution is between [0,1], with the closer to 1 indicating a better solution; S20154: Take the non-dominated solution corresponding to the maximum relative proximity in the Pareto optimal solution set as the optimal solution, and decode the position vector of the optimal solution to obtain the optimal signal modulation parameters; S20155: Based on the optimal carrier frequency in the optimal signal modulation parameters and optimal communication baud rate Configure the first frequency configuration register and the first baud rate divider of the fire alarm control panel; In this embodiment, based on the optimal carrier frequency in the optimal signal modulation parameters... Adjust the frequency configuration register of the carrier generator: write the control word corresponding to the carrier frequency to generate the carrier signal of the corresponding frequency; Based on the optimal communication baud rate in the optimal signal modulation parameters Configure the frequency division coefficient corresponding to the communication baud rate to control the data transmission rate; S0156: Based on the optimal signal voltage amplitude in the optimal signal modulation parameters Configure the fire control panel with a first programmable gain amplifier and a digital-to-analog converter; In this embodiment, based on the optimal signal voltage amplitude in the optimal signal modulation parameters... Set the gain coefficient of the signal voltage amplitude corresponding to the first programmable gain amplifier to make the output carrier signal amplitude reach the optimal value; Based on the optimal signal voltage amplitude in the optimal signal modulation parameters The corresponding digital code (e.g., hexadecimal 0x8000 represents half-range) is calculated and written into the digital-to-analog converter to convert this digital code into analog voltage proportionally. S20157: Convert the optimal signal modulation parameters into a broadcast command frame, send the broadcast command frame as a synchronization word to the two-bus network, and transmit the synchronization word to the slave device through the two-bus network.

[0052] In one optional implementation, the fire alarm control panel generates a composite voltage signal of the high-frequency carrier signal corresponding to the downlink data based on optimal signal modulation parameters, and transmits the composite voltage signal to the slave device via a two-bus network, including: S2021: On the fire alarm control panel, based on the configured first frequency configuration register and the first baud rate divider, the Direct Digital Synthesis (DDS) module is controlled to generate the first baseband square wave signal using a carrier generator; In this embodiment, the host controls the DDS module according to the configured optimal carrier frequency and baud rate. The DDS module generates a high-precision first fundamental frequency square wave signal based on the accumulator principle and lookup table. This signal has a stable frequency and low phase noise. S022: Based on the configured first programmable gain amplifier and digital-to-analog converter, a carrier generator is used to synthesize and adjust the amplitude of the first fundamental frequency square wave signal to generate a carrier frequency that conforms to the optimal carrier frequency. The corresponding first square wave carrier signal; In this embodiment, the first baseband square wave signal is processed by a first programmable gain amplifier and a digital-to-analog converter. The digital-to-analog converter converts the digital waveform into an analog signal. The first programmable gain amplifier adjusts the signal gain according to the optimal signal voltage amplitude so that the output amplitude can meet the signal-to-noise ratio requirements at the end and does not exceed the line withstand voltage limit, and finally generates the first square wave carrier signal. S2023: Based on Manchester coding, downlink data is loaded onto the first square wave carrier signal to obtain the corresponding high-frequency carrier signal, and a phase synchronization code is inserted into the frame header of the high-frequency carrier signal; In this embodiment, downlink data (such as control commands and addressing addresses) is modulated using Manchester encoding (for example, "1" represents a high-level transition to a low-level transition, and "0" represents a low-level transition to a high-level transition) to ensure that the signal has no DC component and carries bit synchronization information; in the frame header of the data frame, the master inserts a specific phase synchronization code (such as an alternating sequence of 55H or AAH) to assist the slave in quickly locking the clock phase. S2024: Using a power combining circuit, the modulated high-frequency carrier signal is coupled and superimposed on the DC power supply voltage of the two-bus network, and the composite voltage signal is transmitted to the slave device through the two-bus network; In this embodiment, the power combining circuit (usually composed of a high-power operational amplifier or a coupled inductor) linearly superimposes the modulated high-frequency square wave carrier signal with the main DC power supply voltage of the bus (usually 24V) to form a composite voltage signal; this signal is transmitted to each slave device on the network through the two cables of the two buses.

[0053] In one optional implementation, the slave device of the fire protection system performs DC blocking processing and signal extraction on the real-time received composite voltage signal according to the synchronized optimal signal modulation parameters, extracting the included high-frequency carrier signal, including: S2031: In the slave device of the fire protection system, the broadcast command frame of the optimal signal modulation parameters transmitted by the fire protection control panel is received in real time through a two-bus network, and the synchronized broadcast command frame is parsed to obtain the optimal carrier frequency of the optimal signal modulation parameters. Optimal communication baud rate and optimal signal voltage amplitude ; S2032: Based on the optimal signal voltage amplitude from the analyzed optimal signal modulation parameters. Configure the slave device with a second programmable gain amplifier and analog-to-digital converter; In this embodiment, the slave device configures its own hardware link according to the parsed parameters: sets the gain of the second programmable gain amplifier to match the signal amplitude of the master, configures the sampling rate of the analog-to-digital converter, and sets the second frequency configuration register; S2033: Receives composite voltage signals in real time through a two-bus network, and inputs the composite voltage signals to a DC blocking coupling circuit for DC blocking processing to obtain an AC coupling signal after removing DC bias. In this embodiment, the slave device receiving end receives the composite voltage signal through a DC blocking coupling circuit (usually composed of a high-voltage DC blocking capacitor). This circuit blocks the DC power supply voltage (24V) and only allows the AC high-frequency carrier signal to pass through, thereby obtaining an AC coupled signal after removing the DC bias. S2034: Based on the configured second programmable gain amplifier and analog-to-digital converter, a carrier receiver is used to perform amplitude adjustment and waveform shaping on the AC coupling signal to obtain a high-frequency carrier signal; In this embodiment, the AC-coupled signal is input to the carrier receiver. The carrier receiver uses a configured second programmable gain amplifier to amplify and compensate the weak signal. Then, the signal is hysteresis-comparison-shaping through a comparator or shaping circuit to restore the sine wave or distorted square wave to a digital square wave signal with steep edges, i.e., a high-frequency carrier signal.

[0054] In one optional implementation, the slave device performs phase detection and self-calibration on the local sampling clock based on the high-frequency carrier signal, and demodulates the high-frequency carrier signal based on the obtained aligned clock to extract the included downlink data, including: S2041: Based on the optimal carrier frequency in the analyzed optimal signal modulation parameters. and optimal communication baud rate Configure the slave device's second frequency configuration register and second baud rate divider; S2042: Based on the configured second baud rate divider, the carrier receiver is used to start the internal clock oscillator and generate a local sampling clock. In this embodiment, the slave carrier receiver, based on the configured optimal communication baud rate, activates the internal second baud rate divider to divide the clock generated by the internal clock oscillator (such as an RC oscillator or a low-cost crystal oscillator) to generate the initial local sampling clock. S2043: A digital logic circuit using a carrier receiver to detect the transition edge of a high-frequency carrier signal and calculate the time difference between the current phase of the local sampling clock and the transition edge of the high-frequency carrier signal as the phase error. In this embodiment, the receiver's digital logic circuit (usually implemented in the timer capture unit of the MCU) monitors the transition edge (rising edge or falling edge) of the high-frequency carrier signal in real time; it calculates the time difference between the current phase (counter value) of the local sampling clock and the moment of the carrier signal transition edge, and this time difference is the phase error; S2044: Based on the phase error, a self-calibration algorithm is used to perform phase detection and self-calibration on the local sampling clock to obtain the aligned clock; In this embodiment, the self-calibration algorithm compensates for the phase of the local sampling clock by finely adjusting the division coefficient of the second baud rate divider or dynamically adjusting the delay of the sampling trigger time (digital delay phase-locked loop principle), so that it is strictly aligned with the phase of the high-frequency carrier signal, and obtains the aligned clock. S2045: Based on the position of the transition edge, calculate the center position of each data cycle of the high-frequency carrier signal (i.e., half a bit cycle after the transition edge) as the optimal sampling point, and generate a signal that coincides with the optimal sampling point and conforms to the optimal communication baud rate based on the aligned clock. The sampling pulse sequence; S2046: Based on Manchester encoding, the sampled pulse sequence is decoded to obtain the digital binary stream corresponding to the high-frequency carrier signal; In this embodiment, the sampling pulse sequence samples the high-frequency carrier signal and decodes it based on Manchester coding rules (such as "low-high" is 1 and "high-low" is 0) to obtain a digital binary stream; S2047: Perform Cyclic Redundancy Check (CRC) on the digital binary stream. If the check passes, the data is considered valid and proceeds to the next step; otherwise, the data is considered invalid and the corresponding digital binary stream is ignored. S2048: Based on the configured second frequency configuration register, perform frame parsing on the digital binary stream, identify the phase synchronization code of the frame header of the high-frequency carrier signal, locate the start position of the high-frequency carrier signal, and extract the payload data in the middle of the digital binary stream, i.e., downlink data.

[0055] In one optional implementation, the slave device performs address matching on the address code of the downlink data. If the address match is successful, it prepares for uplink acknowledgment and proceeds to the next step; otherwise, it ignores the corresponding high-frequency carrier signal, including: S2051: Based on the starting position of the high-frequency carrier signal, the phase synchronization code is parsed to obtain the address code of the downlink data; S2052: Match the address code of the downlink data with the pre-stored address of the slave device itself; S2053: If the address match is successful, it is determined that the instruction is sent to the local machine, prepare for uplink response, and proceed to step S206. S2054: If the address match fails, it is determined that the instruction was not sent to the local machine, the corresponding high-frequency carrier signal and downlink data are ignored, and the machine remains silent.

[0056] In one optional implementation, the slave device uses asymmetric current modulation to modulate the uplink data into an asymmetric current signal, and transmits the asymmetric current signal to the fire alarm control panel, including: S2061: In the slave device, in response to a successful address match, the uplink data is digitally encoded based on the configured second frequency configuration register and Manchester encoding method to generate a digital baseband signal; In this embodiment, after the address matching is successful, the slave device reads the status data to be transmitted back (such as sensor values ​​and fault codes) as uplink data and generates a digital baseband signal based on the optimal carrier frequency and Manchester encoding method. S2062: Based on a configured digital-to-analog converter and a second programmable gain amplifier, using the transmit link, it performs waveform synthesis and amplitude adjustment to generate a waveform that conforms to the optimal carrier frequency. The corresponding second square wave carrier signal; S2063: Load the digital baseband signal of the uplink data onto the second square wave carrier signal to obtain a high-frequency voltage signal, and load the high-frequency voltage signal onto the control terminal of the programmable current source of the transmit link based on the asymmetric current modulation method. In this embodiment, the modulated high-frequency voltage signal is loaded onto the control terminal of the programmable current source (or voltage-controlled current source) of the transmission link, and the programmable current source adjusts the current absorbed from the bus according to the amplitude of the input signal. S2064: Uses a programmable current source to convert high-frequency voltage signals into asymmetrical current signals via a two-bus network, and transmits the asymmetrical current signals to the fire alarm control panel via the two-bus network; In this embodiment, the method for generating the asymmetric current signal is as follows: when sending a logic "1", the current source is controlled to increase by a constant current increment; when sending a logic "0", the current source is controlled to remain static or increase by a small current (or vice versa). This asymmetrical current change (e.g., +20mA represents 1, +0mA represents 0) is superimposed on the bus load current, forming an asymmetrical current signal.

[0057] In one alternative implementation, the fire alarm control panel monitors the bus current of the two-bus network, identifies the contained asymmetric current signals, performs current demodulation and data analysis on the asymmetric current signals, and extracts the contained uplink data, including: S2071: In the fire alarm control panel, the total current of the two-bus network is monitored in real time through a high-precision sampling resistor, which converts the current signal into a voltage signal. S2072: Using a bandpass filter or digital signal processing algorithm (such as Fast Fourier Transform (FFT)), the current ripple of a specific frequency (optimal carrier frequency) is separated from the sampled voltage to identify the asymmetric current signal sent by the slave device. S2073: Detects the amplitude change of the current ripple of the asymmetric current signal, maps the high-level current to logic "1" and the low-level current to logic "0", completes the current demodulation, and obtains the demodulated signal; S2074: Performs Manchester decoding and verification on the demodulated signal, extracts uplink data (such as analog values ​​of sensors and alarm status), and completes the entire two-way communication process.

[0058] This invention also provides a fire protection system communication device 300 based on a two-bus architecture, see reference. Figure 3 The device may include the following units: The parameter optimization unit 3011, downlink data modulation unit 3012, and uplink data demodulation unit 3013 are located on the fire control panel side 301; The parameter optimization unit is used in the fire control panel of the fire protection system to obtain the optimal signal modulation parameters based on the mathematical model of the electrical characteristics of the two-bus network, using a multi-objective particle swarm algorithm, and to synchronize the optimal signal modulation parameters to each slave device. The downlink data modulation unit is used to generate a composite voltage signal of the high-frequency carrier signal corresponding to the downlink data in the fire control panel according to the optimal signal modulation parameters, and transmit the composite voltage signal to the slave device through a two-bus network. The uplink data demodulation unit is used in the fire alarm control panel to monitor the bus current of the two-bus network, identify the contained asymmetric current signals, perform current demodulation and data analysis on the asymmetric current signals, and extract the contained uplink data. The signal extraction unit 3021, downlink data demodulation unit 3022, address matching unit 3023, and uplink data modulation unit 3024 are located on the slave device side 302; The signal extraction unit is used in the slave equipment of the fire protection system to perform DC blocking processing and signal extraction on the composite voltage signal received in real time according to the synchronous optimal signal modulation parameters, and to extract the high-frequency carrier signal contained therein. The downlink data demodulation unit is used in the slave device to perform phase detection and self-calibration on the local sampling clock according to the high-frequency carrier signal, and to perform data demodulation on the high-frequency carrier signal based on the obtained aligned clock to extract the included downlink data; The address matching unit is used to perform address matching on the address code of downlink data in the slave device. If the address matching is successful, the uplink data modulation unit is called to prepare for uplink response; otherwise, the high-frequency carrier signal extracted by the signal extraction unit is ignored. The uplink data modulation unit is used in the slave device to modulate the uplink data into an asymmetric current signal using an asymmetric current modulation method, and then transmits the asymmetric current signal to the fire control panel. The two-bus network 303 is used to connect the fire control panel side and the slave device side, and to transmit the composite voltage signal sent by the fire control panel side and the asymmetric current signal sent by the slave device side.

[0059] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; The processor, when executing the program stored in the memory, implements the fire protection system communication method based on a two-bus according to the present invention.

[0060] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EI) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned terminal and other devices. The memory can include Random Access Memory (RAM), or non-volatile memory, such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.

[0061] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0062] Furthermore, to achieve the above objectives, embodiments of the present invention also propose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the fire protection system communication method based on a two-bus according to embodiments of the present invention.

[0063] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable hardware devices (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0064] The embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (apparatus), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0065] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0067] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. "And / or" indicates that either one or both can be chosen. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the element.

[0068] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A communication method for a fire protection system based on a two-bus architecture, characterized in that, The method includes: In the fire control panel of the fire protection system, based on the mathematical model of the electrical characteristics of the two-bus network, the multi-objective particle swarm algorithm is used to obtain the optimal signal modulation parameters and synchronize the optimal signal modulation parameters to each slave device. In the fire alarm control panel, a composite voltage signal of the high-frequency carrier signal corresponding to the downlink data is generated according to the optimal signal modulation parameters, and the composite voltage signal is transmitted to the slave device through a two-bus network. In the slave device of the fire protection system, the composite voltage signal received in real time is subjected to DC blocking processing and signal extraction according to the synchronous optimal signal modulation parameters, and the high-frequency carrier signal contained therein is extracted. In the slave device, the local sampling clock is phase-detected and self-calibrated according to the high-frequency carrier signal, and the high-frequency carrier signal is demodulated based on the obtained aligned clock to extract the included downlink data. In the slave device, the address code of the downlink data is matched. If the address match is successful, the uplink response is prepared and the next step is initiated. Otherwise, the corresponding high-frequency carrier signal is ignored. In the slave device, an asymmetric current modulation method is used to modulate the uplink data into an asymmetric current signal, and the asymmetric current signal is transmitted to the fire control panel. In the fire alarm control panel, the bus current of the two-bus network is monitored, the asymmetric current signal contained therein is identified, the asymmetric current signal is demodulated and analyzed, and the uplink data contained therein is extracted.

2. The fire protection system communication method based on a two-bus according to claim 1, characterized in that, In the fire control panel of the fire protection system, based on the mathematical model of the electrical characteristics of a two-bus network, a multi-objective particle swarm optimization algorithm is used to obtain the optimal signal modulation parameters, and these optimal signal modulation parameters are synchronized to each slave device, including: In the fire control panel of the fire protection system, the bus is regarded as a uniform long line with distributed resistance, distributed inductance and distributed capacitance, and a mathematical model of the electrical characteristics of the two-bus network is constructed according to the bus cable type and network structure. Define the state vector of the two-bus network, the state vector including the total current. Main line voltage drop Signal-to-noise ratio and the number of online nodes ; The signal modulation parameters to be optimized are encoded into position vectors for a multi-objective particle swarm optimization (MPS) algorithm. A multi-objective optimization function for the MPS algorithm is defined and used as the fitness function. The signal modulation parameters include the carrier frequency. Communication baud rate and signal voltage amplitude ; Based on the electrical characteristic mathematical model of the two-bus network, combined with the state vector, the multi-objective particle swarm optimization algorithm is used to solve the multi-objective optimization function and obtain the Pareto optimal solution set. Based on the communication mode acquired by the fire alarm control panel, the TOPSIS method is used to select the optimal signal modulation parameters from the Pareto optimal solution set and synchronize the optimal signal modulation parameters to each slave device.

3. The fire protection system communication method based on a two-bus according to claim 2, characterized in that, The multi-objective optimization function includes a bit error rate function and a voltage margin function; The formula for the multi-objective optimization function is: In the formula, Signal modulation parameter vector X fitness value; Signal modulation parameter vector X The bit error rate; Signal modulation parameter vector X Voltage margin; X This is the signal modulation parameter vector, which is the position vector of the particle in the multi-objective particle swarm algorithm; It is a constant; The formula for the bit error rate function is: In the formula, Based on the signal modulation parameter vector X The basic bit error rate is calculated using the state vector; This is the baud rate penalty factor calculated based on the state vector; The node load disturbance factor is calculated based on the state vector. Based on signal modulation parameter vector X Calculated waveform distortion factor; The formula for the voltage margin function is: In the formula, Based on the signal modulation parameter vector X The estimated voltage at the end of the circuit is calculated using the state vector; This is the minimum operating voltage.

4. The fire protection system communication method based on a two-bus according to claim 3, characterized in that, Based on a mathematical model of the electrical characteristics of a two-bus network, combined with state vectors, a multi-objective particle swarm optimization algorithm is used to solve the multi-objective optimization function, yielding a Pareto optimal solution set, including: Initialize the particle swarm by generating a chaotic sequence using a Logistic mapping and mapping the chaotic sequence to the solution space of the particles. The candidate signal modulation parameters corresponding to each initial particle in the initial particle swarm and the state vector acquired based on the candidate signal modulation parameters are input into the electrical characteristic mathematical model, and the fitness function is used to calculate the corresponding fitness value. Based on the fitness value, the initial particle swarm is sorted into different non-dominated layers. All non-dominated solutions in the first non-dominated layer are stored in the external archive, and the upper limit of the archive capacity of the external archive is maintained by the crowding distance. By introducing a convergence factor and an adaptive Cauchy mutation mechanism, the initial particle swarm is updated to obtain an updated particle swarm. The candidate signal modulation parameters corresponding to each updated particle in the updated particle swarm and the state vector collected based on the candidate signal modulation parameters are input into the electrical characteristic mathematical model, and the fitness function is used to calculate the corresponding fitness value. Based on the fitness value, update the external archive until the number of iterations reaches the iteration threshold, then stop iterating and updating the particle swarm, and output all non-dominated solutions in the external archive as the Pareto optimal solution set.

5. The fire protection system communication method based on a two-bus according to claim 4, characterized in that, Based on the communication mode acquired by the fire alarm control panel, the TOPSIS method is used to select the optimal signal modulation parameters from the Pareto optimal solution set, and the optimal signal modulation parameters are synchronized to each slave device, including: Using the TOPSIS method, an initial decision matrix for the Pareto optimal solution set is constructed, and the fitness values ​​of each non-dominated solution in the matrix are normalized to obtain a normalized decision matrix. Based on the current communication mode, the parameter weights are matched and applied to the normalized decision matrix to form a weighted normalized matrix. Define the positive and negative ideal solutions in the weighted normalized matrix, calculate the distance between the Pareto optimal solution set and the positive and negative ideal solutions, and calculate the corresponding relative proximity based on the distance; The non-dominated solution corresponding to the maximum relative proximity in the Pareto optimal solution set is taken as the optimal solution, and the position vector of the optimal solution is decoded to obtain the optimal signal modulation parameters. Based on the optimal carrier frequency in the optimal signal modulation parameters and optimal communication baud rate Configure the first frequency configuration register and the first baud rate divider of the fire alarm control panel; Based on the optimal signal voltage amplitude in the optimal signal modulation parameters Configure the fire control panel with a first programmable gain amplifier and a digital-to-analog converter; The optimal signal modulation parameters are converted into broadcast command frames, and the broadcast command frames are sent to the two-bus network as synchronization words. The synchronization words are then transmitted to the slave devices through the two-bus network.

6. The fire protection system communication method based on a two-bus according to claim 5, characterized in that, In the fire alarm control panel, a composite voltage signal of the high-frequency carrier signal corresponding to the downlink data is generated according to the optimal signal modulation parameters, and the composite voltage signal is transmitted to the slave device through a two-bus network, including: In the fire alarm control panel, based on the configured first frequency configuration register and the first baud rate divider, the DDS module is controlled to generate the first base frequency square wave signal using the carrier generator; Based on the configured first programmable gain amplifier and digital-to-analog converter, a carrier generator is used to synthesize and adjust the amplitude of the first fundamental frequency square wave signal to generate a carrier frequency that conforms to the optimal frequency. The corresponding first square wave carrier signal; Based on Manchester coding, downlink data is loaded onto the first square wave carrier signal to obtain the corresponding high-frequency carrier signal, and a phase synchronization code is inserted into the frame header of the high-frequency carrier signal. A power combining circuit is used to couple and superimpose the modulated high-frequency carrier signal onto the DC power supply voltage of the two-bus network, and the composite voltage signal is transmitted to the slave device through the two-bus network.

7. The fire protection system communication method based on a two-bus according to claim 6, characterized in that, In the slave device of the fire protection system, based on the synchronized optimal signal modulation parameters, DC blocking processing and signal extraction are performed on the real-time received composite voltage signal, extracting the included high-frequency carrier signal, including: In the slave devices of the fire protection system, the broadcast command frames of the optimal signal modulation parameters transmitted by the fire protection control panel are received in real time via a two-wire bus network. The synchronous broadcast command frames are then parsed to obtain the optimal carrier frequency of the optimal signal modulation parameters. Optimal communication baud rate and optimal signal voltage amplitude ; Based on the optimal signal voltage amplitude from the analyzed optimal signal modulation parameters Configure the slave device with a second programmable gain amplifier and analog-to-digital converter; The composite voltage signal is received in real time through a two-bus network, and the composite voltage signal is input to a DC blocking coupling circuit for DC blocking processing to obtain an AC coupling signal after removing DC bias. Based on the configured second programmable gain amplifier and analog-to-digital converter, a carrier receiver is used to adjust the amplitude and shape the waveform of the AC-coupled signal to obtain a high-frequency carrier signal.

8. The fire protection system communication method based on a two-bus according to claim 7, characterized in that, In the slave device, based on the high-frequency carrier signal, phase detection and self-calibration are performed on the local sampling clock, and based on the obtained aligned clock, data demodulation is performed on the high-frequency carrier signal to extract the included downlink data, including: Based on the optimal carrier frequency in the optimal signal modulation parameters obtained from the analysis and optimal communication baud rate Configure the slave device's second frequency configuration register and second baud rate divider; Based on the configured second baud rate divider, the carrier receiver is used to start the internal clock oscillator and generate a local sampling clock. The digital logic circuit of the carrier receiver is used to detect the rising edge of the high-frequency carrier signal and calculate the time difference between the current phase of the local sampling clock and the rising edge of the high-frequency carrier signal as the phase error. Based on the phase error, a self-calibration algorithm is used to perform phase detection and self-calibration on the local sampling clock to obtain the aligned clock. Based on the position of the transition edge, the center position of each data cycle of the high-frequency carrier signal is calculated as the optimal sampling point. Then, based on the aligned clock, a signal is generated that coincides with the optimal sampling point and conforms to the optimal communication baud rate. The sampling pulse sequence; Based on the Manchester encoding method, the sampled pulse sequence is decoded to obtain the digital binary stream corresponding to the high-frequency carrier signal; Perform a CRC check on the digital binary stream. If the check passes, the data is considered valid and proceeds to the next step. Otherwise, the data is considered invalid and the corresponding digital binary stream is ignored. Based on the configured second frequency configuration register, the digital binary stream is frame parsed to identify the phase synchronization code of the frame header of the high-frequency carrier signal, locate the starting position of the high-frequency carrier signal, and extract the payload data in the middle of the digital binary stream, i.e., the downlink data.

9. The fire protection system communication method based on a two-bus according to claim 8, characterized in that, In the slave device, an asymmetric current modulation method is used to modulate the uplink data into an asymmetric current signal, and the asymmetric current signal is transmitted to the fire alarm control panel, including: In the slave device, in response to a successful address match, the uplink data is digitally encoded based on the configured second frequency configuration register and Manchester encoding method to generate a digital baseband signal; Based on the configured digital-to-analog converter and the second programmable gain amplifier, waveform synthesis and amplitude adjustment are performed using the transmit link to generate a waveform that conforms to the optimal carrier frequency. The corresponding second square wave carrier signal; The digital baseband signal of the uplink data is loaded onto the second square wave carrier signal to obtain a high-frequency voltage signal. Based on the asymmetric current modulation method, the high-frequency voltage signal is loaded onto the control terminal of the programmable current source of the transmit link. A programmable current source is used to convert high-frequency voltage signals into asymmetrical current signals via a two-bus network, and the asymmetrical current signals are then transmitted to the fire alarm control panel via the two-bus network.

10. A fire protection system communication device based on a two-bus architecture, used to implement the fire protection system communication method as described in any one of claims 1-9, characterized in that, The device includes: The parameter optimization unit, downlink data modulation unit, and uplink data demodulation unit are located on the fire control panel side; The parameter optimization unit is used in the fire control panel of the fire protection system to obtain the optimal signal modulation parameters based on the mathematical model of the electrical characteristics of the two-bus network, using a multi-objective particle swarm algorithm, and to synchronize the optimal signal modulation parameters to each slave device. The downlink data modulation unit is used to generate a composite voltage signal of the high-frequency carrier signal corresponding to the downlink data in the fire control panel according to the optimal signal modulation parameters, and transmit the composite voltage signal to the slave device through a two-bus network. The uplink data demodulation unit is used in the fire alarm control panel to monitor the bus current of the two-bus network, identify the contained asymmetric current signals, perform current demodulation and data analysis on the asymmetric current signals, and extract the contained uplink data. The slave device side includes a signal extraction unit, a downlink data demodulation unit, an address matching unit, and an uplink data modulation unit. The signal extraction unit is used in the slave equipment of the fire protection system to perform DC blocking processing and signal extraction on the composite voltage signal received in real time according to the synchronous optimal signal modulation parameters, and to extract the high-frequency carrier signal contained therein. The downlink data demodulation unit is used in the slave device to perform phase detection and self-calibration on the local sampling clock according to the high-frequency carrier signal, and to perform data demodulation on the high-frequency carrier signal based on the obtained aligned clock to extract the included downlink data; The address matching unit is used to perform address matching on the address code of downlink data in the slave device. If the address matching is successful, the uplink data modulation unit is called to prepare for uplink response; otherwise, the high-frequency carrier signal extracted by the signal extraction unit is ignored. The uplink data modulation unit is used in the slave device to modulate the uplink data into an asymmetric current signal using an asymmetric current modulation method, and then transmits the asymmetric current signal to the fire control panel. A two-bus network is used to connect the fire control panel and the slave device, and to transmit the composite voltage signal sent by the fire control panel and the asymmetric current signal sent by the slave device.