CN117389183A - Chained power source control method and system based on determined time slot - Google Patents
Chained power source control method and system based on determined time slot Download PDFInfo
- Publication number
- CN117389183A CN117389183A CN202311379414.5A CN202311379414A CN117389183A CN 117389183 A CN117389183 A CN 117389183A CN 202311379414 A CN202311379414 A CN 202311379414A CN 117389183 A CN117389183 A CN 117389183A
- Authority
- CN
- China
- Prior art keywords
- power source
- fpga
- ethernet
- sub
- frame
- 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
Links
- 238000000034 method Methods 0.000 title claims description 18
- 238000005070 sampling Methods 0.000 claims abstract description 109
- 239000013307 optical fiber Substances 0.000 claims abstract description 14
- 238000006243 chemical reaction Methods 0.000 claims description 15
- 230000003321 amplification Effects 0.000 claims description 11
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 11
- 230000001360 synchronised effect Effects 0.000 claims description 5
- 125000006850 spacer group Chemical group 0.000 claims 4
- 230000002457 bidirectional effect Effects 0.000 abstract 1
- 230000001186 cumulative effect Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/24—Pc safety
- G05B2219/24215—Scada supervisory control and data acquisition
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Small-Scale Networks (AREA)
Abstract
本发明公开了一种基于确定时隙的链式功率源控制系统,包括主FPGA,主FPGA包括以太网A和以太网B,每个功率源均包括以太网A和以太网B,功率源的以太网B与下一级功率源的以太网A通过光纤连接,进而实现各个功率源的串接,首端的功率源的以太网A与主FPGA的以太网A通过光纤连接,尾端的功率源的以太网B和主FPGA的以太网B通过光纤连接,本发明还公开了一种基于确定时隙的链式功率源控制系统。本发明的采样序号数据序列采用双向环路传播,提高了采样序号数据序列传播以及功率源控制的可靠性,同时具备环路断开报警提醒、功率源不在环提醒、以及功率源故障提醒。
The invention discloses a chain power source control system based on determined time slots, which includes a main FPGA. The main FPGA includes Ethernet A and Ethernet B. Each power source includes Ethernet A and Ethernet B. The power source Ethernet B is connected to Ethernet A of the next-level power source through optical fiber, thereby realizing the serial connection of each power source. Ethernet A of the head-end power source is connected to Ethernet A of the main FPGA through optical fiber, and the Ethernet A of the tail-end power source is connected through optical fiber. Ethernet B and the Ethernet B of the main FPGA are connected through optical fibers. The invention also discloses a chain power source control system based on determined time slots. The sampling number data sequence of the present invention adopts bidirectional loop propagation, which improves the reliability of sampling number data sequence propagation and power source control. It also has loop disconnection alarm reminder, power source out-of-loop reminder, and power source failure reminder.
Description
技术领域Technical field
本发明涉及电力模拟功率源技术领域,具体涉及一种基于确定时隙的链式功率源控制系统,还涉及一种基于确定时隙的链式功率源控制方法。The invention relates to the technical field of electric power analog power sources, specifically to a chain power source control system based on a determined time slot, and also relates to a chain power source control method based on a determined time slot.
背景技术Background technique
在电力系统继电保护测试中,经常用到模拟量功率设备,单一模拟量功率源无法满足整间隔或整站测试,需要多台功率源设备。一般常规模拟量功率源采用模拟小信号输入或者采用单一以太网接口接入,当多台模拟量功率源需要接入系统时,其常规的模拟小信号或单一以太网方式就无法满足测试需要。In power system relay protection testing, analog power equipment is often used. A single analog power source cannot meet the entire interval or entire station test, and multiple power source equipment is required. Generally, conventional analog power sources use analog small signal input or use a single Ethernet interface to connect. When multiple analog power sources need to be connected to the system, the conventional analog small signal or single Ethernet method cannot meet the test needs.
发明内容Contents of the invention
本发明的目的在于针对现有技术存在的上述问题,提供一种基于确定时隙的链式功率源控制系统,还提供一种基于确定时隙的链式功率源控制方法。The purpose of the present invention is to provide a chain power source control system based on determined time slots and a chain power source control method based on determined time slots in order to solve the above-mentioned problems existing in the prior art.
一种基于确定时隙的链式功率源控制系统,包括主FPGA,主FPGA包括以太网A和以太网B,每个功率源均包括以太网A和以太网B,功率源的以太网B与下一级功率源的以太网A通过光纤连接,各个功率源串接,首端的功率源的以太网A与主FPGA的以太网A通过光纤连接,尾端的功率源的以太网B和主FPGA的以太网B通过光纤连接,A chain power source control system based on determined time slots, including a main FPGA. The main FPGA includes Ethernet A and Ethernet B. Each power source includes Ethernet A and Ethernet B. The Ethernet B and Ethernet B of the power source are The Ethernet A of the next-level power source is connected through optical fiber, and each power source is connected in series. The Ethernet A of the head-end power source is connected to the Ethernet A of the main FPGA through optical fiber. The Ethernet B of the tail-end power source is connected to the Ethernet B of the main FPGA. Ethernet B is connected via optical fiber,
所述功率源包括子FPGA、数模转换模块、以及功率放大模块,子FPGA包括以太网A和以太网B,子FPGA与数模转换模块连接,数模转换模块与功率放大模块连接,The power source includes a sub-FPGA, a digital-to-analog conversion module, and a power amplification module. The sub-FPGA includes Ethernet A and Ethernet B. The sub-FPGA is connected to the digital-to-analog conversion module, and the digital-to-analog conversion module is connected to the power amplification module.
主FPGA生成采样序号数据序列,采样序号数据序列依次包括时间同步帧和多个功率源数据帧,功率源数据帧与功率源一一对应;The main FPGA generates a sampling number data sequence. The sampling number data sequence includes a time synchronization frame and multiple power source data frames. The power source data frame corresponds to the power source one-to-one;
主FPGA将采样序号数据序列分别从以太网A和以太网B发出,从主FPGA的以太网A发出的采样序号数据序列按照首端子FPGA至尾端子FPGA的顺向环路传播方向依次经过各个子FPGA,并从主FPGA的以太网B接收;从主FPGA的以太网B发出的采样序号数据序列按照尾端子FPGA至首端子FPGA的逆向环路传播方向依次经过各个子FPGA,并从主FPGA的以太网A接收;The main FPGA sends the sampling sequence number data sequence from Ethernet A and Ethernet B respectively. The sampling sequence number data sequence sent from the Ethernet A of the main FPGA passes through each sub-connector in sequence according to the forward loop propagation direction from the first terminal FPGA to the last terminal FPGA. FPGA, and receives it from the Ethernet B of the main FPGA; the sampling sequence number data sequence sent from the Ethernet B of the main FPGA passes through each sub-FPGA in sequence according to the reverse loop propagation direction from the tail terminal FPGA to the first terminal FPGA, and is transmitted from the main FPGA Ethernet A receive;
子FPGA对于不同环路传播方向的同一个采样序号数据序列,选用先到的采样序号数据序列,解析采样序号数据序列中的时间同步帧和功率源数据帧,根据时间同步帧更新子FPGA的系统时间,根据功率源数据帧输出对应的电压和电流;For the same sampling number data sequence in different loop propagation directions, the sub-FPGA selects the first arriving sampling number data sequence, analyzes the time synchronization frame and power source data frame in the sampling number data sequence, and updates the sub-FPGA system based on the time synchronization frame. time, and output the corresponding voltage and current according to the power source data frame;
主PFGA根据接收到采样序号数据序列,判断环路传播方向是否断开、功率源是否在环、以及功率源是否故障。Based on the received sampling sequence number data sequence, the main PFGA determines whether the loop propagation direction is disconnected, whether the power source is in the loop, and whether the power source is faulty.
如上所述时间同步帧包括帧间隔符,目的地址,源地址,帧类型,时间同步字段,以及帧校验;As mentioned above, the time synchronization frame includes frame separator, destination address, source address, frame type, time synchronization field, and frame check;
时间同步字段包括主时钟时间、单级路径延时、本级累计时延、采样率、以及采样序号;The time synchronization field includes the main clock time, single-stage path delay, accumulated delay of this stage, sampling rate, and sampling sequence number;
单级路径延时为主FPGA到下一个子FPGA的路径延时或者相邻两个子FPGA之间多路径延时;The single-stage path delay is the path delay from the main FPGA to the next sub-FPGA or the multi-path delay between two adjacent sub-FPGAs;
本级累计时延,子FPGA将接收的时间同步帧中的本级累计时延加上单级路径延时再加上本级转发时延,得到修正后的本级累计时延再写到时间同步帧中的本级累计时延,本级转发时延是本级子FPGA的以太网A接收数据开始到转发给本级子FPGA的以太网B为止的时间,The cumulative delay of this level. The sub-FPGA adds the cumulative delay of this level in the received time synchronization frame plus the single-level path delay plus the forwarding delay of this level to obtain the corrected cumulative delay of this level and then writes it to the time The cumulative delay of this level in the synchronization frame. The forwarding delay of this level is the time from when the Ethernet A of the sub-FPGA of this level receives the data to the time when it is forwarded to Ethernet B of the sub-FPGA of this level.
功率源数据帧包括帧间隔符,目的地址,源地址,帧类型,功率源数据字段,以及帧校验;The power source data frame includes frame separator, destination address, source address, frame type, power source data field, and frame check;
功率源数据字段包括帧序号、控制字、电压数据、以及电流数据;The power source data field includes frame number, control word, voltage data, and current data;
控制字包含对应的功率源的在环信息和告警信息,控制字中的在环信息和告警信息初始值均为0。The control word contains the in-loop information and alarm information of the corresponding power source. The initial values of the in-loop information and alarm information in the control word are both 0.
如上所述子FPGA从自身其中一个以太网接收到先到的采样序号数据序列后,解析采样序号数据序列中的时间同步帧和功率源数据帧,As mentioned above, after the sub-FPGA receives the first arriving sampling sequence number data sequence from one of its own Ethernets, it parses the time synchronization frame and power source data frame in the sampling sequence number data sequence.
若子FPGA在采样序号数据序列中找到对应的功率源数据帧,根据子FPGA对应的功率源数据帧的各个通道的电压数据和电流数据,控制数模转换模块输出,并经过功率放大器进行功率放大,将功率源数据帧对应的控制字中的在环信息设置为1;当功率源中存在告警,则将功率源数据帧对应的告警信息设置为1;If the sub-FPGA finds the corresponding power source data frame in the sampling sequence number data sequence, it controls the output of the digital-to-analog conversion module according to the voltage data and current data of each channel of the power source data frame corresponding to the sub-FPGA, and performs power amplification through the power amplifier. Set the in-loop information in the control word corresponding to the power source data frame to 1; when there is an alarm in the power source, set the alarm information corresponding to the power source data frame to 1;
子FPGA解析时间同步帧后,获取其中的主时钟时间、单级路径延时、本级累计时延,根据主时钟时间、单级路径延时、以及本级累计时延的总和更新子FPGA的系统时间;After the sub-FPGA parses the time synchronization frame, it obtains the main clock time, single-stage path delay, and accumulated delay of this level, and updates the sub-FPGA based on the sum of the main clock time, single-stage path delay, and accumulated delay of this level. system time;
子FPGA将更新的采样序号数据序列通过自身另一个以太网沿环路传播方向转发到下一个子FPGA或者主PFGA。The sub-FPGA forwards the updated sampling sequence number data sequence to the next sub-FPGA or main PFGA along the ring propagation direction through its own other Ethernet.
如上所述子FPGA从自身其中一个以太网接收到后到的采样序号数据序列后:As mentioned above, after the sub-FPGA receives the sample sequence number data sequence from one of its own Ethernet networks:
子FPGA从自身其中一个以太网接收到后到的采样序号数据序列后,更新功率源数据帧中的控制字中的在环信息和告警信息,更新时间同步帧中的本级累计时延,子FPGA将更新的采样序号数据序列通过自身另一个以太网沿环路传播方向转发到下一个子FPGA或者主PFGA。After the sub-FPGA receives the incoming sampling sequence number data sequence from one of its own Ethernet networks, it updates the in-loop information and alarm information in the control word in the power source data frame, and updates the cumulative delay of the current level in the time synchronization frame. The FPGA forwards the updated sampling sequence number data sequence to the next sub-FPGA or main PFGA along the ring propagation direction through its own other Ethernet.
若主FPGA没有收到两个同一采样序号的采样序号数据序列中的时间同步帧,否则认为其中一个环路传播方向有断开,进行环路断开报警提醒;If the main FPGA does not receive two time synchronization frames in the sampling sequence number data sequence of the same sampling sequence number, otherwise it will consider that one of the loop propagation directions is disconnected, and a loop disconnection alarm will be issued;
主FPGA解析功率源数据帧中的控制字中的在环信息和告警信息,如果功率源数据帧中的在环信息为0,则判定对应的功率源不在环,如果功率源数据帧中的告警信息为1,则判定对应的功率源故障,若判定功率源不在环或者功率源故障,则对应的功率源数据帧中的电压数据和电流数据为0。The main FPGA analyzes the in-loop information and alarm information in the control word in the power source data frame. If the in-loop information in the power source data frame is 0, it is determined that the corresponding power source is not in the loop. If the alarm in the power source data frame If the information is 1, it is determined that the corresponding power source is faulty. If it is determined that the power source is not in the loop or the power source is faulty, the voltage data and current data in the corresponding power source data frame are 0.
一种基于确定时隙的链式功率源控制方法,包括以下步骤:A chain power source control method based on determined time slots, including the following steps:
步骤1、主FPGA生成采样序号数据序列,采样序号数据序列依次包括时间同步帧和多个功率源数据帧,功率源数据帧与功率源一一对应;Step 1. The main FPGA generates a sampling number data sequence. The sampling number data sequence includes a time synchronization frame and multiple power source data frames. The power source data frame corresponds to the power source one-to-one;
步骤2、主FPGA将采样序号数据序列分别从以太网A和以太网B发出,从主FPGA的以太网A发出的采样序号数据序列按照首端子FPGA至尾端子FPGA的顺向环路传播方向依次经过各个子FPGA,并从主FPGA的以太网B接收;从主FPGA的以太网B发出的采样序号数据序列按照尾端子FPGA至首端子FPGA的逆向环路传播方向依次经过各个子FPGA,并从主FPGA的以太网A接收;Step 2. The main FPGA sends the sampling sequence number data sequence from Ethernet A and Ethernet B respectively. The sampling sequence number data sequence sent from Ethernet A of the main FPGA follows the forward loop propagation direction from the first terminal FPGA to the last terminal FPGA. After passing through each sub-FPGA, it is received from the Ethernet B of the main FPGA; the sampling sequence number data sequence sent from the Ethernet B of the main FPGA passes through each sub-FPGA in sequence according to the reverse loop propagation direction from the tail terminal FPGA to the first terminal FPGA, and is received from the Ethernet B of the main FPGA. Ethernet A reception of the main FPGA;
步骤3、子FPGA对于不同环路传播方向的同一个采样序号数据序列,选用先到的采样序号数据序列,解析采样序号数据序列中的时间同步帧和功率源数据帧,根据时间同步帧更新子FPGA的系统时间,根据功率源数据帧输出对应的电压和电流;Step 3. For the same sampling number data sequence in different loop propagation directions, the sub-FPGA selects the first arriving sampling number data sequence, analyzes the time synchronization frame and power source data frame in the sampling number data sequence, and updates the sub-FPGA according to the time synchronization frame. The system time of FPGA outputs the corresponding voltage and current according to the power source data frame;
步骤4、主PFGA根据接收到采样序号数据序列,判断环路传播方向是否断开、功率源是否在环、以及功率源是否故障。Step 4. Based on the received sampling number data sequence, the main PFGA determines whether the loop propagation direction is disconnected, whether the power source is in the loop, and whether the power source is faulty.
如上所述步骤1中,As mentioned above in step 1,
时间同步帧包括帧间隔符,目的地址,源地址,帧类型,时间同步字段,以及帧校验;The time synchronization frame includes frame separator, destination address, source address, frame type, time synchronization field, and frame check;
时间同步字段包括主时钟时间、单级路径延时、本级累计时延、采样率、以及采样序号;The time synchronization field includes the main clock time, single-stage path delay, accumulated delay of this stage, sampling rate, and sampling sequence number;
单级路径延时为主FPGA到下一个子FPGA的路径延时或者相邻两个子FPGA之间多路径延时;The single-stage path delay is the path delay from the main FPGA to the next sub-FPGA or the multi-path delay between two adjacent sub-FPGAs;
本级累计时延,子FPGA将接收的时间同步帧中的本级累计时延加上单级路径延时再加上本级转发时延,得到修正后的本级累计时延再写到时间同步帧中的本级累计时延,本级转发时延是本级子FPGA的以太网A接收数据开始到转发给本级子FPGA的以太网B为止的时间,The cumulative delay of this level. The sub-FPGA adds the cumulative delay of this level in the received time synchronization frame plus the single-level path delay plus the forwarding delay of this level to obtain the corrected cumulative delay of this level and then writes it to the time The cumulative delay of this level in the synchronization frame. The forwarding delay of this level is the time from when the Ethernet A of the sub-FPGA of this level receives the data to the time when it is forwarded to Ethernet B of the sub-FPGA of this level.
功率源数据帧包括帧间隔符,目的地址,源地址,帧类型,功率源数据字段,以及帧校验;The power source data frame includes frame separator, destination address, source address, frame type, power source data field, and frame check;
功率源数据字段包括帧序号、控制字、电压数据、以及电流数据;The power source data field includes frame number, control word, voltage data, and current data;
控制字包含对应的功率源的在环信息和告警信息,控制字中的在环信息和告警信息初始值均为0。The control word contains the in-loop information and alarm information of the corresponding power source. The initial values of the in-loop information and alarm information in the control word are both 0.
如上所述步骤3中对于先到的采样序号数据序列:As mentioned above in step 3, for the first arriving sampling number data sequence:
子FPGA从自身其中一个以太网接收到先到的采样序号数据序列后,解析采样序号数据序列中的时间同步帧和功率源数据帧,After the sub-FPGA receives the first arriving sampling number data sequence from one of its own Ethernets, it parses the time synchronization frame and power source data frame in the sampling number data sequence.
若子FPGA在采样序号数据序列中找到对应的功率源数据帧,根据子FPGA对应的功率源数据帧的各个通道的电压数据和电流数据,控制数模转换模块输出,并经过功率放大器进行功率放大,将功率源数据帧对应的控制字中的在环信息设置为1;当功率源中存在告警,则将功率源数据帧对应的告警信息设置为1;If the sub-FPGA finds the corresponding power source data frame in the sampling sequence number data sequence, it controls the output of the digital-to-analog conversion module according to the voltage data and current data of each channel of the power source data frame corresponding to the sub-FPGA, and performs power amplification through the power amplifier. Set the in-loop information in the control word corresponding to the power source data frame to 1; when there is an alarm in the power source, set the alarm information corresponding to the power source data frame to 1;
子FPGA解析时间同步帧后,获取其中的主时钟时间、单级路径延时、本级累计时延,根据主时钟时间、单级路径延时、以及本级累计时延的总和更新子FPGA的系统时间;After the sub-FPGA parses the time synchronization frame, it obtains the main clock time, single-stage path delay, and accumulated delay of this level, and updates the sub-FPGA based on the sum of the main clock time, single-stage path delay, and accumulated delay of this level. system time;
子FPGA将更新的采样序号数据序列通过自身另一个以太网沿环路传播方向转发到下一个子FPGA或者主PFGA。The sub-FPGA forwards the updated sampling sequence number data sequence to the next sub-FPGA or main PFGA along the ring propagation direction through its own other Ethernet.
如上所述步骤3中对于后到的采样序号数据序列:As mentioned above in step 3, for the later sampling number data sequence:
子FPGA从自身其中一个以太网接收到后到的采样序号数据序列后,更新功率源数据帧中的控制字中的在环信息和告警信息,更新时间同步帧中的本级累计时延,子FPGA将更新的采样序号数据序列通过自身另一个以太网沿环路传播方向转发到下一个子FPGA或者主PFGA。After the sub-FPGA receives the incoming sampling sequence number data sequence from one of its own Ethernet networks, it updates the in-loop information and alarm information in the control word in the power source data frame, and updates the cumulative delay of the current level in the time synchronization frame. The FPGA forwards the updated sampling sequence number data sequence to the next sub-FPGA or main PFGA along the ring propagation direction through its own other Ethernet.
如上所述步骤4中:As above in step 4:
若主FPGA没有收到两个同一采样序号的采样序号数据序列中的时间同步帧,否则认为其中一个环路传播方向有断开,进行环路断开报警提醒;If the main FPGA does not receive two time synchronization frames in the sampling sequence number data sequence of the same sampling sequence number, otherwise it will consider that one of the loop propagation directions is disconnected, and a loop disconnection alarm will be issued;
主FPGA解析功率源数据帧中的控制字中的在环信息和告警信息,如果功率源数据帧中的在环信息为0,则判定对应的功率源不在环,如果功率源数据帧中的告警信息为1,则判定对应的功率源故障,若判定功率源不在环或者功率源故障,则对应的功率源数据帧中的电压数据和电流数据为0。The main FPGA analyzes the in-loop information and alarm information in the control word in the power source data frame. If the in-loop information in the power source data frame is 0, it is determined that the corresponding power source is not in the loop. If the alarm in the power source data frame If the information is 1, it is determined that the corresponding power source is faulty. If it is determined that the power source is not in the loop or the power source is faulty, the voltage data and current data in the corresponding power source data frame are 0.
本发明相对于现有技术,具有以下有益效果:Compared with the existing technology, the present invention has the following beneficial effects:
1,采用光以太网方式的数字输入方式,相对模拟小信号方式更具有稳定性、抗干扰性、易于布线;1. The optical Ethernet digital input method is more stable, anti-interference and easier to wire than the analog small signal method;
2,采用链式连接方式,可节约主控设备需要多个光以太网口,减少硬件接口数量;2. The chain connection method can save the need for multiple optical Ethernet ports on the main control device and reduce the number of hardware interfaces;
3,采用链式连接方式,基于双向冗余通信,可显著增强网络的稳定性。3. The chain connection method is adopted and based on two-way redundant communication, which can significantly enhance the stability of the network.
附图说明Description of the drawings
图1为一种基于确定时隙的链式功率源控制系统的结构示意图;Figure 1 is a schematic structural diagram of a chain power source control system based on determined time slots;
图2为采样序号数据序列的示意图;Figure 2 is a schematic diagram of the sampling sequence number data sequence;
图3为时间同步帧和功率源数据帧的帧结构示意图。Figure 3 is a schematic diagram of the frame structure of the time synchronization frame and the power source data frame.
具体实施方式Detailed ways
为了便于本领域普通技术人员理解和实施本发明,下面结合实施例对本发明作进一步的详细描述,应当理解,此处所描述的实施示例仅用于说明和解释本发明,并不用于限定本发明。In order to facilitate those of ordinary skill in the art to understand and implement the present invention, the present invention will be further described in detail below in conjunction with examples. It should be understood that the implementation examples described here are only used to illustrate and explain the present invention and are not intended to limit the present invention.
一种基于确定时隙的链式功率源控制系统,包括主FPGA和多个功率源,主FPGA包括以太网A和以太网B,每个功率源均包括以太网A和以太网B,功率源的以太网B与下一级功率源的以太网A通过光纤连接,进而实现各个功率源的串接,首端的功率源的以太网A与主FPGA的以太网A通过光纤连接,尾端的功率源的以太网B和主FPGA的以太网B通过光纤连接。A chain power source control system based on determined time slots, including a main FPGA and multiple power sources. The main FPGA includes Ethernet A and Ethernet B. Each power source includes Ethernet A and Ethernet B. The power source The Ethernet B of the next-level power source is connected to the Ethernet A of the next-level power source through optical fiber, thereby realizing the serial connection of each power source. The Ethernet A of the head-end power source is connected to the Ethernet A of the main FPGA through optical fiber. The power source of the tail-end The Ethernet B and the main FPGA's Ethernet B are connected via optical fiber.
功率源包括子FPGA、数模转换模块、以及功率放大模块,子FPGA包括以太网A和以太网B,子FPGA与数模转换模块连接,数模转换模块与功率放大模块连接。The power source includes a sub-FPGA, a digital-to-analog conversion module, and a power amplification module. The sub-FPGA includes Ethernet A and Ethernet B. The sub-FPGA is connected to the digital-to-analog conversion module, and the digital-to-analog conversion module is connected to the power amplification module.
一种基于确定时隙的链式功率源控制方法,利用上述一种基于确定时隙的链式功率源控制系统,包括以下步骤:A chain power source control method based on determined time slots, using the above-mentioned chain power source control system based on determined time slots, including the following steps:
步骤1、主FPGA生成采样序号数据序列,采样序号数据序列依次包括时间同步帧TimeSync和多个功率源数据帧,功率源数据帧与功率源一一对应;Step 1. The main FPGA generates a sampling number data sequence. The sampling number data sequence includes a time synchronization frame TimeSync and multiple power source data frames. The power source data frame corresponds to the power source one-to-one;
时间同步帧TimeSync包括帧间隔符SDF(8字节),目的地址DA(1字节),源地址SA(1字节),帧类型FrameType(1字节),时间同步字段(41字节),以及帧校验FCS(4字节),合计56字节;Time synchronization frame TimeSync includes frame separator SDF (8 bytes), destination address DA (1 byte), source address SA (1 byte), frame type FrameType (1 byte), and time synchronization field (41 bytes) , and frame check FCS (4 bytes), a total of 56 bytes;
时间同步字段包括主时钟时间MasterTime、单级路径延时TDelay、本级累计时延FDelay、采样率SampleRate、采样序号SammpleNum;The time synchronization field includes the master clock time MasterTime, single-stage path delay TDelay, current-level cumulative delay FDelay, sampling rate SampleRate, and sampling sequence number SampleNum;
主时钟时间MasterTime是主FPGA的时间信息,每10ns加1,是整个系统的时间基准,相邻两次的采样点的时间间隔为250us;The master clock time MasterTime is the time information of the main FPGA, incremented by 1 every 10ns, and is the time base of the entire system. The time interval between two adjacent sampling points is 250us;
单级路径延时TDelay,单级路径延时TDelay为主FPGA到下一个子FPGA的路径延时或者相邻两个子FPGA之间多路径延时,包括可能的物理层PHY、光模块、光纤等设备的时延,通常电路模块的每一级延时可认为相同;Single-stage path delay TDelay, single-stage path delay TDelay is the path delay from the main FPGA to the next sub-FPGA or the multi-path delay between two adjacent sub-FPGAs, including possible physical layer PHY, optical modules, optical fibers, etc. The delay of the equipment, usually the delay of each stage of the circuit module can be considered the same;
本级累计时延FDelay,在主FPGA侧开始填写0,由后续的各个子FPGA计算后写入,本级累计时延FDelay修正方法为将接收的时间同步帧中的本级累计时延FDelay加上单级路径延时TDelay再加上本级转发时延,修正后的本级累计时延FDelay再写到时间同步帧TimeSync中的本级累计时延FDelay。本级转发时延是本级子FPGA的以太网A接收数据开始到转发给本级子FPGA的以太网B为止的时间。The accumulated delay FDelay of this level is filled in with 0 on the main FPGA side, and is calculated and written by each subsequent sub-FPGA. The correction method of the accumulated delay FDelay of this level is to add the accumulated delay FDelay of this level in the received time synchronization frame. The upper single-level path delay TDelay is added to the current-level forwarding delay. The corrected current-level cumulative delay FDelay is then written to the current-level cumulative delay FDelay in the time synchronization frame TimeSync. The forwarding delay at this level is the time from when Ethernet A of the sub-FPGA at this level receives data to when it is forwarded to Ethernet B of sub-FPGA at this level.
采样率SampleRate为4000hz,主FPGA的以太网A将千兆以太网线速1000Mbs按照采样率4000hz划分成4000个间隔,即每个间隔的长度为250us,可发送数据字节数为125000000/4000,即31250字节;进一步的,为更好地控制发送时间与利用带宽,每个250us划分为255个精确时隙,即每个精确时隙可发送字节数为122字节。在每个250us的间隔里,按照图2所示发送采样序号数据序列。The sampling rate SampleRate is 4000hz. The Ethernet A of the main FPGA divides the Gigabit Ethernet line speed 1000Mbs into 4000 intervals according to the sampling rate 4000hz, that is, the length of each interval is 250us, and the number of data bytes that can be sent is 125000000/4000, that is 31250 bytes; further, in order to better control the sending time and bandwidth utilization, each 250us is divided into 255 precise time slots, that is, the number of bytes that can be sent in each precise time slot is 122 bytes. In each 250us interval, the sampling sequence number data sequence is sent as shown in Figure 2.
采样序号SammpleNum为采样序号数据序列的序号。采样率SampleRate一般设置为4000hz,则采样序号SampleNum从0~3999依次递增。The sampling serial number SampleNum is the serial number of the sampling serial number data sequence. The sampling rate SampleRate is generally set to 4000hz, and the sampling number SampleNum increases sequentially from 0 to 3999.
功率源数据帧包括帧间隔符SDF(8字节),目的地址DA(1字节),源地址SA(1字节),帧类型FrameType(1字节),功率源数据字段(41字节),以及帧校验FCS(4字节),合计56字节;The power source data frame includes frame separator SDF (8 bytes), destination address DA (1 byte), source address SA (1 byte), frame type FrameType (1 byte), and power source data field (41 bytes). ), and frame check FCS (4 bytes), a total of 56 bytes;
功率源数据字段包括帧序号FrameNum、控制字ctrlword、电压数据、以及电流数据。The power source data field includes frame number FrameNum, control word ctrlword, voltage data, and current data.
控制字ctrlword包含对应的功率源的在环信息和告警信息,控制字ctrlword中的在环信息和告警信息初始值均为0。The control word ctrlword contains the in-loop information and alarm information of the corresponding power source. The initial values of the in-loop information and alarm information in the control word ctrlword are both 0.
电压数据为对应的功率源的各个电压通道的输出电压值,The voltage data is the output voltage value of each voltage channel of the corresponding power source,
电流数据为对应的功率源的各个电流通道的输出电流值,The current data is the output current value of each current channel of the corresponding power source.
每个功率源有自己独立的地址,主FPGA的地址为0x00,功率源1的地址为0x01,依次类推,0xff为广播地址。在时间同步帧TimeSync的目的地址DA是广播地址。功率源数据帧的目的地址为对应的功率源的地址(也即子FPGA的地址)。Each power source has its own independent address. The address of the main FPGA is 0x00, the address of power source 1 is 0x01, and so on. 0xff is the broadcast address. The destination address DA in the time synchronization frame TimeSync is the broadcast address. The destination address of the power source data frame is the address of the corresponding power source (that is, the address of the sub-FPGA).
步骤2、主FPGA将采样序号数据序列分别从以太网A和以太网B发出,从主FPGA的以太网A发出的采样序号数据序列按照首端子FPGA至尾端子FPGA的顺向环路传播方向依次经过各个子FPGA,并从主FPGA的以太网B接收;从主FPGA的以太网B发出的采样序号数据序列按照尾端子FPGA至首端子FPGA的逆向环路传播方向依次经过各个子FPGA,并从主FPGA的以太网A接收;Step 2. The main FPGA sends the sampling sequence number data sequence from Ethernet A and Ethernet B respectively. The sampling sequence number data sequence sent from Ethernet A of the main FPGA follows the forward loop propagation direction from the first terminal FPGA to the last terminal FPGA. After passing through each sub-FPGA, it is received from the Ethernet B of the main FPGA; the sampling sequence number data sequence sent from the Ethernet B of the main FPGA passes through each sub-FPGA in sequence according to the reverse loop propagation direction from the tail terminal FPGA to the first terminal FPGA, and is received from the Ethernet B of the main FPGA. Ethernet A reception of the main FPGA;
步骤3、子FPGA正常情况下收到同一个采样序号的采样序号数据序列有两份,并顺时针和逆时针进行环路传输,子FPGA对于不同环路传播方向的同一个采样序号数据序列,采用先到先用原则,Step 3. Under normal circumstances, the sub-FPGA receives two copies of the sampling sequence number data sequence with the same sampling sequence number, and performs loop transmission in clockwise and counterclockwise directions. The sub-FPGA receives the same sampling sequence number data sequence in different loop propagation directions. Adopting the first come first served principle,
对于先到的采样序号数据序列:For the first arriving sample sequence number data sequence:
子FPGA从自身其中一个以太网接收到先到的采样序号数据序列后,解析采样序号数据序列中的时间同步帧TimeSync和功率源数据帧PA Data,After the sub-FPGA receives the first arriving sampling number data sequence from one of its own Ethernets, it parses the time synchronization frame TimeSync and power source data frame PA Data in the sampling number data sequence.
若子FPGA在采样序号数据序列中找到对应的功率源数据帧PA Data,即子FPGA对应的功率源数据帧PA Data中的目的地址DA与子FPGA的地址相同,根据子FPGA对应的功率源数据帧PA Data的各个通道的电压数据和电流数据,控制数模转换模块DA输出,并经过PA功率放大,将功率源数据帧对应的控制字ctrlword中的在环信息设置为1;当功率源中存在任何告警,包括过温、短路、开路等告警信息,则将功率源数据帧对应的告警信息设置为1。If the sub-FPGA finds the corresponding power source data frame PA Data in the sampling sequence number data sequence, that is, the destination address DA in the power source data frame PA Data corresponding to the sub-FPGA is the same as the address of the sub-FPGA, according to the power source data frame corresponding to the sub-FPGA The voltage data and current data of each channel of PA Data control the DA output of the digital-to-analog conversion module, and after PA power amplification, the in-loop information in the control word ctrlword corresponding to the power source data frame is set to 1; when there is For any alarm, including over-temperature, short circuit, open circuit and other alarm information, set the alarm information corresponding to the power source data frame to 1.
子FPGA解析时间同步帧TimeSync后,获取其中的主时钟时间MasterTime、单级路径延时TDelay、本级累计时延FDelay,根据MasterTimer+TDelay+FDelay更新子FPGA的系统时间,即将子FPGA的内部系统时间同步到整个系统的时间;After the sub-FPGA parses the time synchronization frame TimeSync, it obtains the main clock time MasterTime, single-stage path delay TDelay, and current-level cumulative delay FDelay. It updates the system time of the sub-FPGA based on MasterTimer+TDelay+FDelay, which is the internal system of the sub-FPGA. Time is synchronized to the time of the entire system;
子FPGA进一步解析时间同步帧TimeSync中的采样率SampleRate,根据子FPGA内部的系统时间与采样速率SampleRate来确定准确的功率源数据帧PA Data输出到数模转换模块DA;The sub-FPGA further analyzes the sampling rate SampleRate in the time synchronization frame TimeSync, and determines the accurate power source data frame PA Data based on the system time and sampling rate SampleRate inside the sub-FPGA and outputs it to the digital-to-analog conversion module DA;
子FPGA将更新的采样序号数据序列通过自身另一个以太网沿环路传播方向(顺向环路传播方向或者逆向环路传播方向)转发到下一个子FPGA或者主PFGA;The sub-FPGA forwards the updated sampling sequence number data sequence to the next sub-FPGA or main PFGA along the loop propagation direction (forward loop propagation direction or reverse loop propagation direction) through another Ethernet of itself;
对于后到的采样序号数据序列:For the later arriving sample sequence number data sequence:
子FPGA从自身其中一个以太网接收到后到的采样序号数据序列后,仅更新功率源数据帧PA Data中的控制字ctrlword中的在环信息和告警信息,更新时间同步帧TimeSync中的本级累计时延FDelay,子FPGA将更新的采样序号数据序列通过自身另一个以太网沿环路传播方向(顺向环路传播方向或者逆向环路传播方向)转发到下一个子FPGA或者主PFGA;After the sub-FPGA receives the subsequent sampling number data sequence from one of its own Ethernet networks, it only updates the in-loop information and alarm information in the control word ctrlword in the power source data frame PA Data, and updates the current level in the time synchronization frame TimeSync. Accumulated delay FDelay, the sub-FPGA forwards the updated sampling sequence number data sequence to the next sub-FPGA or main PFGA through its other Ethernet along the loop propagation direction (forward loop propagation direction or reverse loop propagation direction);
步骤4、主PFGA接收到采样序号数据序列,解析时间同步帧TimeSync和功率源数据帧PA Data,Step 4. The main PFGA receives the sampling number data sequence and parses the time synchronization frame TimeSync and the power source data frame PA Data.
主FPGA应该收到两个同一采样序号SampleNum的采样序号数据序列中的时间同步帧TimeSync,否则认为链路的某个环路传播方向有断开,进行环路断开报警提醒;The main FPGA should receive the time synchronization frame TimeSync in the data sequence of two sampling numbers with the same sampling number SampleNum. Otherwise, it will be considered that a certain loop propagation direction of the link is disconnected, and a loop disconnection alarm will be issued;
主FPGA解析功率源数据帧中的控制字ctrlword中的在环信息和告警信息,如果功率源数据帧中的在环信息为0,则判定对应的功率源不在环,如果功率源数据帧中的告警信息为1,则判定对应的功率源故障,并更新对应的功率源寄存器表,作为对应功率源是否在线,是否有过温、短路、开路等异常告警;The main FPGA analyzes the in-loop information and alarm information in the control word ctrlword in the power source data frame. If the in-loop information in the power source data frame is 0, it is determined that the corresponding power source is not in the loop. If the in-loop information in the power source data frame is If the alarm information is 1, it is determined that the corresponding power source is faulty, and the corresponding power source register table is updated to determine whether the corresponding power source is online and whether there are abnormal alarms such as over-temperature, short circuit, and open circuit;
主FPGA依据对应的控制子ctrlword中的在环信息和告警信息,决定是否继续输出对应功率源的数据,若判定功率源不在环或者功率源故障,则对应的功率源数据帧中的电压数据和电流数据为0,即对应的功率源不输出电压和电流。The main FPGA decides whether to continue to output the data of the corresponding power source based on the in-loop information and alarm information in the corresponding control subctrlword. If it is determined that the power source is not in the loop or the power source is faulty, the voltage data in the corresponding power source data frame and The current data is 0, that is, the corresponding power source does not output voltage and current.
需要指出的是,本发明中所描述的具体实施例仅是对本发明精神作举例说明。本发明所属技术领域的技术人员可以对所描述的具体实施例作各种各样的修改或补充或采用类似的方式替代,但并不会偏离本发明的精神或超越所附权利要求书所定义的范围。It should be noted that the specific embodiments described in the present invention are only illustrative of the spirit of the present invention. Those skilled in the technical field to which the present invention belongs can make various modifications or additions to the described specific embodiments or substitute them in similar ways, but this will not deviate from the spirit of the present invention or exceed the definition of the appended claims. range.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311379414.5A CN117389183A (en) | 2023-10-23 | 2023-10-23 | Chained power source control method and system based on determined time slot |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311379414.5A CN117389183A (en) | 2023-10-23 | 2023-10-23 | Chained power source control method and system based on determined time slot |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117389183A true CN117389183A (en) | 2024-01-12 |
Family
ID=89462611
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311379414.5A Pending CN117389183A (en) | 2023-10-23 | 2023-10-23 | Chained power source control method and system based on determined time slot |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117389183A (en) |
-
2023
- 2023-10-23 CN CN202311379414.5A patent/CN117389183A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11916722B2 (en) | System and method for resilient wireless packet communications | |
US10652045B2 (en) | Computerized apparatus with a high speed data bus | |
US8693506B2 (en) | Transparent clock adaptor for a network device | |
JP4774391B2 (en) | Optical transmission system and signal speed converter | |
US20110026394A1 (en) | Distributed ethernet system and method for detecting fault based thereon | |
JP2017098694A (en) | Communication device and time synchronization method thereof | |
CN111095860B (en) | Method and device for clock synchronization | |
EP1901483B1 (en) | Network system and audio signal processor | |
US8155156B2 (en) | Synchronization recovery for multiple-link communications | |
WO2010111963A1 (en) | Time synchronization device, method and system | |
US20110158263A1 (en) | Transit time fixation device | |
JPH039667B2 (en) | ||
CN113810317B (en) | Physical layer interface with redundant data paths | |
US11646959B2 (en) | Active ethernet cable with broadcasting and multiplexing for data path redundancy | |
CN101262406A (en) | Two-way ring network system and its control method | |
CN112666914B (en) | Non-inductive switching redundant communication implementation method based on EPA bus | |
US7586950B1 (en) | Remote management interface | |
US8238269B2 (en) | Method for balancing latency in a communications tree, corresponding device and storage means | |
JP2001358766A (en) | System and method for packet communication and computer readable recording medium with program for making computer perform the method recorded thereon | |
CN101765199B (en) | Communication network system and time synchronization method in system and OTN equipment | |
CN104618057B (en) | A kind of Packet Transport Network not damaged protection reverse method and system | |
CN117389183A (en) | Chained power source control method and system based on determined time slot | |
CN104796287A (en) | Method for detecting faults of looped EPON (Ethernet passive optical networks) | |
CN101132337A (en) | 2M loop circuit network system based on E1 transmission | |
JP5357436B2 (en) | Transmission equipment |
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 |