CN111506000B - Synchronous sampling device based on non-real-time bus - Google Patents

Synchronous sampling device based on non-real-time bus Download PDF

Info

Publication number
CN111506000B
CN111506000B CN202010446211.3A CN202010446211A CN111506000B CN 111506000 B CN111506000 B CN 111506000B CN 202010446211 A CN202010446211 A CN 202010446211A CN 111506000 B CN111506000 B CN 111506000B
Authority
CN
China
Prior art keywords
sampling
fpga
real
time
sampling module
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.)
Active
Application number
CN202010446211.3A
Other languages
Chinese (zh)
Other versions
CN111506000A (en
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.)
Nanjing SAC Automation Co Ltd
Original Assignee
Nanjing SAC Automation 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 Nanjing SAC Automation Co Ltd filed Critical Nanjing SAC Automation Co Ltd
Priority to CN202010446211.3A priority Critical patent/CN111506000B/en
Publication of CN111506000A publication Critical patent/CN111506000A/en
Application granted granted Critical
Publication of CN111506000B publication Critical patent/CN111506000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0428Safety, monitoring
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2612Data acquisition interface

Abstract

The invention discloses a synchronous sampling device based on a non-real-time bus, which comprises a mainframe box and an expansion case, wherein the mainframe box is connected with a CAN bus and comprises a first FPGA; the expansion cabinet comprises a second FPGA and a second sampling module; the first FPGA generates a first internal time reference and transmits the first internal time reference to the second FPGA; after receiving the first internal time reference, the second FPGA generates a second internal time reference synchronous with the first internal time reference; the second sampling module processes the obtained second internal time reference to obtain time information containing seconds and nanoseconds; the second sampling module generates sampling pulses, adds time information containing seconds and nanoseconds to each sampling value, sends the sampling values to the second FPGA, the second FPGA generates sampling pulses of alternating current analog quantity, and adds time information containing seconds and nanoseconds to each sampling value; and the second FPGA sends all the sampling values to the first FPGA. The invention does not depend on a real-time operating system and a real-time sampling mechanism, and can ensure the synchronization of alternating current sampling, switching value and DC direct current value.

Description

Synchronous sampling device based on non-real-time bus
Technical Field
The invention belongs to the technical field of communication of electric power digital substations, and particularly relates to a synchronous sampling device based on a non-real-time bus.
Background
The traditional fault recorder often uses a real-time bus and a real-time operating system, including a real-time bus such as SPI, I2C and the like to sample analog quantity and switching quantity. Because real-time sampling requires high CPU processing capacity, data sampling needs to be completed in real time. If the non-real-time bus is adopted, the load of the CPU can be effectively reduced, the universality of product design is improved, and the method has practical significance for subsequent replacement of the processor or use of a non-real-time operating system.
Disclosure of Invention
Aiming at the problems, the invention provides a synchronous sampling device based on a non-real-time bus, which does not depend on a real-time operating system and a real-time sampling mechanism, has strong universality and can ensure the synchronization of alternating current sampling, switching value and DC direct current value.
In order to achieve the technical purpose and achieve the technical effects, the invention is realized by the following technical scheme:
a non-real time bus based synchronous sampling apparatus, comprising:
the main case comprises a first FPGA;
at least one expansion cabinet, wherein the expansion cabinet comprises a second FPGA and a second sampling module which are connected;
the mainframe box and the expansion box are both connected with a CAN bus;
the first FPGA generates a first internal time reference and transmits the first internal time reference to a second FPGA; after receiving the first internal time reference, the second FPGA generates a second internal time reference synchronous with the first internal time reference;
the second sampling module processes the obtained second internal time reference to obtain time information containing seconds and nanoseconds;
the second sampling module generates sampling pulses, adds time information containing seconds and nanoseconds to each sampling value, then sends the sampling values to a corresponding second FPGA, and simultaneously the second FPGA generates sampling pulses of alternating current analog quantity and adds time information containing seconds and nanoseconds to each sampling value;
and the second FPGA sends all sampling values to the first FPGA to complete synchronous sampling.
Optionally, the main chassis further includes a first sampling module connected to the first FPGA, and the first sampling module processes the obtained first internal time reference to obtain time information including seconds and nanoseconds;
the first sampling module generates sampling pulses, time information containing seconds and nanoseconds is added to each sampling value, then the sampling values are sent to the corresponding first FPGA, meanwhile, the first FPGA generates sampling pulses of alternating current analog quantity, and time information containing seconds and nanoseconds is added to each sampling value.
Optionally, each second sampling module and each first sampling module are transmitted to the corresponding FPGA by using a packet splicing mechanism.
Optionally, the first internal time reference is transmitted in IRIG-B format; the first sampling module and the second sampling module comprise a first timer, a second timer and a third timer;
the first timer captures a first internal time reference;
when the second timer decodes the received first internal time reference in the IRIG-B format, the second timer is cleared at the time of the whole second and 10 groups of interval code elements of the IRIG-B to obtain time information containing seconds and nanoseconds;
and the third timer is used for generating switching value sampling pulses with sampling frequency of 10KHz and adding time information containing seconds and nanoseconds to each sampling value.
Optionally, the number of the first sampling module and the second sampling module is one or more, and when the number of the first sampling module and the second sampling module is more than one, the first sampling module and the second sampling module are open-in modules and/or direct current acquisition modules.
Optionally, when the second sampling module is an open-in module, after receiving the switching value message sent by the corresponding second sampling module, the second FPGA judges the switching value displacement and sends the switching value displacement to the first FPGA according to the format of the GOOSE message.
Optionally, the sending to the first FPGA according to the format of the GOOSE packet includes:
when the switching value has no displacement, the GOOSE message is sent according to a heartbeat message of 1 ms;
and after the switching value is shifted, sending a message to the first FPGA according to a GOOSE shift mechanism of 200us, 200us, 400us and 800 us.
Optionally, the synchronous sampling device based on the non-real-time bus further includes a processor, and after receiving the sampling message sent by the second FPGA, the first FPGA adds absolute time information synchronized with an external GPS device, and finally transmits the absolute time information to the processor through the PCI-E bus for fault recording and fault analysis.
Optionally, after receiving the message, the processor synchronizes data according to time information including seconds and nanoseconds.
Optionally, the first FPGA and the second FPGA respectively generate 10KHz sampling pulses through an internal digital phase-locked loop technology, and are used for collecting alternating current analog quantities.
Compared with the prior art, the invention has the beneficial effects that:
in the invention, because the alternating current analog quantity, the switching value and the DC direct current quantity are completed by different processors, and an error retransmission mechanism exists in the CAN-FD communication process, in order to ensure the synchronization of the alternating current sampling, the switching value and the DC direct current quantity, the invention adopts a synchronization mechanism of a non-real-time bus.
Drawings
In order that the present disclosure may be more readily and clearly understood, reference is now made to the following detailed description of the present disclosure taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a communication block diagram of a fault recorder according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an AC analog acquisition process according to an embodiment of the present invention
Fig. 3 is a schematic diagram of a switching value acquisition process according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of the invention.
The following detailed description of the principles of the invention is provided in connection with the accompanying drawings.
Example 1
As shown in fig. 1 to 3, an embodiment of the present invention provides a synchronous sampling apparatus based on a non-real-time bus, including:
the main case comprises a first FPGA;
at least one expansion cabinet, wherein the expansion cabinet comprises a second FPGA and a second sampling module which are connected;
the mainframe box and the expansion box are both connected with a CAN bus, namely the CAN _ FD bus in fig. 1;
the first FPGA generates a first internal time reference and transmits the first internal time reference to a second FPGA; after receiving the first internal time reference, the second FPGA generates a second internal time reference synchronous with the first internal time reference; in the actual use process, the first FPGA is connected with the second FPGA through an IRIG-B time bus to transmit the first internal time reference; the first FPGA is also connected with external GPS equipment through an IRIG-B time bus to synchronize absolute time; the first FPGA is not only used for completing a time synchronization management function, but also used for recording various wave recording events;
the second sampling module processes the obtained second internal time reference to obtain time information containing seconds and nanoseconds;
the second sampling module generates sampling pulses, adds time information containing seconds and nanoseconds to each sampling value, then sends the sampling values to a corresponding second FPGA, and simultaneously the second FPGA generates sampling pulses of alternating current analog quantity and adds time information containing seconds and nanoseconds to each sampling value;
and the second FPGA sends all sampling values to the first FPGA to complete synchronous sampling.
In a specific implementation manner of the embodiment of the present invention, because the CAN-FD supports maximum 64-byte packet transmission, and multiple second sampling modules need bus contention, in order to improve communication efficiency of a bus, each second sampling module transmits to a corresponding FPGA by using a packet splicing mechanism, for example, each second sampling module may transmit to a corresponding second FPGA by using a packet splicing mechanism of 5 packets. The second sampling module may be a switch module and/or a dc module.
In a specific implementation of the embodiment of the present invention, the first internal time reference is transmitted in an IRIG-B format; the first sampling module and the second sampling module comprise a first timer, a second timer and a third timer;
the first timer captures a first internal time reference using its capture function;
when the second timer decodes the received first internal time reference in the IRIG-B format, the second timer is cleared at the time of the whole second and 10 groups of interval code elements of the IRIG-B to obtain time information containing seconds and nanoseconds; in specific implementation, 100 code elements in the format of the IRIG-B are equally divided into 10 groups, so that the interval between each group is 100ms, the second timer is a 24-bit timer, a main frequency clock is 100MHz, the counting range is 0-167772160 ns, the resolution is 10ns, the requirement of the sampling precision of a wave recorder is met, the second timer is used for counting from 0 when the code element interval of the IRIG-B is identified, and is cleared when the whole second moment and 10 groups of interval code elements of the IRIG-B are reached, and the synchronization of the second sampling module and the internal time reference of the first FPGA is completed;
the third timer is used for generating switching value sampling pulses with sampling frequency of 10KHz, and adding time information containing seconds and nanoseconds to each sampling value, namely adding an 8-byte internal time reference, wherein the 8-byte internal time reference comprises 4-byte second information and 4-byte nanosecond information, and the nanosecond information is generated by the second timer.
In a specific implementation manner of the embodiment of the present invention, the number of the first sampling module and the second sampling module is one or more, and when the number of the first sampling module and the second sampling module is more than one, the first sampling module and the second sampling module are open modules and/or direct current acquisition modules.
In a specific implementation manner of the embodiment of the present invention, when the second sampling module is an open-in module, after receiving the switching value packet sent by the corresponding second sampling module, the second FPGA determines the switching value shift, and sends the switching value shift to the first FPGA according to the format of the GOOSE packet. The sending to the first FPGA according to the format of the GOOSE packet includes:
when the switching value has no displacement, the GOOSE message is sent according to a heartbeat message of 1 ms;
and after the switching value is shifted, sending a message to the first FPGA according to a GOOSE shift mechanism of 200us, 200us, 400us and 800 us.
In a specific implementation manner of the embodiment of the present invention, the first FPGA and the second FPGA respectively use 10KHz sampling pulses generated by an internal digital phase-locked loop technology to collect ac analog quantities.
Example 2
Based on example 1, the inventive example differs from example 1 in that:
the synchronous sampling device based on the non-real-time bus further comprises a processor, after the first FPGA receives a sampling message sent by the second FPGA, absolute time information synchronous with external GPS equipment is added, and finally, the absolute time information is transmitted to the processor through the PCI-E bus for fault recording and fault analysis. And after receiving the message, the processor synchronizes data according to the time information containing seconds and nanoseconds.
Example 3
Based on example 1, the inventive example differs from example 1 in that:
the main case further comprises a first sampling module connected with the first FPGA, and the first sampling module processes the obtained first internal time reference to obtain time information containing seconds and nanoseconds;
the first sampling module generates sampling pulses, time information containing seconds and nanoseconds is added to each sampling value, then the sampling values are sent to the corresponding first FPGA, meanwhile, the first FPGA generates sampling pulses of alternating current analog quantity, and time information containing seconds and nanoseconds is added to each sampling value.
The first sampling module may be a switch module and/or a dc module.
The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (10)

1. A synchronous sampling device based on a non-real time bus, comprising:
the main case comprises a first FPGA;
at least one expansion cabinet, wherein the expansion cabinet comprises a second FPGA and a second sampling module which are connected;
the mainframe box and the expansion box are both connected with a CAN bus;
the first FPGA generates a first internal time reference and transmits the first internal time reference to a second FPGA; after receiving the first internal time reference, the second FPGA generates a second internal time reference synchronous with the first internal time reference;
the second sampling module processes the obtained second internal time reference to obtain time information containing seconds and nanoseconds;
the second sampling module generates sampling pulses, adds time information containing seconds and nanoseconds to each sampling value, then sends the sampling values to a corresponding second FPGA, and simultaneously the second FPGA generates sampling pulses of alternating current analog quantity and adds time information containing seconds and nanoseconds to each sampling value;
and the second FPGA sends all sampling values to the first FPGA to complete synchronous sampling.
2. The synchronous sampling device based on the non-real-time bus according to claim 1, wherein: the main case further comprises a first sampling module connected with the first FPGA, and the first sampling module processes the obtained first internal time reference to obtain time information containing seconds and nanoseconds;
the first sampling module generates sampling pulses, time information containing seconds and nanoseconds is added to each sampling value, then the sampling values are sent to the corresponding first FPGA, meanwhile, the first FPGA generates sampling pulses of alternating current analog quantity, and time information containing seconds and nanoseconds is added to each sampling value.
3. The synchronous sampling device based on the non-real-time bus according to claim 2, wherein: and each second sampling module and each first sampling module are transmitted to the corresponding FPGA by adopting a packet splicing mechanism.
4. The synchronous sampling device based on the non-real-time bus according to claim 2, wherein: the first internal time reference is transmitted in IRIG-B format; the first sampling module and the second sampling module comprise a first timer, a second timer and a third timer;
the first timer captures a first internal time reference;
when the second timer decodes the received first internal time reference in the IRIG-B format, the second timer is cleared at the time of the whole second and 10 groups of interval code elements of the IRIG-B to obtain time information containing seconds and nanoseconds;
and the third timer is used for generating switching value sampling pulses with sampling frequency of 10KHz and adding time information containing seconds and nanoseconds to each sampling value.
5. The synchronous sampling device based on the non-real-time bus according to claim 2, wherein: the number of the first sampling module and the second sampling module is one or more, and when the number of the first sampling module and the second sampling module is more, the first sampling module and the second sampling module are open modules and/or direct current acquisition modules.
6. The synchronous sampling device based on the non-real-time bus according to claim 1, wherein: and when the second sampling module is an open-in module, after receiving the switching value message sent by the corresponding second sampling module, the second FPGA judges the switching value deflection and sends the switching value deflection to the first FPGA according to the format of the GOOSE message.
7. The synchronous sampling device based on the non-real-time bus as claimed in claim 6, wherein: the sending to the first FPGA according to the format of the GOOSE packet includes:
when the switching value has no displacement, the GOOSE message is sent according to a heartbeat message of 1 ms;
and after the switching value is shifted, sending a message to the first FPGA according to a GOOSE shift mechanism of 200us, 200us, 400us and 800 us.
8. The synchronous sampling device based on the non-real-time bus according to claim 1, wherein: the synchronous sampling device based on the non-real-time bus further comprises a processor, after the first FPGA receives a sampling message sent by the second FPGA, absolute time information synchronous with external GPS equipment is added, and finally, the absolute time information is transmitted to the processor through the PCI-E bus for fault recording and fault analysis.
9. The synchronous sampling device based on the non-real-time bus according to claim 8, wherein: and after receiving the message, the processor synchronizes data according to the time information containing seconds and nanoseconds.
10. The synchronous sampling device based on the non-real-time bus according to claim 1, wherein: the first FPGA and the second FPGA are used for collecting alternating current analog quantity through 10KHz sampling pulses generated by an internal digital phase-locked loop technology.
CN202010446211.3A 2020-05-25 2020-05-25 Synchronous sampling device based on non-real-time bus Active CN111506000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010446211.3A CN111506000B (en) 2020-05-25 2020-05-25 Synchronous sampling device based on non-real-time bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010446211.3A CN111506000B (en) 2020-05-25 2020-05-25 Synchronous sampling device based on non-real-time bus

Publications (2)

Publication Number Publication Date
CN111506000A CN111506000A (en) 2020-08-07
CN111506000B true CN111506000B (en) 2021-07-30

Family

ID=71875385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010446211.3A Active CN111506000B (en) 2020-05-25 2020-05-25 Synchronous sampling device based on non-real-time bus

Country Status (1)

Country Link
CN (1) CN111506000B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888320A (en) * 2014-04-14 2014-06-25 北京四方继保自动化股份有限公司 Switch device and method for measuring transmission delay through FPGA
CN105549379A (en) * 2015-12-23 2016-05-04 中国电子科技集团公司第四十一研究所 Synchronous measurement apparatus based on high precision time reference triggering and method thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102005029655A1 (en) * 2005-06-23 2006-12-28 Hilscher Gesellschaft für Systemautomation mbH Bus subscribers synchronization method for automation system, involves exchanging values with control unit between synchronization time points, where interrupt latency periods of unit is not inputted in direct synchronization of functions
CN104750068B (en) * 2015-02-13 2018-08-21 湖北锐世数字医学影像科技有限公司 A kind of data transmission and control device of multinode sensor network
CN105572516B (en) * 2016-02-19 2018-12-18 成都府河电力自动化成套设备有限责任公司 Multi-functional FPGA acquisition unit with time reference output
CN106209090B (en) * 2016-06-30 2019-07-26 中国西电电气股份有限公司 A kind of combining unit pulse per second (PPS) synchronism output system and method based on FPGA
CN107577140B (en) * 2017-09-14 2019-11-05 国电南瑞科技股份有限公司 A kind of synchronised clock management module based on FPGA

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888320A (en) * 2014-04-14 2014-06-25 北京四方继保自动化股份有限公司 Switch device and method for measuring transmission delay through FPGA
CN105549379A (en) * 2015-12-23 2016-05-04 中国电子科技集团公司第四十一研究所 Synchronous measurement apparatus based on high precision time reference triggering and method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《DSP和FPGA协同处理的雷达时间同步方法》;胡进忠;《单片机与嵌入式系统应用》;20190801(第8期);第11页-第13页 *
《Research on multi-time scale doubly-fed wind turbine test system based on FPGA+CPU heterogeneous calculation》;Qing Mu;《Global Energy Interconnection》;20190228(第2期);第7页-第18页 *

Also Published As

Publication number Publication date
CN111506000A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN106124936B (en) A kind of Distributed power net method for locating single-phase ground fault
WO2012075881A1 (en) Ieee1588-based sampled value multi-interface synchronization system for multiple slave clocks
CN106099879B (en) A kind of flexible direct current distribution network line differential protection system and differential protection implementation method
MX2013014501A (en) Systems for synchrophasor data management.
US20120278421A1 (en) Providing a data sample in a measurement and control system
CN102710012B (en) Data resynchronization method for analyzing fault waveform of intelligent transformer substation
CN102055544A (en) System and method for synchronously monitoring secondary equipment time of power supply system
CN105572516B (en) Multi-functional FPGA acquisition unit with time reference output
WO2015070707A1 (en) Method for acquiring universal data of intelligent substation
CN107959969A (en) A kind of method for synchronizing time applied to transient state recording type fault detector
Kezunovic Monitoring of power system topology in real-time
CN102315985A (en) Time synchronization precision test method for intelligent device adopting IEEE1588 protocols
CN107727910B (en) Synchronous collection system of transformer substation's electric current based on passive electronic transformer
CN109742741A (en) A kind of relay protection method of data synchronization for active power distribution network
CN102546147A (en) Method for realizing accurate network timing of wide-area protection system on basis of SDH (Synchronous Digital Hierarchy) network
CN111506000B (en) Synchronous sampling device based on non-real-time bus
CN108008676B (en) Multi-processing unit relay protection system and synchronization method thereof
CN110456174B (en) Three-phase synchronization method and system based on crystal oscillator proportional time synchronization
CN102158381A (en) Dual-mode network data acquisition device in smart grid and network data acquisition system
CN113659545B (en) Interpolation synchronization method and system for 5G differential protection sampling data of power distribution network
CN202035001U (en) Dual mode network data acquisition device and network data acquisition system of intelligent electric network
Bao-wei et al. Research on the scheme of the sample synchronization scheme for optical differential protection scheme in merge unit
Yulin et al. Research on the real-time transfer protocol for harmonic and interharmonic synchrophasors
CN203871848U (en) Bus protective device based on voltage phase-locked networked sampling
JP2001109781A (en) System for collecting data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant