CN103684735A - Synchronous method of distributed device - Google Patents

Synchronous method of distributed device Download PDF

Info

Publication number
CN103684735A
CN103684735A CN201310559601.1A CN201310559601A CN103684735A CN 103684735 A CN103684735 A CN 103684735A CN 201310559601 A CN201310559601 A CN 201310559601A CN 103684735 A CN103684735 A CN 103684735A
Authority
CN
China
Prior art keywords
data
main control
control unit
signal gathering
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310559601.1A
Other languages
Chinese (zh)
Inventor
孙忠耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aerospace Science and Industry Shenzhen Group Co Ltd
Original Assignee
Aerospace Science and Industry Shenzhen Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aerospace Science and Industry Shenzhen Group Co Ltd filed Critical Aerospace Science and Industry Shenzhen Group Co Ltd
Priority to CN201310559601.1A priority Critical patent/CN103684735A/en
Publication of CN103684735A publication Critical patent/CN103684735A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

Disclosed is a synchronous method of a distributed device. The distributed device contains a main control unit and a plurality of signal acquisition units connected with the main control unit. The synchronous method contains the following steps: Step S100, the plurality of signal acquisition unit and the main control unit are controlled for timing and synchronization according to an IEEE1588 clock synchronization protocol; Step S200, the main control unit sends a sampled signal at the beginning of each second, a signal acquired by each signal acquisition unit within each second is respectively numbered, and data acquired by each signal acquisition unit is packaged according to a preset format; and Step S300, the main control unit receives data of the signal acquisition units and controls alignment of data with the same number in different signal acquisition units according to a format, and data packets of the same signal acquisition unit are stored according to the number sequence. By the technical scheme, non-linear errors and fixed errors in the synchronization process are eliminated, and synchronization precision of the distributed device is raised effectively.

Description

A kind of synchronous method of distributed devices
Technical field
The invention belongs to power communication field, relate in particular to a kind of synchronous method of distributed devices.
Background technology
In today of power industry develop rapidly, the distributed devices of various power equipments is more and more accepted by everybody and is used, the advantages such as distributed devices is little with his volume, cost is low, Scalable Performance is good are used widely, but the main problem that restricts distributed devices development is the transmittability of bus and the net synchronization capability of front-end collection.
The main method of synchronization of distributed apparatus is that command synchronization and hard contact are synchronous at present.Command synchronization is exactly the transmission order of main control unit broadcast type, carries out once synchronously after all front-end collections unit receives orders, and this pattern is due to the time delay that order receives and processes, and what make front-end collection unit synchronously exists nonlinear error; Hard contact is synchronously to adopt a synchronous signal line, from main control unit, be connected to all front-end collections unit, main control unit sends synchronizing signal by synchronous signal line, but the distribution character due to distributed devices, make front-end collection unit different far from the distance of main control unit, if will produce fixing error when distance differs greatly.
Summary of the invention
The present invention is intended to solve the technical problem that has nonlinearity erron or fixed error in the synchronous process of distributed devices in prior art, and a kind of synchronous method of the distributed devices of its synchronous error that synchronously accurately, effectively reduces is provided.
Embodiments of the invention provide a kind of synchronous method of distributed devices, a plurality of signal gathering unit that described distributed devices comprises main control unit and is connected with main control unit, and described synchronous method comprises the following steps,
Step S100, according to IEEE1588 clock synchronization protocol, controls when a plurality of signal gathering unit are carried out school with main control unit and synchronizes;
Step S200, main control unit starts to send sampled signal each second, and the signal of each signal gathering unit interior collection per second is numbered respectively, and the data of each signal gathering unit collection package according to default form.
Step S300, main control unit receives the data of signal gathering unit, controls the data format alignment with identical numbering of unlike signal collecting unit and the packet of same signal gathering unit and stores according to described number order.
Further, described step S100 specifically comprises,
S110, main control unit sends Sync message to described signal gathering unit, and records the time that Sync leaves main control unit, is recorded as timestamp t1;
S120, signal gathering unit receives the time of Sync message this message of record reception, is recorded as time stamp T s1;
S130, main control unit sends Follow Up message with timestamp t1 information to signal gathering unit, signal gathering unit receive Follow Up message and writing time t1.
S140, signal gathering unit sends Delay request message to described main control unit, and records the time that Delay request message leaves signal gathering unit, is recorded as timestamp t2.
S150, main control unit receives Delay request message, and record receives the time of this message, is recorded as time stamp T m2.
S160, main control unit sends Delay response message with time stamp T m2 information again to described signal gathering unit, signal gathering unit receive Delay response message and writing time Tm2.
S170, differs from dt=[(Ts1-t1 computing time)-(Tm2-t2)]/2, network delay Delay=[(Ts1-t1)+(Tm2-t2)]/2;
S180, signal gathering unit is synchronizeed with main control unit according to the clock of described time difference dt and network delay Delay setting oneself.
Further, in step S200, main control unit starts to send sampled signal each second, and the concrete grammar that the signal of each signal gathering unit interior collection per second is numbered is respectively: the data of each signal gathering unit collection in each second are numbered respectively 0 in order, 1,2,3 ..., f-1; While starting to next second, described numbering zero clearing also re-starts numbering according to above-mentioned method for numbering serial; Wherein f is sample frequency.
Further, the default form of described data is data packet length, device identification, collection numbering, data type sign 1, data bulk 1, data 1 ... data n ..., data type sign n, data bulk n, data 1 ... data n, verification.
Further, in step S300, the concrete grammar of controlling the data packet format alignment with identical numbering of unlike signal collecting unit is: control the packet with identical numbering of described unlike signal collecting unit according to data packet length, device identification, collection numbering, data type sign 1, data bulk 1, data 1 ... data n ..., data type sign n, data bulk n, data 1 ... the form of data n, verification carries out correspondence one by one and arranges and store.
In above technical scheme, synchronous when utilizing IEEE1588 to carry out school to main control unit and signal gathering unit, and the data of signal gathering unit collection are numbered and are preset the group bag of form, make the data after group bag corresponding one by one, make the acquisition time of all signal gathering unit and the time synchronized of each image data, from realizing the Complete Synchronization of distributed devices, eliminated nonlinearity erron and the fixed error in synchronizing process, effectively improved the synchronization accuracy of distributed devices.
Accompanying drawing explanation
Fig. 1 is the synchronous method flow chart of the distributed devices of an embodiment of the present invention;
Fig. 2 is the data packet format schematic diagram of the signal gathering unit of an embodiment of the present invention;
Fig. 3 is that the packet of the signal gathering unit of an embodiment of the present invention is stored the schematic diagram of arranging.
Embodiment
In order to make technical problem solved by the invention, technical scheme and beneficial effect clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
As shown in Figure 1, embodiments of the invention provide a kind of synchronous method of distributed devices, a plurality of signal gathering unit that described distributed devices comprises main control unit and is connected with main control unit, and described synchronous method comprises the following steps:
Step S100, according to IEEE1588 clock synchronization protocol, controls when a plurality of signal gathering unit are carried out school with main control unit and synchronizes;
IEEE1588 clock synchronization protocol is by Ethernet synchronised clock, provide submicrosecond level to time precision, IEEE1588 determines the most accurate clock in network by BestMasterClock algorithm, as master clock, remaining all clocks are all as from clock, synchronize with master clock, the master clock is here arranged in described main control unit, from clock setting in each signal gathering unit.Between signal gathering unit and main control unit, synchronous method specifically comprises the following steps during the school of clock:
S110, main control unit sends Sync message to described signal gathering unit, and records the time that Sync leaves main control unit, is recorded as timestamp t1;
S120, signal gathering unit receives the time of Sync message this message of record reception, is recorded as time stamp T s1;
S130, main control unit sends Follow Up message with timestamp t1 information to signal gathering unit, and signal gathering unit receives Follow Up message and also records time t1;
S140, signal gathering unit sends Delay request message to described main control unit, and records the time that Delay request message leaves signal gathering unit, is recorded as timestamp t2;
S150, main control unit receives Delay request message, and record receives the time of this message, is recorded as time stamp T m2;
S160, main control unit sends Delay response message with time stamp T m2 information again to described signal gathering unit, and signal gathering unit receives Delay response message and also records time T m2;
So far, oneself has signal gathering unit enough information and calculates two important parameters: the one, and network delay Delay, the 2nd, the clock difference between main control unit and signal gathering unit.
S170, calculates clock difference dt=[(Ts1-t1)-(Tm2-t2)]/2, network delay Delay=[(Ts1-t1)+(Tm2-t2)]/2;
S180, signal gathering unit is synchronizeed with main control unit according to the clock of described time difference dt and network delay Delay setting oneself.
According to the clock of the clock of the above-mentioned main control unit of having adjusted and signal gathering unit, main control unit sends sampled signal, further realizes the synchronous acquisition of the signal data of signal gathering unit.
Step S200, main control unit starts to send sampled signal each second, and the signal of each signal gathering unit interior collection per second is numbered respectively, and the data of each signal gathering unit collection package according to default form.
Further, main control unit starts to send sampled signal each second, and the concrete grammar that the signal of each signal gathering unit interior collection per second is numbered is respectively: the data that each signal gathering unit each second gathers are numbered respectively 0 in order, 1,2,3 ..., f-1; While starting to next second, described numbering zero clearing also re-starts numbering according to above-mentioned method for numbering serial; Wherein f is sample frequency.For example: main control unit starts to send first sampling second, the data that main control unit samples out to signal gathering unit according to sample frequency are numbered, to next second, will number zero clearing at first, the numbering of again starting from scratch, supposes that sample rate is 4KHZ, the numbering gathering is so exactly to circulate from 0-3999, the data number gathering in first second is 0,1,2,3 ..., 3999; When second second starts, number zero clearing, and the data that gather in second second are renumberd is 0,1,2,3 ..., 3999; By that analogy.
Further, the default form described in the present embodiment is data packet length, device identification, collection numbering, data type sign 1, data bulk 1, data 1 ... data n ..., data type sign n, data bulk n, data 1 ... data n, verification.Wherein " data packet length " represents the length of whole packet; " device identification " represents the unique identifier of each signal gathering unit, is used for distinguishing different signal gathering unit; " gather numbering " represents that these bag data are which collects, above numbering described in embodiment; " data type sign " is used for distinguishing dissimilar data; " data bulk " represents that the data of the type have how many; " data " represent the actual data value of the type; " verification " carries out verification to complete package data, guarantees the integrality of data.
Step S300, main control unit receives the data of signal gathering unit, controls the data format alignment with identical numbering of unlike signal collecting unit and the packet of same signal gathering unit and stores according to described number order.
Main control unit receive after the data of each signal gathering unit by the packet of same collecting unit by number order place, the packet of different acquisition units is placed by identical numbering alignment, whole like this distributed devices signals collecting data reach Complete Synchronization.Particularly, the concrete grammar of the data packet format alignment with identical numbering of control unlike signal collecting unit is: control the packet with identical numbering of described unlike signal collecting unit according to data packet length, device identification, collection numbering, data type sign 1, data bulk 1, data 1 ... data n ..., data type sign n, data bulk n, data 1 ... the form of data n, verification carries out correspondence one by one and arranges and store.
Can all information of signal gathering unit are all synchronous in the above embodiment, because distributed devices need to be carried out distributing installation, signal gathering unit is indefinite apart from the distance of main control unit, while adding GPS school than each collecting unit, cost has obtained effective reduction, and has effectively guaranteed correcting delay precision.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (5)

1. a synchronous method for distributed devices, a plurality of signal gathering unit that described distributed devices comprises main control unit and is connected with main control unit, is characterized in that: described synchronous method comprises the following steps,
Step S100, according to IEEE1588 clock synchronization protocol, controls when a plurality of signal gathering unit are carried out school with main control unit and synchronizes;
Step S200, main control unit starts to send sampled signal each second, and the signal of each signal gathering unit interior collection per second is numbered respectively, and the data of each signal gathering unit collection package according to default form.
Step S300, main control unit receives the data of signal gathering unit, controls the data format alignment with identical numbering of unlike signal collecting unit and the packet of same signal gathering unit and stores according to described number order.
2. the synchronous method of distributed devices according to claim 1, is characterized in that: described step S100 specifically comprises,
S110, main control unit sends Sync message to described signal gathering unit, and records the time that Sync leaves main control unit, is recorded as timestamp t1;
S120, signal gathering unit receives the time of Sync message this message of record reception, is recorded as time stamp T s1;
S130, main control unit sends Follow Up message with timestamp t1 information to signal gathering unit, signal gathering unit receive Follow Up message and writing time t1.
S140, signal gathering unit sends Delay request message to described main control unit, and records the time that Delay request message leaves signal gathering unit, is recorded as timestamp t2.
S150, main control unit receives Delay request message, and record receives the time of this message, is recorded as time stamp T m2.
S160, main control unit sends Delay response message with time stamp T m2 information again to described signal gathering unit, signal gathering unit receive Delay response message and writing time Tm2.
S170, differs from dt=[(Ts1-t1 computing time)-(Tm2-t2)]/2, network delay Delay=[(Ts1-t1)+(Tm2-t2)]/2;
S180, signal gathering unit is synchronizeed with main control unit according to the clock of described time difference dt and network delay Delay setting oneself.
3. the synchronous method of distributed devices according to claim 1, it is characterized in that: in step S200, main control unit starts to send sampled signal each second, and the concrete grammar that the signal of each signal gathering unit interior collection per second is numbered is respectively: the data of each signal gathering unit collection in each second are numbered respectively 0 in order, 1,2,3 ..., f-1; While starting to next second, described numbering zero clearing also re-starts numbering according to above-mentioned method for numbering serial; Wherein f is sample frequency.
4. the synchronous method of distributed devices according to claim 3, is characterized in that: the default form of described data is data packet length, device identification, collection numbering, data type sign 1, data bulk 1, data 1 ... data n ..., data type sign n, data bulk n, data 1 ... data n, verification.
5. the synchronous method of distributed devices according to claim 4, it is characterized in that: in step S300, the concrete grammar of controlling the data packet format alignment with identical numbering of unlike signal collecting unit is: control the packet with identical numbering of described unlike signal collecting unit according to data packet length, device identification, collection numbering, data type sign 1, data bulk 1, data 1 ... data n ..., data type sign n, data bulk n, data 1 ... the form of data n, verification carries out correspondence one by one and arranges and store.
CN201310559601.1A 2013-11-12 2013-11-12 Synchronous method of distributed device Pending CN103684735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310559601.1A CN103684735A (en) 2013-11-12 2013-11-12 Synchronous method of distributed device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310559601.1A CN103684735A (en) 2013-11-12 2013-11-12 Synchronous method of distributed device

Publications (1)

Publication Number Publication Date
CN103684735A true CN103684735A (en) 2014-03-26

Family

ID=50321134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310559601.1A Pending CN103684735A (en) 2013-11-12 2013-11-12 Synchronous method of distributed device

Country Status (1)

Country Link
CN (1) CN103684735A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109842603A (en) * 2017-11-29 2019-06-04 北京通号国铁城市轨道技术有限公司 A kind of method for synchronizing time and device
CN111464255A (en) * 2020-04-02 2020-07-28 西人马(西安)测控科技有限公司 CP L D-based data synchronization method and data acquisition device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003028258A1 (en) * 2001-09-26 2003-04-03 Siemens Aktiengesellschaft Method for synchronising nodes of a communications system
CN101242231A (en) * 2008-03-03 2008-08-13 电子科技大学 Clock synchronization device for synchronous phase measuring in power system
CN101316160A (en) * 2008-06-11 2008-12-03 南京磐能电力科技股份有限公司 Multi-node synchronization sampling and data transmission method
CN102006159A (en) * 2010-12-08 2011-04-06 江苏方天电力技术有限公司 Multi-slave clock sampling value multi-interface synchronizing system based on IEEE1588
CN102098153A (en) * 2011-01-26 2011-06-15 北京世源信通科技有限公司 Method and device for self-synchronizing data acquisition system
CN102355055A (en) * 2011-09-09 2012-02-15 航天科工深圳(集团)有限公司 Acquisition terminal of power distribution network capable of realizing data synchronization

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003028258A1 (en) * 2001-09-26 2003-04-03 Siemens Aktiengesellschaft Method for synchronising nodes of a communications system
CN101242231A (en) * 2008-03-03 2008-08-13 电子科技大学 Clock synchronization device for synchronous phase measuring in power system
CN101316160A (en) * 2008-06-11 2008-12-03 南京磐能电力科技股份有限公司 Multi-node synchronization sampling and data transmission method
CN102006159A (en) * 2010-12-08 2011-04-06 江苏方天电力技术有限公司 Multi-slave clock sampling value multi-interface synchronizing system based on IEEE1588
CN102098153A (en) * 2011-01-26 2011-06-15 北京世源信通科技有限公司 Method and device for self-synchronizing data acquisition system
CN102355055A (en) * 2011-09-09 2012-02-15 航天科工深圳(集团)有限公司 Acquisition terminal of power distribution network capable of realizing data synchronization

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109842603A (en) * 2017-11-29 2019-06-04 北京通号国铁城市轨道技术有限公司 A kind of method for synchronizing time and device
CN111464255A (en) * 2020-04-02 2020-07-28 西人马(西安)测控科技有限公司 CP L D-based data synchronization method and data acquisition device

Similar Documents

Publication Publication Date Title
US9742514B2 (en) Method, apparatus, and system for generating timestamp
CN101364863B (en) Time synchronizing method, apparatus and system for master, slave time clock side in synchronous network
CN102013931B (en) Time synchronization method and system, salve timing device and main timing device
CN104836630B (en) IEEE1588 clock synchronization system and implementation method therefor
CN101888541B (en) Method for reconstructing digital video data stream and apparatus thereof
CN102136900B (en) Time synchronization method for passive optical network, device and system
CN102449940B (en) Network synchronization method and apparatus for performing time synchronization between nodes
EP2595331A2 (en) Communication apparatus for performing time synchronization
CN108650051A (en) The clock synchronization apparatus and method of general devices at full hardware single step 1588
CN110120846B (en) Clock synchronization method and system
CN105743598B (en) A kind of Industrial Ethernet clock synchronizing method and system
CN101771528B (en) Method, device and system for realizing clock synchronization
CN102082653B (en) Method, system and device for clock synchronization
WO2021008532A1 (en) Active antenna unit delay alignment method and apparatus and active antenna unit
CN102932083A (en) Microwave time synchronization method and device
CN107182123A (en) The synchronous method and synchronization system of a kind of UWB alignment systems
CN102469377A (en) Ethernet passive optical network (EPON) system and method for realizing end-to-end transparent clock in system
CN101247169A (en) Method, system and equipment for implementing time synchronization in communication network
RU2015108423A (en) SYNCHRONIZATION METHOD IN DATA COLLECTION SYSTEM
CN101719867B (en) Method and system for clock recovery in packet switching network
CN108551378B (en) A kind of radiofrequency signal remote transmission method
CN103313381A (en) Synchronization method of wireless communication transmitting base stations
CN102916758A (en) Ethernet time synchronization device and network equipment
CN104144047A (en) Synchronization method of communication network system, intermediate node and slave node
CN109921871A (en) A kind of method for synchronizing time, device and network system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140326