Beidou satellite-based intelligent street lamp system communication delay optimization method and system
By forming a Bluetooth LAN in the smart street light system and using Beidou satellite to communicate with the first-level street lights, and combining with the Kalman filtering algorithm to correct the second-level street light clock, the communication delay problem of the smart street light system is solved, and time synchronization and communication efficiency optimization is achieved.
Patent Information
- Application Number
- CN202510590478.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-05-08
AI Technical Summary
The communication delay problem based on Beidou satellite in the smart street light system leads to time deviation, affecting the implementation of lighting strategy and data acquisition accuracy. The existing technology has problems caused by contradiction between timing accuracy and delay, high hardware costs and delay caused by failure.
By using Bluetooth modules to form a local area network in the smart street light system, street lights are divided into first-level and second-level, Beidou satellite communicates with first-level street lights, combined with Kalman filtering algorithm to correct the second-level street light clock, set the message data priority, and realize time synchronization and communication efficiency optimization.
It reduces the time synchronization error caused by Beidou satellite signal transmission delay, reduces system cost and complexity, solves the communication delay caused by street light failure, and improves communication efficiency and accurate system control.
Smart Images

Figure CN120379017A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication delay optimization, and particularly to a method and system for optimizing communication delay of a smart street lamp system based on Beidou satellites. Background Art
[0002] As the core infrastructure of a smart city, smart street lamps are realizing the transformation from traditional lighting to smart entities. By using technologies such as the Internet of Things, sensors, and cloud computing, functions such as single-lamp remote control, light efficiency adaptive adjustment, and active fault alarm are achieved. Various types of smart street lamp projects have been proposed for construction. For example, combining smart lamp poles with 5G base stations to achieve full signal coverage; using a mobile phone APP or a computer to remotely control the switch and brightness of smart street lamps.
[0003] Combining smart street lamps with Beidou satellites is beneficial to realizing the precise positioning of smart street lamps. The high-precision positioning function of Beidou satellites can accurately mark the geographical location of each smart street lamp. Combining with a Geographic Information System (GIS) map, the position of the street lamp can be quickly located, which helps to better manage assets, including the installation, maintenance, replacement, etc. of street lamps, and realize the rational allocation of resources. For example, during urban road maintenance or emergency rescue, staff can quickly find the position of the street lamp that needs to be turned off or repaired through Beidou positioning. At the same time, it is beneficial to ensure that smart street lamps have a unified time reference, which is conducive to more coordinated data collection and transmission of each functional module of smart street lamps with multiple functions, facilitating subsequent data processing and analysis, and providing accurate and reliable information for urban management. For example, in some scenarios where the brightness of street lamps needs to be automatically adjusted according to sunrise and sunset times, accurate timekeeping can ensure that the street lamps are adjusted in brightness according to the accurate time.
[0004] However, while the smart street lamp system based on Beidou satellites realizes high-precision positioning and timekeeping, the communication delay problem has become the core technical bottleneck restricting its large-scale application. The time deviation caused by communication delay may cause chaos in the execution of lighting strategies and distortion of data collection. The segmented dimming of street lamps depends on an accurate time reference. If the clock deviation of each lamp pole exceeds 5 seconds, the phenomenon of "local lighting and local extinguishing" may occur, affecting road safety. The current mainstream time synchronization technologies have the following deficiencies in dealing with the communication delay of the smart street lamp control system: (1) The contradiction between timekeeping accuracy and delay: Although the timekeeping accuracy of Beidou satellites can reach 20 nanoseconds, the signal transmission delay causes the actual synchronization error to be amplified; (2) The cost and complexity of hybrid communication: Using a "Beidou + 5G" dual-link can reduce delay, but it will increase the hardware cost (for example, each street lamp needs to deploy a Beidou terminal and a 5G module at the same time); (3) The communication delay caused by faults will affect the control of the street lamp system. Summary of the Invention
[0005] The object of the present invention is to provide a communication delay optimization method for a smart street lamp system based on Beidou satellites. By performing time synchronization correction on the street lamp control system, the accumulation of communication delay is significantly reduced, and the communication efficiency is improved. By selecting a primary street lamp in the street lamp control system to establish communication with Beidou satellites, the time synchronization error caused by the transmission delay of Beidou satellite signals is reduced. The mode of combining Beidou satellite communication with Bluetooth module communication is adopted to reduce the cost and complexity of the smart street lamp system. Solving the communication delay caused by message data conflicts and street lamp failures is beneficial to the accurate control of the street lamp system.
[0006] The technical solution proposed by the present invention is a communication delay optimization method for a smart street lamp system based on Beidou satellites, including the following steps:
[0007] S1: In the smart street lamp control system, street lamps within adjacent geographical ranges form a local area network through Bluetooth communication modules;
[0008] The street lamps are divided into primary street lamps and secondary street lamps;
[0009] There is 1 primary street lamp in each local area network, and the rest are secondary street lamps;
[0010] There are shared secondary street lamps in adjacent local area networks;
[0011] S2: In the normal communication mode, the primary street lamp in the same local area network forwards message data to the secondary street lamps;
[0012] Taking the clock of the primary street lamp as the standard, correct the clock of the secondary street lamps;
[0013] S3: In the interactive communication mode, the secondary street lamp that receives the latest message data in the same local area network forwards the message data to other secondary street lamps;
[0014] Taking the clock of the secondary street lamp that receives the latest message data as the standard, correct the clocks of other secondary street lamps;
[0015] S4: In the feedback communication mode, the shared secondary street lamp that receives the latest message data in the same local area network forwards the message data to the primary street lamp;
[0016] Taking the clock of the shared secondary street lamp that receives the latest message data as the standard, correct the clock of the primary street lamp;
[0017] S5: When the primary street lamp receives message data from Beidou satellites, call step S2 and enter the normal communication mode;
[0018] If the primary street lamp does not receive message data within the maximum waiting time tmax1, call step S4 and enter the feedback communication mode;
[0019] If the secondary street lamp does not receive the message data within the maximum waiting time tmax2, call step S3 to enter the interactive communication mode;
[0020] S6: The primary street lamp and the secondary street lamp respectively set the message data priorities;
[0021] When the primary street lamp or the secondary street lamp receives multiple message data at the same time, make a selection according to the message data priorities.
[0022] Optionally, the S1 includes:
[0023] In each local area network, select the street lamp located in the middle geographically as the primary street lamp, and the remaining street lamps as secondary street lamps;
[0024] The primary street lamp is installed with a Beidou satellite communication module for receiving the message data of Beidou satellites; the secondary street lamps receive the Beidou satellite message data through the forwarding of the primary street lamp;
[0025] There are three communication modes in the local area network: normal communication mode, interactive communication mode, and feedback communication mode;
[0026] Among them, the normal communication model is that the primary street lamp receives the message data from Beidou satellites, and the primary street lamp forwards the message data to the secondary street lamps;
[0027] The interactive communication mode is that the secondary street lamps forward the message data among themselves;
[0028] The feedback communication model is that the secondary street lamps forward the message data to the primary street lamp.
[0029] Optionally, the S2 includes:
[0030] S21: According to the time and power when the secondary street lamp receives the message data, adopt Kalman filtering to estimate the distance between the primary street lamp and the secondary street lamps;
[0031] S22: According to the estimated distance between the primary street lamp and the secondary street lamps, calculate the propagation delay between the primary street lamp and the secondary street lamps; according to the propagation delay, taking the clock of the primary street lamp as the standard, correct the clock of the secondary street lamp to align the clock of the secondary street lamp with the clock of the primary street lamp.
[0032] Optionally, the S21 includes:
[0033] There is a primary street lamp a and secondary street lamps b1, b2,..., bn in the local area network, where n represents the number of secondary street lamps in the local area network, and the primary street lamp a forwards the message data of Beidou satellites to the secondary street lamps b1, b2,..., bn;
[0034] Based on the distance between the primary street lamp and the secondary street lamps, construct a state vector:
[0035] Snor t = [d ab1,t , d ab2,t , …, d abn,t T
[0036] Among them, Snor t represents the state vector estimated based on the t-th packet data in the normal communication mode, and d ab1 represents the distance between the first-level street lamp a and the second-level street lamp b1 estimated based on the t-th packet data, and d ab2 represents the distance between the first-level street lamp a and the second-level street lamp b2 estimated based on the t-th packet data, and d abn represents the distance between the first-level street lamp a and the second-level street lamp bn estimated based on the t-th packet data, [] T represents the transpose matrix;
[0037] The state vector predicted based on the t-th packet data is:
[0038] Snor t+1|t = Fnor t · Snor t + Wnor t
[0039] Among them, Snor t+1|t represents the state vector predicted based on the t-th packet data in the normal communication mode, Fnor t represents the state transition matrix in the normal communication mode, and Wnor t represents the noise gain matrix in the normal communication mode;
[0040] The Kalman gain is expressed as:
[0041]
[0042] Among them, Knor t+1 represents the Kalman gain in the normal communication mode, Pnor t+1|t represents the covariance matrix in the normal communication mode, Hnor t represents the measurement matrix in the normal communication mode, represents the transpose matrix of the measurement matrix in the normal communication mode, Rnor t+1 represents the measurement noise covariance matrix in the normal communication mode, () -1 represents the inverse matrix;
[0043] The state vector is updated as:
[0044] Snor t+1 = Snor t+1|t + Knor t+1 ·(Znor t+1 -hnor(Snor t+1|t ))
[0045] where Snor t+1 represents the state vector updated based on the (t + 1)-th packet data in the normal communication mode, Znor t+1 represents the measurement vector obtained based on the (t + 1)-th packet data in the normal communication mode, and hnor() represents the measurement function in the normal communication mode;
[0046] Znor t+1 = [Trecnor ab1,t+1 , …, Trecnor abn,t+1 , Pnor ab1,t+1 , …, Pnor abn,t+1
[0047] where Trecnor ab1,t+1 represents the time when the secondary street lamp b1 receives the (t + 1)-th packet data from the primary street lamp a in the normal communication mode, Trecnor abn,t+1 represents the time when the secondary street lamp b n receives the (t + 1)-th packet data from the primary street lamp a in the normal communication mode, Pnor ab1,t+1 represents the power when the secondary street lamp b1 receives the (t + 1)-th packet data from the primary street lamp a in the normal communication mode, Pnor abn,t+1 represents the power when the secondary street lamp b n receives the (t + 1)-th packet data from the primary street lamp a in the normal communication mode;
[0048] In the normal communication mode, the following relationships exist between the time and power when the secondary street lamp receives the packet data and the distance between the primary street lamp and the secondary street lamp:
[0049] Trecnor ab1,t+1 = Ttrnor a,t+1 + d ab1 / velo
[0050] Trecnor abn,t+1 = Ttrnor a,t+1 + d abn / velo
[0051] Pnor ab1,t+1 = power - 10·loss·log 10 (d ab1 / distance)+ Gauss t+1
[0052] Pnor abn,t+1 = power - 10·loss·log 10 (d abn / distance) + Gauss t+1
[0053] where Ttrnor a,t+1 represents the time when the first - level street lamp sends the (t + 1)-th message data in the normal communication mode, d ab1 represents the distance variable between the first - level street lamp a and the second - level street lamp b1, d abn represents the distance variable between the first - level street lamp a and the second - level street lamp b n The distance variable between them, velo represents the propagation speed of the message data, power represents the received power at the reference distance distance, loss represents the path loss exponent, Gauss t+1 represents zero - mean Gaussian shadow fading;
[0054] Based on the updated state vector Snor t+1 = [d ab1,t+1 , …, d abn,t+1 T , the distance estimates d n between the first - level street lamp a and the second - level street lamps b1, b2, …, b ab1,t+1 , …, d abn,t+1 are obtained.
[0055] Optionally, the S3 includes:
[0056] S31: The second - level street lamp records the received message data timestamp;
[0057] Each second - level street lamp periodically broadcasts the recorded timestamp;
[0058] Each second - level street lamp compares the received timestamp with its own recorded timestamp;
[0059] For the second - level street lamp, when its own recorded timestamp is earlier than the received timestamp, it stops periodic broadcasting;
[0060] For the second - level street lamp, when its own recorded timestamp is later than the received timestamp, it continues to periodically broadcast the recorded timestamp;
[0061] After the arbitration time, the second - level street lamp in the broadcasting state is selected as the second - level street lamp that has received the latest message data, and other second - level street lamps are in the receiving state;
[0062] The second - level street lamp that has received the latest message data forwards the message data to other second - level street lamps;
[0063] S32: According to the time and power at which other secondary street lamps receive message data, use Kalman filtering to estimate the distance between the secondary street lamp that receives the latest message data and other secondary street lamps;
[0064] S33: According to the estimated distance between the secondary street lamp that receives the latest message data and other secondary street lamps, calculate the propagation delay between the secondary street lamp that receives the latest message data and other secondary street lamps; according to the propagation delay, using the clock of the secondary street lamp that receives the latest message data as a standard, correct the clocks of other secondary street lamps so that the clocks of other secondary street lamps are aligned with the clock of the secondary street lamp that receives the latest message data.
[0065] Optionally, the S32 includes:
[0066] In the local area network, there are secondary street lamps b1, b2,..., bn. The secondary street lamp b1 forwards message data to other secondary street lamps b2,..., bn. Based on the distances between the secondary street lamp b1 and other secondary street lamps b2,..., bn, construct a state vector:
[0067] Sint t =[d b1b2,t ,d b1b3,t ,…,d b1bn,t T
[0068] Among them, Sint t represents the state vector estimated based on the t-th message data in the interactive communication mode, d b1b2 represents the distance between the secondary street lamp b1 and the secondary street lamp b2 estimated based on the t-th message data, d b1b3 represents the distance between the secondary street lamp b1 and the secondary street lamp b3 estimated based on the t-th message data, d b1bn represents the distance between the secondary street lamp b1 and the secondary street lamp b n estimated based on the t-th message data, [] T represents the transpose matrix;
[0069] The predicted state vector based on the t-th message data is:
[0070] Sint t+1|t =Fint t ·Sint t +Wint t
[0071] Among them, Sint t+1|t represents the state vector predicted based on the t-th message data in the interactive communication mode, Fint t represents the state transition matrix in the interactive communication mode, Wint t The noise gain matrix representing the interactive communication mode;
[0072] The Kalman gain is expressed as:
[0073]
[0074] where Kint t+1 represents the Kalman gain of the interactive communication mode, Pint t+1|t represents the covariance matrix of the interactive communication mode, Hint t represents the measurement matrix of the interactive communication mode, represents the transpose matrix of the measurement matrix of the interactive communication mode, Rint t+1 represents the measurement noise covariance matrix of the interactive communication mode, () -1 represents the inverse matrix;
[0075] The state vector is updated to:
[0076] Sint t+1 = Sint t+1|t + Kint t+1 ·(Zint t+1 - hint(Sint t+1|t ))
[0077] where Sint t+1 represents the state vector updated based on the (t + 1)-th message data in the interactive communication mode, Zint t+1 represents the measurement vector obtained based on the (t + 1)-th message data in the interactive communication mode, hint() represents the measurement function of the interactive communication mode;
[0078] Zint t+1 = [Trecint b1b2,t+1 ,…, Trecint b1bn,t+1 , Pint b1b2,t+1 ,…, Pint b1bn,t+1
[0079] where Trecint b1b2,t+1 represents the time when the secondary street lamp b2 receives the (t + 1)-th message data from the secondary street lamp b1 in the interactive communication mode, Trecint b1bn,t+1 represents the time when the secondary street lamp b n receives the (t + 1)-th message data from the secondary street lamp b1 in the interactive communication mode, Pint b1b2,t+1 represents the power when the secondary street lamp b2 receives the (t + 1)-th message data from the secondary street lamp b1 in the interactive communication mode, Pint b1bn,t+1 represents the power when the secondary street lamp b n The power of the (t + 1)-th message data received from the secondary street lamp b1
[0080] In the interactive communication mode, the following relationship exists between the time and power at which other secondary street lamps receive message data and the distance between the secondary street lamp that receives the latest message data and other secondary street lamps:
[0081] Trecint b1b2,t+1 = Ttrint b1,t+1 + d b1b2 / velo
[0082] Trecint b1bn,t+1 = Ttrint b1,t+1 + d b1bn / velo
[0083] Pint b1b2,t+1 = power - 10·loss·log 10 (d b1b2 / distance)+ Gauss t+1
[0084] Pint b1bn,t+1 = power - 10·loss·log 10 (d b1bn / distance)+ Gauss t+1
[0085] Among them, Ttrint b1,t+1 represents the time when the secondary street lamp b1 sends the (t + 1)-th message data in the interactive communication mode, d b1b2 represents the distance variable between the secondary street lamp b1 and the secondary street lamp b2, d b1bn represents the distance variable between the secondary street lamp b1 and the secondary street lamp b n ..., velo represents the propagation speed of the message data, power represents the received power at the reference distance distance, loss represents the path loss exponent, Gauss t+1 represents zero-mean Gaussian shadow fading;
[0086] Based on the updated state vector Sint t+1 = [d b1b2,t+1 , …, d b1bn,t+1 T , the distance estimates d n between the secondary street lamp b1 that receives the latest message data and other secondary street lamps b2, …, b b1b2,t+1 , …, d b1bn,t+1 are obtained.
[0087] Optionally, the S4 includes:
[0088] S41: The shared secondary streetlights will record the timestamp of the received message data;
[0089] Each shared secondary streetlight sends the recorded timestamp to the primary streetlight;
[0090] The primary streetlight selects the shared secondary streetlight with the latest timestamp as the shared secondary streetlight that has received the latest message data;
[0091] S42: According to the time and power when the primary streetlight receives the message data, use Kalman filtering to estimate the distance between the shared secondary streetlight that has received the latest message data and the primary streetlight;
[0092] S43: According to the estimated distance between the shared secondary streetlight that has received the latest message data and the primary streetlight, calculate the propagation delay between the shared secondary streetlight that has received the latest message data and the primary streetlight; According to the propagation delay, using the clock of the shared secondary streetlight that has received the latest message data as the standard, correct the clock of the primary streetlight to align the clock of the primary streetlight with the clock of the shared secondary streetlight that has received the latest message data.
[0093] Optionally, the S42 includes:
[0094] The shared secondary streetlight c1 that has received the latest message data in the local area network forwards the message data to the primary streetlight e, and based on the distance between the shared secondary streetlight c1 and the primary streetlight e, constructs a state vector:
[0095] Sfeed t =[d c1e,t T
[0096] Among them, Sfeed t represents the state vector estimated based on the t-th message data in the feedback communication mode, d c1e represents the estimated distance between the shared secondary streetlight c1 and the primary streetlight e based on the t-th message data, [] T represents the transpose matrix;
[0097] The predicted state vector based on the t-th message data is:
[0098] Sfeed t+1|t =Ffeed t ·Sfeed t +Wfeed t
[0099] Among them, Sfeed t+1|t represents the state vector predicted based on the t-th message data in the feedback communication mode, Ffeed t represents the state transition matrix in the feedback communication mode, Wfeedt The noise gain matrix representing the feedback communication mode;
[0100] The Kalman gain is expressed as:
[0101]
[0102] where, Kfeed t+1 represents the Kalman gain of the feedback communication mode, Pfeed t+1|t represents the covariance matrix of the feedback communication mode, Hfeed t represents the measurement matrix of the feedback communication mode, represents the transpose matrix of the measurement matrix of the feedback communication mode, Rfeed t+1 represents the measurement noise covariance matrix of the feedback communication mode, () -1 represents the inverse matrix;
[0103] The state vector is updated as:
[0104] Sfeed t+1 = Sfeed t+1|t + Kfeed t+1 ·(Zfeed t+1 - hfeed(Sfeed t+1|t ))
[0105] where, Sfeed t+1 represents the state vector updated based on the (t + 1)-th message data in the feedback communication mode, Zfeed t+1 represents the measurement vector obtained based on the (t + 1)-th message data in the feedback communication mode, hfeed() represents the measurement function of the feedback communication mode;
[0106] Zfeed t+1 = [Trecfeed c1e,t+1 , Pfeed c1e,t+1
[0107] where, Trecfeed c1e,t+1 represents the time when the first-level street lamp e receives the (t + 1)-th message data from the shared second-level street lamp c1 in the feedback communication mode, Pfeed c1e,t+1 represents the power when the first-level street lamp e receives the (t + 1)-th message data from the shared second-level street lamp c1 in the feedback communication mode;
[0108] There is the following relationship between the time and power when the first-level street lamp receives the message data and the distance between the first-level street lamp and the shared second-level street lamp:
[0109] Trecfeed c1e,t+1 = Ttrfeed c1,t+1 + dc1e / velo
[0110] Pfeed c1e,t+1 = power - 10·loss·log 10 (d c1e ( / distance) + Gauss t+1
[0111] Wherein, Ttrfeed c1,t+1 represents the time when the shared secondary street lamp c1 sends the (t + 1)-th message data in the feedback communication mode, d c1e represents the distance variable between the shared secondary street lamp c1 and the primary street lamp e, velo represents the propagation speed of the message data, power represents the received power at the reference distance distance, loss represents the path loss exponent, Gauss t+1 represents zero-mean Gaussian shadow fading;
[0112] Based on the updated state vector Sfeed t+1 = [d c1e,t+1 T , the distance estimate d c1e,t+1 between the shared secondary street lamp c1 and the primary street lamp is obtained.
[0113] Optionally, the S5 includes:
[0114] The primary street lamp and the secondary street lamp are respectively set with a maximum waiting time.
[0115] Optionally, the S6 includes:
[0116] For the primary street lamp, the priority of the message data sent by the Beidou satellite is higher than that of the message data forwarded by the shared secondary street lamp;
[0117] For the secondary street lamp, the priority of the message data forwarded by the primary street lamp is higher than that of the message data forwarded by any secondary street lamp;
[0118] When the primary street lamp receives the message data from the Beidou satellite and the message data forwarded by the shared secondary street lamp at the same time, it selects the message data from the Beidou satellite, calls step S2, and enters the normal communication mode;
[0119] When the secondary street lamp receives the message data forwarded by the primary street lamp and the message data forwarded by other secondary street lamps at the same time, it selects the message data forwarded by the primary street lamp, calls step S2, and enters the normal communication mode;
[0120] When the primary street lamp receives the message data forwarded by multiple shared secondary street lamps at the same time, it calls step S4, enters the feedback communication mode, and selects the message data of the shared secondary street lamp that receives the latest message data;
[0121] When the secondary street lamps receive the message data forwarded by multiple secondary street lamps simultaneously, step S3 is called to enter the interactive communication mode, and the message data of the secondary street lamp that receives the latest message data is selected.
[0122] The present invention also provides a communication delay optimization system for a smart street lamp system based on Beidou satellites, including:
[0123] Local area network module: The street lamps within an adjacent geographical range form a local area network;
[0124] Normal communication module: The primary street lamps within the same local area network forward message data to the secondary street lamps, estimate the distance between the primary street lamp and the secondary street lamp; calculate the propagation delay between the primary street lamp and the secondary street lamp; use the clock of the primary street lamp as a standard to correct the clock of the secondary street lamp;
[0125] Interactive communication module: The secondary street lamp that receives the latest message data within the same local area network forwards the message data to other secondary street lamps; each secondary street lamp periodically broadcasts the recorded timestamp; each secondary street lamp compares the received timestamp with the timestamp recorded by itself; select the secondary street lamp that receives the latest message data; estimate the distance between the secondary street lamp that receives the latest message data and other secondary street lamps; calculate the propagation delay between the secondary street lamp that receives the latest message data and other secondary street lamps; use the clock of the secondary street lamp that receives the latest message data as a standard to correct the clocks of other secondary street lamps;
[0126] Feedback communication module: The shared secondary street lamp that receives the latest message data within the same local area network forwards the message data to the primary street lamp; each shared secondary street lamp sends the recorded timestamp to the primary street lamp, and the primary street lamp selects the shared secondary street lamp with the latest timestamp as the shared secondary street lamp that receives the latest message data; estimate the distance between the shared secondary street lamp that receives the latest message data and the primary street lamp; calculate the propagation delay between the shared secondary street lamp that receives the latest message data and the primary street lamp; use the clock of the shared secondary street lamp that receives the latest message data as a standard to correct the clock of the primary street lamp;
[0127] Maximum waiting time module: When the primary street lamp receives the message data from the Beidou satellite, it enters the normal communication mode; the primary street lamp makes a maximum waiting time judgment and enters the feedback communication mode; the secondary street lamp makes a maximum waiting time judgment and enters the interactive communication mode;
[0128] Priority setting module: Set the priority of the message data; when the primary street lamp or the secondary street lamp receives multiple message data simultaneously.
[0129] Beneficial effects:
[0130] The present invention forms a local area network system for street lamp devices within an adjacent range, which is beneficial for hierarchical management of street lamps. The primary street lamps are responsible for receiving the message data of Beidou satellites, and the secondary street lamps only need to communicate with the primary street lamps, reducing the overall cost and complexity of the intelligent street lamp control system.
[0131] The establishment of communication between the primary street lamps and Beidou satellites is beneficial for reducing the time synchronization error caused by the signal transmission delay of Beidou satellites. In the normal communication mode, the clock of the secondary street lamps is calibrated based on the clock of the primary street lamps. In the interactive communication mode, the clock of other secondary street lamps is calibrated based on the clock of the secondary street lamp that receives the latest message data. In the feedback communication mode, the clock of the primary street lamps is calibrated based on the clock of the shared secondary street lamp that receives the latest message data. This is beneficial for gradually reducing the communication delay, solving the communication delay caused by street lamp failures, achieving time synchronization of the intelligent street lamp control system, and improving communication efficiency. At the same time, the present invention sets the priority of message data, which is beneficial for solving message data conflicts, selecting the secondary street lamp that receives the latest message data, and significantly reducing the accumulation of communication delays. BRIEF DESCRIPTION OF THE DRAWINGS
[0132] Figure 1 FIG. is a schematic flow chart of a method for optimizing communication delay of an intelligent street lamp system based on Beidou satellites provided by an embodiment of the present invention;
[0133] Figure 2 FIG. is the local area network topology structure of the intelligent street lamp control system in the present invention;
[0134] Figure 3 FIG. is the average deviation before and after clock calibration in the normal communication mode, interactive communication mode, and feedback communication mode in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0135] The present invention will be further described below with reference to the accompanying drawings, but the present invention is not limited in any way. Any transformation or replacement made based on the teachings of the present invention falls within the protection scope of the present invention.
[0136] Embodiment 1:
[0137] A method for optimizing communication delay of an intelligent street lamp system based on Beidou satellites, as Figure 1 shown, includes the following steps:
[0138] S1: In the intelligent street lamp control system, street lamps within an adjacent geographical range form a local area network through a Bluetooth communication module;
[0139] The street lamps are divided into primary street lamps and secondary street lamps;
[0140] There is 1 primary street lamp in each local area network, and the rest are secondary street lamps;
[0141] There are shared secondary street lights in adjacent local area networks:
[0142] In each local area network, select the street light in the middle geographically as the primary street light, and the rest of the street lights as secondary street lights;
[0143] The primary street light is equipped with a Beidou satellite communication module for receiving message data from Beidou satellites; the secondary street lights receive Beidou satellite message data through the forwarding of the primary street light;
[0144] There are three communication modes in the local area network: normal communication mode, interactive communication mode, and feedback communication mode;
[0145] Among them, the normal communication model is that the primary street light receives message data from Beidou satellites, and the primary street light forwards the message data to the secondary street lights;
[0146] The interactive communication mode is the forwarding of message data between secondary street lights;
[0147] The feedback communication model is that the secondary street lights forward message data to the primary street light.
[0148] S2: In the normal communication mode, the primary street lights in the same local area network forward message data to the secondary street lights;
[0149] Calibrate the clocks of the secondary street lights based on the clock of the primary street light:
[0150] S21: According to the time and power when the secondary street light receives the message data, use Kalman filtering to estimate the distance between the primary street light and the secondary street light:
[0151] There are a primary street light a and secondary street lights b1, b2,..., bn in the local area network, where n represents the number of secondary street lights in the local area network, and the primary street light a forwards the message data of Beidou satellites to the secondary street lights b1, b2,..., bn;
[0152] Based on the distance between the primary street light and the secondary street light, construct a state vector:
[0153] Snor t =[d ab1,t ,d ab2,t ,…,d abn,t T
[0154] Among them, Snor t represents the state vector estimated based on the t-th message data in the normal communication mode, d ab1 represents the distance between the primary street light a and the secondary street light b1 estimated based on the t-th message data, d ab2 represents the distance between the primary street light a and the secondary street light b2 estimated based on the t-th message data, dabn represents the distance between the primary street lamp a and the secondary street lamp bn estimated based on the t-th message data. T represents the transpose matrix;
[0155] The predicted state vector based on the t-th message data is:
[0156] Snor t+1|t = Fnor t · Snor t + Wnor t
[0157] where Snor t+1|t represents the state vector predicted based on the t-th message data in the normal communication mode, Fnor t represents the state transition matrix in the normal communication mode, Wnor t represents the noise gain matrix in the normal communication mode;
[0158] The Kalman gain is expressed as:
[0159]
[0160] where Knor t+1 represents the Kalman gain in the normal communication mode, Pnor t+1|t represents the covariance matrix in the normal communication mode, Hnor t represents the measurement matrix in the normal communication mode, represents the transpose matrix of the measurement matrix in the normal communication mode, Rnor t+1 represents the measurement noise covariance matrix in the normal communication mode, () -1 represents the inverse matrix;
[0161] The state vector is updated as:
[0162] Snor t+1 = Snor t+1|t + Knor t+1 · (Znor t+1 - hnor(Snor t+1|t ))
[0163] where Snor t+1 represents the state vector updated based on the (t + 1)-th message data in the normal communication mode, Znor t+1 represents the measurement vector obtained based on the (t + 1)-th message data in the normal communication mode, hnor() represents the measurement function in the normal communication mode;
[0164] Znor t+1 = [Trecnor ab1,t+1 ,…, Trecnorabn,t+1 , Pnor ab1,t+1 , …, Pnor abn,t+1
[0165] Among them, Trecnor ab1,t+1 represents the time when the secondary street lamp b1 receives the (t + 1)-th message data from the primary street lamp a in the normal communication mode. Trecnor abn,t+1 represents the time when the secondary street lamp b n receives the (t + 1)-th message data from the primary street lamp a, and Pnor ab1,t+1 represents the power when the secondary street lamp b1 receives the (t + 1)-th message data from the primary street lamp a in the normal communication mode. Pnor abn,t+1 represents the power when the secondary street lamp b n receives the (t + 1)-th message data from the primary street lamp a;
[0166] In the normal communication mode, there is the following relationship between the time and power when the secondary street lamp receives the message data and the distance between the primary street lamp and the secondary street lamp:
[0167] Trecnor ab1,t+1 = Ttrnor a,t+1 + d ab1 / velo
[0168] Trecnor abn,t+1 = Ttrnor a,t+1 + d abn / velo
[0169] Pnor ab1,t+1 = power - 10·loss·log 10 (d ab1 / distance)+ Gauss t+1
[0170] Pnor abn,t+1 = power - 10·loss·log 10 (d abn / distance)+ Gauss t+1
[0171] Among them, Ttrnor a,t+1 represents the time when the primary street lamp sends the (t + 1)-th message data in the normal communication mode, d ab1 represents the distance variable between the primary street lamp a and the secondary street lamp b1, d abn represents the distance between the primary street lamp a and the secondary street lamp b n The distance variable, velo represents the propagation speed of the message data, power represents the received power at the reference distance distance, loss represents the path loss exponent, Gauss t+1 represents zero-mean Gaussian shadow fading;
[0172] Based on the updated state vector Snor t+1 =[d ab1,t+1 ,…,d abn,t+1 T , the distance estimates d n between the first-level street lamp a and the second-level street lamps b1, b2, …, b ab1,t+1 ,…,d abn,t+1 are obtained.
[0173] S22: According to the estimated distance between the first-level street lamp and the second-level street lamps, calculate the propagation delay between the first-level street lamp and the second-level street lamps; according to the propagation delay, using the clock of the first-level street lamp as the standard, correct the clock of the second-level street lamps to align the clock of the second-level street lamps with the clock of the first-level street lamp.
[0174] S3: In the interactive communication mode, the second-level street lamp that receives the latest message data in the same local area network forwards the message data to other second-level street lamps;
[0175] Using the clock of the second-level street lamp that receives the latest message data as the standard, correct the clocks of other second-level street lamps:
[0176] S31: The second-level street lamp records the timestamp of the received message data;
[0177] Each second-level street lamp periodically broadcasts the recorded timestamp;
[0178] Each second-level street lamp compares the received timestamp with its own recorded timestamp;
[0179] For the second-level street lamp, when its own recorded timestamp is earlier than the received timestamp, stop the periodic broadcast;
[0180] For the second-level street lamp, when its own recorded timestamp is later than the received timestamp, continue to periodically broadcast the recorded timestamp;
[0181] After the arbitration time, the second-level street lamp in the broadcast state is selected as the second-level street lamp that receives the latest message data, and other second-level street lamps are in the receiving state;
[0182] The second-level street lamp that receives the latest message data forwards the message data to other second-level street lamps;
[0183] S32: According to the time and power at which other second-level street lamps receive the message data, using Kalman filtering, estimate the distance between the second-level street lamp that receives the latest message data and other second-level street lamps:
[0184] There are secondary street lamps b1, b2, …, bn in the local area network. The secondary street lamp b1 forwards message data to other secondary street lamps b2, …, bn. Based on the distances between the secondary street lamp b1 and other secondary street lamps b2, …, bn, a state vector is constructed:
[0185] Sint t =[d b1b2,t ,d b1b3,t ,…,d b1bn,t T
[0186] Among them, Sint t represents the state vector estimated based on the t-th message data in the interactive communication mode, and d b1b2 represents the distance between the secondary street lamp b1 and the secondary street lamp b2 estimated based on the t-th message data, and d b1b3 represents the distance between the secondary street lamp b1 and the secondary street lamp b3 estimated based on the t-th message data, and d b1bn represents the distance between the secondary street lamp b1 and the secondary street lamp b n , and [] T represents the transpose matrix;
[0187] The predicted state vector based on the t-th message data is:
[0188] Sint t+1|t =Fint t ·Sint t +Wint t
[0189] Among them, Sint t+1|t represents the state vector predicted based on the t-th message data in the interactive communication mode, Fint t represents the state transition matrix in the interactive communication mode, and Wint t represents the noise gain matrix in the interactive communication mode;
[0190] The Kalman gain is expressed as:
[0191]
[0192] Among them, Kint t+1 represents the Kalman gain in the interactive communication mode, Pint t+1|t represents the covariance matrix in the interactive communication mode, Hint t represents the measurement matrix in the interactive communication mode, represents the transpose matrix of the measurement matrix in the interactive communication mode, and Rint t+1 The measurement noise covariance matrix representing the interactive communication mode, and ()-1 represents the inverse matrix;
[0193] The state vector is updated as follows:
[0194] Sint t+1 = Sint t+1|t + Kint t+1 ·(Zint t+1 - hint(Sint t+1|t ))
[0195] where Sint t+1 represents the state vector updated based on the (t + 1)-th message data in the interactive communication mode, Zint t+1 represents the measurement vector obtained based on the (t + 1)-th message data in the interactive communication mode, and hint() represents the measurement function of the interactive communication mode;
[0196] Zint t+1 = [Trecint b1b2,t+1 , …, Trecint b1bn,t+1 , Pint b1b2,t+1 , …, Pint b1bn,t+1
[0197] where Trecint b1b2,t+1 represents the time when the secondary street lamp b2 receives the (t + 1)-th message data from the secondary street lamp b1 in the interactive communication mode, Trecint b1bn,t+1 represents the time when the secondary street lamp b n receives the (t + 1)-th message data from the secondary street lamp b1 in the interactive communication mode, Pint b1b2,t+1 represents the power when the secondary street lamp b2 receives the (t + 1)-th message data from the secondary street lamp b1 in the interactive communication mode, Pint b1bn,t+1 represents the power when the secondary street lamp b n receives the (t + 1)-th message data from the secondary street lamp b1 in the interactive communication mode;
[0198] In the interactive communication mode, the following relationship exists between the time and power when other secondary street lamps receive the message data and the distance between the secondary street lamp that receives the latest message data and other secondary street lamps:
[0199] Trecint b1b2,t+1 = Ttrint b1,t+1 + d b1b2 / velo
[0200] Trecint b1bn,t+1 = Ttrint b1,t+1 + d b1bn / velo
[0201] Pint b1b2,t+1 = power - 10·loss·log 10 (d b1b2 / distance) + Gauss t+1
[0202] Pint b1bn,t+1 = power - 10·loss·log 10 (d b1bn / distance) + Gauss t+1
[0203] Among them, Ttrint b1,t+1 represents the time when the secondary street lamp b1 sends the (t + 1)-th message data in the interactive communication mode, d b1b2 represents the distance variable between the secondary street lamp b1 and the secondary street lamp b2, d b1bn represents the distance variable between the secondary street lamp b1 and the secondary street lamp b n between, velo represents the propagation speed of the message data, power represents the received power at the reference distance distance, loss represents the path loss exponent, Gauss t+1 represents zero-mean Gaussian shadow fading;
[0204] Based on the updated state vector Sint t+1 = [d b1b2,t+1 , …, d b1bn,t+1 T , the estimated distance values d n between the secondary street lamp b1 that receives the latest message data and other secondary street lamps b2, …, b b1b2,t+1 , …, d b1bn,t+1 are obtained.
[0205] S33: According to the estimated distance between the secondary street lamp that receives the latest message data and other secondary street lamps, calculate the propagation delay between the secondary street lamp that receives the latest message data and other secondary street lamps; according to the propagation delay, taking the clock of the secondary street lamp that receives the latest message data as the standard, correct the clocks of other secondary street lamps to align the clocks of other secondary street lamps with the clock of the secondary street lamp that receives the latest message data.
[0206] S4: In the feedback communication mode, the shared secondary street lamps that receive the latest message data in the same local area network forward the message data to the primary street lamp;
[0207] Taking the clock of the shared secondary street lamp that receives the latest message data as the standard, correct the clock of the primary street lamp:
[0208] S41: The shared secondary streetlights will record the timestamp of the received message data;
[0209] Each shared secondary streetlight sends the recorded timestamp to the primary streetlight;
[0210] The primary streetlight selects the shared secondary streetlight with the latest timestamp as the one that has received the latest message data;
[0211] S42: According to the time and power of the message data received by the primary streetlight, use Kalman filtering to estimate the distance between the shared secondary streetlight that has received the latest message data and the primary streetlight:
[0212] The shared secondary streetlight c1 that has received the latest message data in the local area network forwards the message data to the primary streetlight e. Based on the distance between the shared secondary streetlight c1 and the primary streetlight e, construct the state vector:
[0213] Sfeed t =[d c1e,t T
[0214] Among them, Sfeed t represents the state vector estimated based on the t-th message data in the feedback communication mode, d c1e represents the distance between the shared secondary streetlight c1 and the primary streetlight e estimated based on the t-th message data, [] T represents the transpose matrix;
[0215] The predicted state vector based on the t-th message data is:
[0216] Sfeed t+1|t =Ffeed t ·Sfeed t +Wfeed t
[0217] Among them, Sfeed t+1|t represents the state vector predicted based on the t-th message data in the feedback communication mode, Ffeed t represents the state transition matrix in the feedback communication mode, Wfeed t represents the noise gain matrix in the feedback communication mode;
[0218] The Kalman gain is expressed as:
[0219]
[0220] Among them, Kfeed t+1 represents the Kalman gain in the feedback communication mode, Pfeed t+1|t represents the covariance matrix in the feedback communication mode, Hfeed t Measurement matrix representing the feedback communication mode Transpose matrix of the measurement matrix representing the feedback communication mode, Rfeed t+1 Measurement noise covariance matrix representing the feedback communication mode, () -1 Represents the inverse matrix;
[0221] The state vector is updated to:
[0222] Sfeed t+1 = Sfeed t+1|t + Kfeed t+1 ·(Zfeed t+1 - hfeed(Sfeed t+1|t ))
[0223] Where, Sfeed t+1 Represents the state vector updated based on the (t + 1)-th message data in the feedback communication mode, Zfeed t+1 Represents the measurement vector obtained based on the (t + 1)-th message data in the feedback communication mode, hfeed() represents the measurement function of the feedback communication mode;
[0224] Zfeed t+1 = [Trecfeed c1e,t+1 , Pfeed c1e,t+1
[0225] Where, Trecfeed c1e,t+1 Represents the time when the first-level street lamp e receives the (t + 1)-th message data from the shared second-level street lamp c1 in the feedback communication mode, Pfeed c1e,t+1 Represents the power when the first-level street lamp e receives the (t + 1)-th message data from the shared second-level street lamp c1 in the feedback communication mode;
[0226] There is the following relationship between the time and power when the first-level street lamp receives the message data and the distance between the first-level street lamp and the shared second-level street lamp:
[0227] Trecfeed c1e,t+1 = Ttrfeed c1,t+1 + d c1e / velo
[0228] Pfeed c1e,t+1 = power - 10·loss·log 10 (d c1e / distance) + Gauss t+1
[0229] Where, Ttrfeed c1,t+1 Represents the time when the shared second-level street lamp c1 sends the (t + 1)-th message data in the feedback communication mode, dc1e represents the distance variable between the shared secondary street lamp c1 and the primary street lamp e, velo represents the propagation speed of the message data, power represents the received power at the reference distance distance, loss represents the path loss exponent, and Gauss t+1 represents zero-mean Gaussian shadow fading;
[0230] Based on the updated state vector Sfeed t+1 =[d c1e,t+1 T , the distance estimate d between the shared secondary street lamp c1 and the primary street lamp is obtained c1e,t+1 .
[0231] S43: According to the estimated distance between the shared secondary street lamp that received the latest message data and the primary street lamp, calculate the propagation delay between the shared secondary street lamp that received the latest message data and the primary street lamp; according to the propagation delay, using the clock of the shared secondary street lamp that received the latest message data as the standard, correct the clock of the primary street lamp so that the clock of the primary street lamp aligns with the clock of the shared secondary street lamp that received the latest message data.
[0232] S5: When the primary street lamp receives message data from the Beidou satellite, call step S2 to enter the normal communication mode;
[0233] The primary street lamp and the secondary street lamp respectively set the maximum waiting time;
[0234] If the primary street lamp does not receive message data within the maximum waiting time tmax1, call step S4 to enter the feedback communication mode;
[0235] If the secondary street lamp does not receive message data within the maximum waiting time tmax2, call step S3 to enter the interactive communication mode.
[0236] S6: The primary street lamp and the secondary street lamp respectively set the message data priority;
[0237] When the primary street lamp or the secondary street lamp receives multiple message data at the same time, make a selection according to the message data priority:
[0238] For the primary street lamp, the priority of the message data sent by the Beidou satellite is higher than that of the message data forwarded by the shared secondary street lamp;
[0239] For the secondary street lamp, the priority of the message data forwarded by the primary street lamp is higher than that of the message data forwarded by any secondary street lamp;
[0240] When the primary street lamp receives the message data sent by the Beidou satellite and the message data forwarded by the shared secondary street lamp at the same time, select the message data from the Beidou satellite, call step S2, and enter the normal communication mode;
[0241] When the secondary street lamp receives the message data forwarded by the primary street lamp and other secondary street lamps at the same time, it selects the message data forwarded by the primary street lamp and calls step S2 to enter the normal communication mode;
[0242] When the primary street lamp receives the message data forwarded by multiple shared secondary street lamps at the same time, it calls step S4 to enter the feedback communication mode and selects the message data of the shared secondary street lamp that receives the latest message data;
[0243] When the secondary street lamp receives the message data forwarded by multiple secondary street lamps at the same time, it calls step S3 to enter the interactive communication mode and selects the message data of the secondary street lamp that receives the latest message data.
[0244] In the embodiment of the present invention, Figure 2 The following shows an example of the local area network topology structure of the intelligent street lamp control system in the present invention. It can be seen from the figure that 9 street lamps are divided into two local area networks; there is only one primary street lamp in each local area network, and there are multiple secondary street lamps. There are shared secondary street lamps in the overlapping part of the two local area networks;
[0245] When the primary street lamp in the left local area network receives the message data of the Beidou satellite, while the primary street lamp in the right local area network cannot receive the message data of the Beidou satellite due to communication reasons:
[0246] The left local area network calls step S2 to enter the normal communication mode; the primary street lamp in the left local area network forwards the message data to the secondary street lamps in the left local area network, and calibrates the clocks of the secondary street lamps in the left local area network with the clock of the primary street lamp in the left local area network;
[0247] The right local area network calls step S4 to enter the feedback communication mode; the shared secondary street lamp that receives the latest message data in the right local area network forwards the message data to the primary street lamp in the right local area network;
[0248] Calibrate the clock of the primary street lamp in the right local area network with the clock of the shared secondary street lamp that receives the latest message data in the right local area network;
[0249] When the primary street lamp in the left local area network receives the message data of the Beidou satellite, while the primary street lamp in the right local area network fails:
[0250] The left local area network calls step S2 to enter the normal communication mode; the primary street lamp in the left local area network forwards the message data to the secondary street lamps in the left local area network, and calibrates the clocks of the secondary street lamps in the left local area network with the clock of the primary street lamp in the left local area network;
[0251] The right - hand local area network invokes step S3 to enter the interactive communication mode; the secondary streetlights that receive the latest message data in the right - hand local area network forward the message data to other secondary streetlights in the right - hand local area network;
[0252] Taking the clock of the secondary streetlight that receives the latest message data in the right - hand local area network as the standard, calibrate the clocks of other secondary streetlights in the right - hand local area network;
[0253] When some secondary streetlights in the left - hand local area network do not receive the message data forwarded by the primary streetlight in the left - hand local area network due to communication reasons:
[0254] The left - hand local area network invokes step S3 to enter the interactive communication mode; the secondary streetlights that receive the latest message data in the left - hand local area network forward the message data to other secondary streetlights in the left - hand local area network;
[0255] In simulation experiment 1, there are 20 streetlights in total, including 1 primary streetlight and 19 secondary streetlights. The standard deviation of each streetlight relative to the Beidou satellite clock is set to 1 second, and the mean value is 0. Among them, a negative clock deviation indicates that the streetlight clock is ahead of the Beidou satellite clock, and a positive number indicates that the streetlight clock is behind the Beidou satellite clock. The Beidou satellite signal simulator periodically sends message data. Each Monte Carlo experiment constructs 100 consecutive message data, and there are 200 Monte Carlo experiments in total. Using the root - mean - square error of the calibrated clocks of all streetlights as an index to evaluate the method described in the present invention, the root - mean - square error RMSE of the calibrated clocks of the streetlights is expressed as:
[0256]
[0257] where t i represents the clock deviation of the i - th streetlight after clock calibration by the method described in the present invention;
[0258] This experiment respectively simulates the average deviation before and after clock calibration in the normal communication mode, interactive communication mode, and feedback communication mode, as Figure 3 shown. It can be seen from the figure that in the three modes, the RMSE decreases significantly after clock calibration; the RMSE gradually decreases as the number of message data increases and finally stabilizes. This shows that by using the method of the present invention, the clock offset can be effectively reduced and the communication delay can be decreased.
[0259] In simulation experiment 2, for the solution steps of message data conflict, pseudocode is constructed
[0260]
[0261]
[0262]
[0263] Regarding the priority processing rules:
[0264] Primary street lamp Beidou satellite takes precedence over shared secondary street lamps Primary street lamp Select the latest timestamp from multiple shared secondary street lamps (step S4) Secondary street lamp Primary street lamp takes precedence over secondary street lamp (step S2) Secondary street lamp Select the latest timestamp from multiple secondary street lamps (step S3)
[0265] The present invention designs the following four simulation scenarios:
[0266]
[0267] The evaluation indicators adopted by the present invention include priority correctness, synchronization deviation, and processing delay. Among them, priority correctness is defined as the ratio of the number of times of correctly selecting high priority to the total number of times, and synchronization deviation is defined as the average of the absolute values of the deviations after each clock correction. 200 simulation experiments were carried out under each scenario, and the experimental results are shown in the following table. It can be seen from the table that the method proposed by the present invention can ensure high priority correctness and small synchronization deviation.
[0268] Serial number Priority correctness Synchronization deviation 1 98.5% 15ms 2 97.5% 18ms 3 99% 5ms 4 98.5% 8ms
[0269] Embodiment 2: The present invention also provides a communication delay optimization system for a smart street lamp system based on Beidou satellites, including the following five modules:
[0270] Conflict decision module: When a secondary street lamp simultaneously receives message data from a primary street lamp and other secondary street lamps, its own clock is corrected based on the clock of the primary street lamp;
[0271] When a secondary street lamp simultaneously receives message data from multiple secondary street lamps, the sending times of the message data are compared, and its own clock is corrected based on the clock of the secondary street lamp that sends the latest message data;
[0272] When a primary street lamp simultaneously receives message data from Beidou satellites and shared secondary street lamps, the message data from Beidou satellites is given priority, and its own clock is corrected;
[0273] When a primary street lamp simultaneously receives message data from multiple shared secondary street lamps, the sending times of the message data are compared, and its own clock is corrected based on the clock of the shared secondary street lamp that sends the latest message data.
[0274] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments. And the term "including", "comprising" or any other variant thereof in this article is intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, device, article or method. Without more limitations, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, device, article or method including the element.
[0275] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to enable a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0276] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for optimizing communication delay of an intelligent street lamp system based on Beidou satellites, characterized in that, The method includes: S1: In the intelligent street lamp control system, the street lamps within an adjacent geographical range form a local area network through a Bluetooth communication module; The street lamps are divided into first-level street lamps and second-level street lamps; There is 1 first-level street lamp in each local area network, and the rest are second-level street lamps; There are shared second-level street lamps in adjacent local area networks; S2: In the normal communication mode, the first-level street lamp in the same local area network forwards message data to the second-level street lamps; Using the clock of the first-level street lamp as a standard, correct the clock of the second-level street lamps; S3: In the interactive communication mode, the second-level street lamp that receives the latest message data in the same local area network forwards the message data to other second-level street lamps; Using the clock of the second-level street lamp that receives the latest message data as a standard, correct the clocks of other second-level street lamps; S4: In the feedback communication mode, the shared second-level street lamp that receives the latest message data in the same local area network forwards the message data to the first-level street lamp; Using the clock of the shared second-level street lamp that receives the latest message data as a standard, correct the clock of the first-level street lamp; S5: When the first-level street lamp receives message data from the Beidou satellite, call step S2 and enter the normal communication mode; If the first-level street lamp does not receive message data within the maximum waiting time tmax1, call step S4 and enter the feedback communication mode; If the second-level street lamp does not receive message data within the maximum waiting time tmax2, call step S3 and enter the interactive communication mode; S6: The first-level street lamp and the second-level street lamp respectively set the priority of the message data; When the first-level street lamp or the second-level street lamp receives multiple message data simultaneously, make a selection according to the priority of the message data.
2. The communication delay optimization method for the intelligent street lamp system based on Beidou satellite according to claim 1, characterized in that The S1 includes: In each local area network, select the street lamp with a geographical location in the middle as the first-level street lamp, and the rest of the street lamps as the second-level street lamps; The first-level street lamp is installed with a Beidou satellite communication module for receiving message data from the Beidou satellite; the second-level street lamps receive Beidou satellite message data through the forwarding of the first-level street lamp; There are three communication modes in the local area network: normal communication mode, interactive communication mode, and feedback communication mode.
3. The communication delay optimization method for the intelligent street lamp system based on Beidou satellite according to claim 1, wherein The S2 includes: S21: According to the time and power when the second-level street lamp receives the message data, use the Kalman filter to estimate the distance between the first-level street lamp and the second-level street lamps; S22: Calculate the propagation delay between the first-level street lamp and the second-level street lamp; according to the propagation delay, using the clock of the first-level street lamp as a standard, correct the clock of the second-level street lamp so that the clock of the second-level street lamp aligns with the clock of the first-level street lamp.
4. The communication delay optimization method of the intelligent street lamp system based on Beidou satellite according to claim 3, characterized in that, The S21 includes: There is a first-level street lamp a and second-level street lamps b1, b2,..., bn in the local area network, where n represents the number of second-level street lamps in the local area network, and the first-level street lamp a forwards the message data of the Beidou satellite to the second-level street lamps b1, b2,..., bn; Based on the distance between the first-level street lamp and the second-level street lamps, construct a state vector: Snor t = [d ab1,t , d ab2,t , …, d abn,t T Among them, Snor t represents the state vector estimated based on the t-th packet data in the normal communication mode, d ab1 represents the distance between the first-level street lamp a and the second-level street lamp b1 estimated based on the t-th packet data, d ab2 represents the distance between the first-level street lamp a and the second-level street lamp b2 estimated based on the t-th packet data, d abn represents the distance between the first-level street lamp a and the second-level street lamp bn estimated based on the t-th packet data, [] T represents the transpose matrix; The predicted state vector for the t-th message data is: Snor t+1|t = Fnor t · Snor t + Wnor t Among them, Snor t+1|t represents the state vector predicted based on the t-th packet data in the normal communication mode, and Fnor t represents the state transition matrix of the normal communication mode, and Wnor t represents the noise gain matrix of the normal communication mode; The Kalman gain is expressed as: Knor t+1 = Pnor t+1|t ·Hnor t T ·(Hnor t ·Pnor t+1|t Hnor t T + Rnor t+1 ) -1 Among them, Knor t+1 represents the Kalman gain in the normal communication mode, Pnor t+1|t represents the covariance matrix in the normal communication mode, Hnor t represents the measurement matrix in the normal communication mode, Hnor t T represents the transpose matrix of the measurement matrix in the normal communication mode, Rnor t+1 represents the measurement noise covariance matrix in the normal communication mode, () -1 represents the inverse matrix; The state vector is updated to: Snor t+1 = Snor t+1|t + Knor t+1 ·(Znor t+1 - hnor(Snor t+1|t )) Among them, Snor t+1 represents the state vector updated based on the (t + 1)-th packet data in the normal communication mode, and Znor t+1 represents the measurement vector obtained based on the (t + 1)-th packet data in the normal communication mode, and hnor() represents the measurement function in the normal communication mode; Znor t+1 = [Trecnor ab1,t+1 , …, Trecnor abn,t+1 , Pnor ab1,t+1 , …, Pnor abn,t+1 Among them, Trecnor ab1,t+1 represents the time when the secondary street lamp b1 receives the (t + 1)-th message data from the primary street lamp a in the normal communication mode, Trecnor abn,t+1 represents the time when the secondary street lamp b n receives the (t + 1)-th message data from the primary street lamp a, Pnor ab1,t+1 represents the power when the secondary street lamp b1 receives the (t + 1)-th message data from the primary street lamp a in the normal communication mode, Pnor abn,t+1 represents the power when the secondary street lamp b n receives the (t + 1)-th message data from the primary street lamp a; In the normal communication mode, there is the following relationship between the time and power when the second-level street lamp receives the message data and the distance between the first-level street lamp and the second-level street lamps: Trecnor ab1,t+1 = Ttrnor a,t+1 + d ab1 / velo Trecnor abn,t+1 = Ttrnor a,t+1 + d abn / velo Pnor ab1,t+1 = power - 10·loss·log 10 (d ab1 / distance) + Gauss t+1 Pnor abn,t+1 = power - 10·loss·log 10 (d abn / distance) + Gauss t+1 Among them, Ttrnor a,t+1 represents the time when the first-level street lamp sends the (t + 1)-th packet data in the normal communication mode, d ab1 represents the distance variable between the first-level street lamp a and the second-level street lamp b1, d abn represents the distance variable between the first-level street lamp a and the second-level street lamp b n between them, velo represents the propagation speed of the packet data, power represents the received power at the reference distance distance, loss represents the path loss exponent, Gauss t+1 represents zero-mean Gaussian shadow fading; Based on the updated state vector Snor t+1 = [d ab1,t+1 , …, d abn,t+1 T , the estimated distance values d n between the primary street lamp a and the secondary street lamps b1, b2, …, b ab1,t+1 , …, d abn,t+1 are obtained. 5. The communication delay optimization method for the intelligent street lamp system based on Beidou satellites according to claim 1, wherein The S3 includes: S31: The second-level street lamp will record the timestamp of the received message data; Each second-level street lamp periodically broadcasts the recorded timestamp; Each secondary street lamp compares the received timestamp with the timestamp recorded by itself; For the secondary street lamp, when the timestamp recorded by itself is earlier than the received timestamp, stop the periodic broadcast; For the secondary street lamp, when the timestamp recorded by itself is later than the received timestamp, continue to periodically broadcast the recorded timestamp; After the arbitration time, the secondary street lamp in the broadcast state is selected as the secondary street lamp that has received the latest message data, and other secondary street lamps are in the receiving state; The secondary street lamp that has received the latest message data forwards the message data to other secondary street lamps; S32: According to the time and power when other secondary street lamps receive the message data, use Kalman filtering to estimate the distance between the secondary street lamp that has received the latest message data and other secondary street lamps; S33: Calculate the propagation delay between the secondary street lamp that has received the latest message data and other secondary street lamps; according to the propagation delay, taking the clock of the secondary street lamp that has received the latest message data as the standard, correct the clocks of other secondary street lamps so that the clocks of other secondary street lamps align with the clock of the secondary street lamp that has received the latest message data.
6. The communication delay optimization method for the intelligent street lamp system based on Beidou satellite according to claim 5, characterized in that The said S32 includes: There are secondary street lamps b1, b2,..., bn in the local area network. The secondary street lamp b1 forwards the message data to other secondary street lamps b2,..., bn. Based on the distance between the secondary street lamp b1 and other secondary street lamps b2,..., bn, construct a state vector: Sint t = [d b1b2,t , d b1b3,t , …, d b1bn,t T Among them, Sint t represents the state vector estimated based on the t-th packet data, d b1b2 represents the distance between secondary streetlights b1 and b2 estimated based on the t-th packet data, d b1b3 represents the distance between secondary streetlights b1 and b3 estimated based on the t-th packet data, d b1bn represents the distance between secondary streetlights b1 and b n estimated based on the t-th packet data, [] T represents the transpose matrix; The predicted state vector based on the t-th message data is: Sint t+1|t = Fint t ·Sint t + Wint t Among them, Sint t+1|t represents the state vector predicted based on the t-th packet data in the interactive communication mode, Fint t represents the state transition matrix of the interactive communication mode, Wint t represents the noise gain matrix of the interactive communication mode; The Kalman gain is expressed as: Kint t+1 = Pint t+1|t ·Hint t T ·(Hint t ·Pint t+1|t Hint t T + Rint t+1 ) -1 Among them, Kint t+1 represents the Kalman gain of the interactive communication mode, Pint t+1|t represents the covariance matrix of the interactive communication mode, Hint t represents the measurement matrix of the interactive communication mode, Hint t T represents the transpose matrix of the measurement matrix of the interactive communication mode, Rint t+1 represents the measurement noise covariance matrix of the interactive communication mode, () -1 represents the inverse matrix; The state vector is updated to: Sint t+1 = Sint t+1|t + Kint t+1 ·(Zint t+1 - hint(Sint t+1|t )) Among them, Sint t+1 represents the state vector updated based on the (t + 1)-th packet data in the interactive communication mode, Zint t+1 represents the measurement vector obtained based on the (t + 1)-th packet data in the interactive communication mode, and hint() represents the measurement function of the interactive communication mode; Zint t+1 = [Trecint b1b2,t+1 , …, Trecint b1bn,t+1 , Pint b1b2,t+1 , …, Pint b1bn,t+1 Among them, Trecint b1b2,t+1 represents the time when the secondary street lamp b2 receives the (t + 1)-th packet data from the secondary street lamp b1 in the interactive communication mode. Trecint b1bn,t+1 represents the time when the secondary street lamp b n receives the (t + 1)-th packet data from the secondary street lamp b1. Pint b1b2,t+1 represents the power when the secondary street lamp b2 receives the (t + 1)-th packet data from the secondary street lamp b1 in the interactive communication mode. Pint b1bn,t+1 represents the power when the secondary street lamp b n receives the (t + 1)-th packet data from the secondary street lamp b1; In the interactive communication mode, there is the following relationship between the time and power when other secondary street lamps receive the message data and the distance between the secondary street lamp that has received the latest message data and other secondary street lamps: Trecint b1b2,t+1 = Ttrint b1,t+1 + d b1b2 / velo Trecint b1bn,t+1 = Ttrint b1,t+1 + d b1bn / velo Pint b1b2,t+1 = power - 10·loss·log 10 (d b1b2 / distance) + Gauss t+1 Pint b1bn,t+1 = power - 10·loss·log 10 (d b1bn / distance) + Gauss t+1 Among them, Ttrint b1,t+1 represents the time when the secondary street lamp b1 sends the (t + 1)-th packet data in the interactive communication mode, d b1b2 represents the distance variable between the secondary street lamp b1 and the secondary street lamp b2, d b1bn represents the distance variable between the secondary street lamp b1 and the secondary street lamp b n etween, velo represents the propagation speed of the packet data, power represents the received power at the reference distance distance, loss represents the path loss exponent, Gauss t+1 represents zero-mean Gaussian shadow fading; Based on the updated state vector Sint t+1 = [d b1b2,t+1 , …, d b1bn,t+1 T , the estimated distance values d n between the secondary street lamp b1 that has received the latest message data and other secondary street lamps b2, …, b b1b2,t+1 , …, d b1bn,t+1 are obtained. 7. The communication delay optimization method for the intelligent street lamp system based on Beidou satellites according to claim 1, characterized in that The said S4 includes: S41: The shared secondary street lamp will record the timestamp of the received message data; Each shared secondary street lamp sends the recorded timestamp to the primary street lamp; The primary street lamp selects the shared secondary street lamp with the latest timestamp as the shared secondary street lamp that has received the latest message data; S42: According to the time and power when the primary street lamp receives the message data, use Kalman filtering to estimate the distance between the shared secondary street lamp that has received the latest message data and the primary street lamp; S43: Calculate the propagation delay between the shared secondary street lamp that has received the latest message data and the primary street lamp; according to the propagation delay, taking the clock of the shared secondary street lamp that has received the latest message data as the standard, correct the clock of the primary street lamp so that the clock of the primary street lamp aligns with the clock of the shared secondary street lamp that has received the latest message data.
8. The communication delay optimization method for the intelligent street lamp system based on Beidou satellite according to claim 7, characterized in that, The said S42 includes: In the local area network, the shared secondary street lamp c1 that has received the latest message data forwards the message data to the primary street lamp e. Based on the distance between the shared secondary street lamp c1 and the primary street lamp e, construct a state vector: Sfeed t = [d c1e,t T Among them, Sfeed t represents the state vector estimated based on the t-th packet data, and d c1e represents the distance between the common secondary street lamp c1 and the primary street lamp e estimated based on the t-th packet data, T represents the transpose matrix; The predicted state vector based on the t-th message data is: Sfeed t+1|t = Ffeed t ·Sfeed t + Wfeed t Among them, Sfeed t+1|t represents the state vector predicted based on the t-th packet data in the feedback communication mode, and Ffeed t represents the state transition matrix of the feedback communication mode, and Wfeed t represents the noise gain matrix of the feedback communication mode; The Kalman gain is expressed as: Kfeed t+1 = Pfeed t+1|t ·Hfeed t T ·(Hfeed t ·Pfeed t+1|t Hfeed t T + Rfeed t+1 ) -1 Among them, Kfeed t+1 represents the Kalman gain of the feedback communication mode, Pfeed t+1|t represents the covariance matrix of the feedback communication mode, Hfeed t represents the measurement matrix of the feedback communication mode, Hfeed t T represents the transpose matrix of the measurement matrix of the feedback communication mode, Rfeed t+1 represents the measurement noise covariance matrix of the feedback communication mode, () -1 represents the inverse matrix; The state vector is updated to: Sfeed t+1 = Sfeed t+1|t + Kfeed t+1 ·(Zfeed t+1 - hfeed(Sfeed t+1|t )) Among them, Sfeed t+1 represents the state vector updated based on the (t + 1)-th packet data in the feedback communication mode, and Zfeed t+1 represents the measurement vector obtained based on the (t + 1)-th packet data in the feedback communication mode; hfeed() represents the measurement function of the feedback communication mode. Zfeed t+1 = [Trecfeed c1e,t+1 , Pfeed c1e,t+1 Among them, Trecfeed c1e,t+1 represents the time when the first-level street lamp e receives the (t + 1)-th packet data from the shared second-level street lamp c1 in the feedback communication mode, and Pfeed c1e,t+1 represents the power when the first-level street lamp e receives the (t + 1)-th packet data from the shared second-level street lamp c1 in the feedback communication mode; There is the following relationship between the time and power when the primary street lamp receives the message data and the distance between the primary street lamp and the shared secondary street lamp: Trecfeed c1e,t+1 = Ttrfeed c1,t+1 + d c1e / velo Pfeed c1e,t+1 = power - 10·loss·log 10 (d c1e / distance) + Gauss t+1 Among them, Ttrfeed c1,t+1 represents the time when the shared secondary street lamp c1 sends the (t + 1)-th packet data in the feedback communication mode, d c1e represents the distance variable between the shared secondary street lamp c1 and the primary street lamp e, velo represents the packet data propagation speed, power represents the received power at the reference distance distance, loss represents the path loss exponent, Gauss t+1 represents zero-mean Gaussian shadow fading; Based on the updated state vector Sfeed in the feedback communication mode t+1 = [d c1e,t+1 T , the estimated distance d between the shared secondary street lamp c1 and the primary street lamp is obtained c1e,t+1 . 9. The communication delay optimization method of the intelligent street lamp system based on Beidou satellite according to claim 1, characterized in that The said S6 includes: For the primary street lamp, the priority of the message data sent by the Beidou satellite is higher than that of the message data forwarded by the shared secondary street lamp; For secondary street lights, the priority of the message data forwarded by primary street lights is higher than that of the message data forwarded by any secondary street lights.
10. The communication delay optimization system of the intelligent street lamp system based on Beidou satellites, characterized in that, It includes: LAN module: Street lights within an adjacent geographical range form a local area network; Normal communication module: The primary street lights in the same local area network forward message data to secondary street lights, and estimate the distance between the primary street lights and the secondary street lights; Calculate the propagation delay between the primary street light and the secondary street light; Use the clock of the primary street light as a standard to calibrate the clock of the secondary street light; Interactive communication module: The secondary street lights that receive the latest message data in the same local area network forward the message data to other secondary street lights; Each secondary street light periodically broadcasts the recorded timestamp; Each secondary street light compares the received timestamp with its own recorded timestamp; Select the secondary street light that receives the latest message data; Estimate the distance between the secondary street light that receives the latest message data and other secondary street lights; Calculate the propagation delay between the secondary street light that receives the latest message data and other secondary street lights; Use the clock of the secondary street light that receives the latest message data as a standard to calibrate the clocks of other secondary street lights; Feedback communication module: The shared secondary street lights that receive the latest message data in the same local area network forward the message data to the primary street lights; Each shared secondary street light sends the recorded timestamp to the primary street light, and the primary street light selects the shared secondary street light with the latest timestamp as the shared secondary street light that receives the latest message data; Estimate the distance between the shared secondary street light that receives the latest message data and the primary street light; Calculate the propagation delay between the shared secondary street light that receives the latest message data and the primary street light; Use the clock of the shared secondary street light that receives the latest message data as a standard to calibrate the clock of the primary street light; Maximum waiting time module: When the primary street light receives the message data from the Beidou satellite, it enters the normal communication mode; The primary street light makes a maximum waiting time judgment and enters the feedback communication mode; The secondary street light makes a maximum waiting time judgment and enters the interactive communication mode; Priority setting module: Set the priority of the message data; When the primary street light or the secondary street light receives multiple message data at the same time; To implement the communication delay optimization method of the Beidou satellite-based intelligent street light system as described in any one of claims 1-9.
Citation Information
Patent Citations
Street lamp control system and method based on Beidou short message satellite communication
CN111083865A
Intelligent street lamp, system and method based on Beidou short message communication, terminal and medium
CN114079497A
Housing and connector
KR1020240164401A
Streetlight situational awareness system
US20220254250A1