A substation switching operation intelligent training method and system based on a brain-computer interface
Patent Information
- Application Number
- CN202611187074.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-27
AI Technical Summary
[0006]本发明的第一目的在于克服现有倒闸操作培训方式缺乏沉浸式体验、交互方式单一、无法自动校验操作顺序且缺乏训练评价机制的不足,提供一种基于脑机接口的变电站倒闸操作智能培训方法,通过基于P300事件相关电位的脑机接口实现非接触式操作控制,结合Unity虚拟仿真场景和操作顺序自动校验,提高培训的沉浸感、安全性和训练评价能力
[0035]1、本发明方法通过基于P300事件相关电位的脑机接口实现非接触式操作控制,学员无需使用鼠标、键盘等传统输入设备,仅通过注视目标选项即可完成设备操作选择和场景控制,提高了培训过程的沉浸感和交互自然度,实现了倒闸操作的智能化培训,克服了传统输入方式在安全培训场景中操作路径长、影响沉浸感的不足。
Smart Images

Figure CN122990988A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of power system simulation training, and in particular to an intelligent training method and system for substation switching operations based on a brain-computer interface. Background Technology
[0002] Switching operations are an important part of power system operation, maintenance, and accident handling. They involve various types of equipment such as circuit breakers, disconnectors, grounding switches, lines, and transformers. Essentially, they involve changing the operating mode of electrical equipment under the premise of meeting safety regulations and equipment status constraints, so that the power system can safely and reliably switch from one operating state to another.
[0003] In actual switching operations, the operating sequence must strictly adhere to safety regulations. Errors such as skipping steps, incorrect opening or closing, operating disconnect switches under load, or closing grounding switches while energized can lead to equipment damage, personal injury, or even power grid accidents. Therefore, training systems not only need to ensure learners memorize the operating steps but also reinforce their understanding of the relationship between the operating sequence, equipment status, and safety consequences.
[0004] Traditional switching operation training methods mainly rely on paper procedures, two-dimensional wiring diagrams, manual explanations, or teacher demonstrations. While these methods can impart basic knowledge, they still fall short in terms of immersion, real-time feedback, individualized training evaluation, and presentation of the consequences of errors. Existing research on substation switching operation simulation systems and virtual reality training for power substations has shown that virtual simulation can provide a safe and repeatable training environment for high-risk process-oriented operations.
[0005] In recent years, brain-computer interface (BCI) technology has gradually expanded from the field of medical rehabilitation to human-computer interaction scenarios. P300, as a typical event-related potential (ERP), can produce a significant positive potential change in the EEG signal approximately 300 milliseconds after a user focuses on a target stimulus. Therefore, P300 is often used in target selection-based BCI tasks. Farwell and Donchin were among the first to verify the feasibility of character-selective BCIs based on ERPs. Currently, there are commercially available P300 BCI development platforms (such as the HybridBCI platform) that can output P300 command results, but there is still no mature solution combining P300 BCIs with substation switching operation training. Summary of the Invention
[0006] The primary objective of this invention is to overcome the shortcomings of existing switching operation training methods, such as lack of immersive experience, limited interaction methods, inability to automatically verify the operation sequence, and lack of training evaluation mechanisms. This invention provides a brain-computer interface-based intelligent training method for substation switching operations. It achieves non-contact operation control through a brain-computer interface based on P300 event-related potentials, and combines Unity virtual simulation scenarios with automatic verification of the operation sequence to improve the immersiveness, safety, and training evaluation capabilities of the training.
[0007] The second objective of this invention is to provide an intelligent training system for substation switching operations based on a brain-computer interface.
[0008] The first objective of this invention is achieved through the following technical solution: a brain-computer interface-based intelligent training method for substation switching operations, comprising the following steps:
[0009] 1) Using a brain-computer interface based on P300 event-related potentials, a wearable EEG headband collects multi-channel EEG signals from the user under the visual stimulus paradigm. The collected EEG signals are amplified, filtered, and processed by analog-to-digital conversion. Taking the start time of each visual stimulus flash as the reference point, the EEG signal data within a preset time window after the stimulus occurs is extracted as a single response sample. After baseline correction, all single response samples corresponding to the same target option are superimposed and averaged to obtain the average evoked response waveform corresponding to each target option. The peak amplitude and peak latency of P300 event-related potentials are extracted from the average evoked response waveform as time-domain features.
[0010] 2) Based on the EEG signals acquired by the brain-computer interface described in step 1), P300 EEG samples are pre-collected when the user gazes at each target option. The temporal features are extracted and labeled with the corresponding target option labels to construct a training sample set. The training sample set is used to train a linear discriminant analysis classifier. The trained linear discriminant analysis classifier is used to classify the extracted temporal features. The inter-class scatter matrix and intra-class scatter matrix are calculated. The generalized eigenvalue problem is solved to obtain the optimal projection direction vector. The temporal features of the sample to be classified are projected onto the optimal projection direction vector. The probability value of the sample to be classified relative to each target option is calculated. The preset instruction corresponding to the target option with the highest probability value is selected as the control instruction output. The control instruction includes device operation instructions and scene control instructions.
[0011] 3) The control commands output by the brain-computer interface described in step 2) are transmitted to the simulation end via the network: The Unity client connects to the server via TCP / IP protocol. After establishing a long TCP connection, it receives network data packets containing length header data and JSON format data. The length header is converted from little-endian to host-endian, and the byte length of the subsequent JSON data body is parsed. The complete JSON data body is read according to the byte length and decoded into a string. In the JSON data body, the msg field is the message type identifier, where ipc_algorithm_test indicates that the data is the output result of the brain-computer interface algorithm test; the algorithm_name field is the algorithm name identifier, where p300 represents the P300 event-related potential paradigm, ssvep This represents the steady-state visual evoked potential paradigm; the result_args field is a result parameter object, and its data subfield stores the control instruction string output after the brain-computer interface recognition; the msg field and algorithm_name field in the string are parsed. When the msg field value is ipc_algorithm_test and the algorithm_name field value is p300 or ssvep, the control instruction is extracted from the result_args.data field and stored in the data queue. In each frame update of the main thread, one piece of data is taken from the data queue at a preset time interval for processing. If there are multiple backlogged data in the data queue, all old data except the latest one are discarded.
[0012] 4) Match the control commands from the brain-computer interface obtained in step 3) with the preset device-color mapping table, and perform the following switching operation verification: If the match is successful, trigger the device operation command to execute the corresponding virtual device operation; if the match fails, match the control commands with the preset ordinary command mapping table and trigger the scene control command to execute the corresponding scene control operation. For device operation commands, the standard switching operation process is modeled as a finite state machine. The state of the finite state machine is the current step index. Each state corresponds to a desired device identifier and a desired operation color. When the operation input by the user is consistent with both the desired device identifier and the desired operation color corresponding to the current state, the operation is executed and the state is transferred to the next step index. When the operation input by the user is inconsistent with the desired device identifier or the desired operation color, the operation is rejected and error type information is generated. The error types include sequence error when the device identifier is inconsistent and operation direction error when the color is inconsistent. In addition, device state constraint verification and the finite state machine sequence verification are performed in parallel. The device state constraint verification uses Boolean algebra expressions to describe the preconditions of each operation to verify whether the current operation meets the device state safety conditions.
[0013] 5) During the operation verification and virtual device operation execution described in step 4), a start timestamp is recorded at the beginning of training. During each operation, a preset log recording module records the operation time, device identifier, operation color, and correct or incorrect judgment result. At the end of training, an end timestamp is recorded and the total time is calculated. The number of correct operations and the total number of operations are counted, and the operation accuracy rate is calculated. The training time, operation accuracy rate, total time, number of correct operations, and number of incorrect operations are generated into a structured training report for output and display. At the same time, the training results of each time are stored in a preset historical training record library in chronological order and the trend of operation accuracy rate changes within a preset number of times is displayed in chart form. Thus, the entire intelligent training process from EEG signal acquisition, P300 feature extraction and classification judgment, network command transmission and parsing, switching operation verification and virtual device drive response to training evaluation and historical record tracking is completed.
[0014] Further, in step 1), the visual stimulus paradigm presents multiple selectable target options in a matrix form. Each target option is flashed in a preset random order, with each flash lasting a preset time and the interval between two adjacent flashes being a preset time. Each target option flashes a preset number of times. When performing baseline correction on a single response sample, the average signal value within a preset time period before the stimulus start time is used as the baseline value, and the signal value of each sampling point after the stimulus is subtracted from the baseline value. When performing superposition averaging, all single response samples of the same target option are added point by point according to the sampling point and then divided by the total number of samples to obtain the average evoked response waveform corresponding to the target option. When extracting time-domain features, the maximum positive peak amplitude and its corresponding peak latency are extracted from the preset time window in which the P300 component appears in the average evoked response waveform.
[0015] Furthermore, in step 3), the Unity client connects to the server's IP address and listening port via TcpClient and reads 4-byte header data via NetworkStream; the preset time interval is set by the developers according to the system's real-time requirements.
[0016] Furthermore, in step 4), the standard switching operation procedure uses an internal bridge structure as a typical operating condition. The internal bridge structure is a wiring configuration with two incoming lines, one transformer, and a set of internal bridge circuit breakers. One of the incoming lines is marked L1, which passes through a disconnecting switch in sequence. ,breaker disconnect switch Connected to transformer T1, another incoming line is marked L2, which passes through a disconnecting switch in sequence. ,breaker disconnect switch Connected to transformer T1, and the incoming line L1 side and the incoming line L2 side are connected by a disconnecting switch. ,breaker disconnect switch The internal bridge branches are connected to form a bridge-shaped connection of "L1—internal bridge—L2"; each disconnecting switch and circuit breaker is in an independently controllable open or closed state; starting from the initial state where incoming line L1 and transformer T1 are in the working state, the internal bridge branch is open, and the incoming line L2 side is disconnected, according to the preset standard operation procedure sequence, the process sequentially goes through closing the disconnecting switch and circuit breaker on the incoming line L2 side, closing the internal bridge branch, and opening the circuit breaker and disconnecting switch on the incoming line L1 side, finally switching to the target state where incoming line L2 is powered alone; the preset standard operation procedure sequence is as follows: closing the disconnecting switch Close the isolating switch , closed circuit breaker Close the isolating switch Close the isolating switch , closed circuit breaker Disconnect the circuit breaker Disconnect the isolating switch Disconnect the isolating switch .
[0017] Further, in step 4), the state transition process of the finite state machine is as follows: maintain the current step index variable and initialize it to 0; when a user operation instruction is received, read the expected device identifier and expected operation color corresponding to the current step index; compare the device identifier operated by the user with the expected device identifier; compare the color operated by the user with the expected operation color; if both are consistent, the operation is determined to be correct and the corresponding virtual device state change is executed; at the same time, the current step index is incremented by 1; if the device identifiers are inconsistent, it is determined to be an order error and an error message containing expected device information is generated; if the device identifiers are consistent but the colors are inconsistent, it is determined to be an operation direction error and an error message containing expected color information is generated.
[0018] Furthermore, in step 4), the device state constraint verification uses Boolean algebra expressions to describe the preconditions of each operation, and Boolean variables to represent the real-time state of each device, where a value of 1 indicates that the device is in the closed state, and a value of 0 indicates that the device is in the open state; in the Boolean algebra expressions, Indicates the target device The precondition function for performing the closing operation is called the precondition Boolean expression. Indicates the target device The precondition function for performing a tripping operation is called a precondition Boolean expression. A result of 1 indicates that the corresponding operation is allowed, and a result of 0 indicates that it is prohibited. When a user requests a closing operation on the target device, the precondition Boolean expression is used. Verify whether the closing conditions are met, among which For the target device, The preconditions for the closing operation of this device are the state conditions of the preceding equipment. If the result of the Boolean expression of the preconditions is 1, the closing operation is allowed; if it is 0, it is determined to be a state conflict and the operation is refused. When a user requests to perform a tripping operation on the target device, the preconditions are determined according to the preset Boolean expression. Verify whether the tripping conditions are met, among which This indicates that the target device status variable is inverted. If the result of the Boolean expression of this precondition is 1, the tripping operation is allowed; if it is 0, it is determined to be a status conflict and the operation is refused.
[0019] Furthermore, in the device state constraint verification, the precondition Boolean expressions for each device operation are as follows:
[0020] closure The precondition Boolean expression is ,in express State variables, express Invert the state variable. express Inverting the state variables, the above expression represents The closing operation needs to be performed in and Execute when all circuit breakers are in the open state;
[0021] closure The precondition Boolean expression is ,express The closing operation needs to be performed in In the closed state and This is executed when the circuit is in the open state, where express State variables;
[0022] closure The precondition Boolean expression is ,express The closing operation needs to be performed in and This is executed when all circuits are in the closed state, among which express State variables;
[0023] closure The precondition Boolean expression is ,express The closing operation needs to be performed in and This is executed when all circuit breakers are in the open state, among which express State variables, express Invert the state variable. express Invert the state variable;
[0024] closure The precondition Boolean expression is ,express The closing operation needs to be performed in In the closed state and This is executed when the circuit is in the open state, where express State variables;
[0025] closure The precondition Boolean expression is ,express The closing operation needs to be performed in and This is executed when all circuits are in the closed state, among which express State variables;
[0026] disconnect The precondition Boolean expression is ,in express Invert the state variable;
[0027] disconnect The precondition Boolean expression is ,in express Invert state variables; disconnect The precondition Boolean expression is ,in express Invert the state variable;
[0028] The above state variable is 1 when the circuit is closed and 0 when the circuit is open.
[0029] Furthermore, in step 5), the management of the historical training record library also includes: Provides a history clearing function to delete all training records stored in the history training record library; It provides a retraining function to reset the current step index to the initial value, clear the start timestamp to zero, reset the logging module, and restore the state of all devices in the virtual scene to the initial state; Provide a return function to exit the current training interface and return to the main interface.
[0030] The second objective of this invention is achieved through the following technical solution: a brain-computer interface-based intelligent training system for substation switching operations, used to implement the aforementioned brain-computer interface-based intelligent training method for substation switching operations, comprising:
[0031] Wearable EEG headband, used to collect users' EEG signals and output them to the P300 visual stimulation and recognition platform;
[0032] The P300 visual stimulation and recognition platform, connected to the wearable EEG headband, is used to present visual stimulation paradigms, perform superposition averaging and linear discriminant analysis on the collected EEG signals, and output control commands.
[0033] The Unity virtual simulation terminal connects to the P300 visual stimulus and recognition platform via TCP / IP protocol. It includes a TCP communication module, an instruction mapping module, a finite state machine verification module, a virtual scene rendering module, and a training and evaluation module. The TCP communication module connects to the server's IP address and listening port via TcpClient, establishing a long TCP connection, receiving network data packets containing length header data and JSON format data, and parsing the JSON data to extract control instructions. The instruction mapping module, connected to the TCP communication module, matches the parsed control instructions with a preset device-color mapping table. If a match is successful, the corresponding virtual device operation is triggered; otherwise, the control instructions are matched with a preset ordinary command mapping table, and the corresponding scene control operation is executed. The finite state machine verification module, connected to the instruction mapping module, maintains a standard operation step sequence. Each state corresponds to a desired device identifier and a desired operation color. When the user's operation matches the desired device identifier and desired operation color of the current state, the control state transitions; otherwise, an error type information is generated. The virtual scene rendering module, connected to the finite state machine verification module, displays the incoming lines L1 and L2, transformer T1, and disconnector switches. to ,breaker to In the virtual substation scenario, red and green indicator lights display the closed or open status of the equipment, and update the equipment status and display feedback information when the operation is correct or incorrect. The training evaluation module is connected to the finite state machine verification module, which is used to record the start timestamp at the beginning of training, record the operation time, equipment identification, operation color and judgment result for each operation, calculate the total time and operation accuracy rate when training is completed, generate a structured training report, and store each training result in the historical training record library and display the trend of accuracy rate change.
[0034] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0035] 1. The method of the present invention realizes non-contact operation control through a brain-computer interface based on P300 event-related potentials. Trainees do not need to use traditional input devices such as mice and keyboards. They can complete device operation selection and scene control simply by looking at the target option. This improves the immersion and naturalness of the training process, realizes intelligent training of switching operations, and overcomes the shortcomings of traditional input methods in safety training scenarios, such as long operation paths and impact on immersion.
[0036] 2. The method of this invention uses a finite state machine to model the standard steps of switching operations, transforming the complex multi-step switching process into a computable state sequence. This allows for real-time verification of the correctness of each step of the trainee's operation, providing immediate prompts when errors occur, effectively preventing overstepping and misoperation, and improving the standardization and safety of the training process.
[0037] 3. The method of this invention introduces Boolean algebra expressions into the equipment state constraint verification, describes the preconditions of each operation in a mathematical way, and can determine whether the operation meets the electrical safety rules based on the actual state of each device. It can also identify state conflict risks that cannot be found by sequential verification alone (such as operating the isolating switch when the circuit breaker has not been tripped), thus improving the completeness of operation verification.
[0038] 4. The method of the present invention automatically generates a structured training report containing accuracy, total time, number of errors and error types after training is completed, and supports viewing historical records and displaying accuracy trends. It realizes a closed-loop training process of "operation training - result feedback - historical records - retraining", making the training effect quantifiable, traceable and improveable.
[0039] 5. The method of this invention combines brain-computer interface based on P300 event-related potentials with Unity virtual simulation, enabling trainees to complete switching operations through gaze selection. The operation results are reflected in the device status changes in the three-dimensional virtual scene in real time, forming a real-time closed loop of "EEG acquisition - command recognition - scene mapping - status feedback", with fast response speed and good interactive continuity.
[0040] 6. The method of this invention conducts training through virtual simulation scenarios. All operations are completed in a virtual environment and do not involve the control of real power equipment. Even if the brain-computer interface misidentifies, it will not affect the actual power grid and equipment. It has inherent safety and is suitable for large-scale promotion and use.
[0041] 7. The system of this invention adopts a modular design. The responsibilities of the TCP communication module, instruction mapping module, finite state machine verification module, virtual scene rendering module and training and evaluation module are clear and the coupling is low. It can be easily expanded to include more switching tasks, more substation wiring methods and richer training and evaluation indicators in the future, and has good scalability.
[0042] 8. This invention integrates multiple stages of the training process—EEG signal acquisition, P300 feature extraction and classification decision, network command transmission and parsing, switching operation verification and virtual device drive response, training evaluation and historical record tracking—into a complete process, and protects it through both method and system dimensions, forming a complete technical solution from signal acquisition to training evaluation. Attached Figure Description
[0043] Figure 1 This is a diagram illustrating the overall architecture of the method of the present invention.
[0044] Figure 2 This is a flowchart of the process of the method of the present invention.
[0045] Figure 3 This is a schematic diagram of the P300 visual stimulus matrix interface.
[0046] Figure 4 This is a schematic diagram of the main interface for switching operations in a Unity virtual simulation scene.
[0047] Figure 5 This is a schematic diagram of the device status indicator light feedback.
[0048] Figure 6 This is a schematic diagram of the sequential verification process for a finite state machine.
[0049] Figure 7 This is a schematic diagram of the training report and history interface. Detailed Implementation
[0050] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0051] Example 1
[0052] This embodiment discloses an intelligent training method for substation switching operations based on a brain-computer interface. For example... Figure 2 As shown, the workflow of this method is as follows: The user first wears a wearable EEG headband and completes P300 command recognition through a brain-computer interface platform. The user generates control intentions by gazing at the corresponding options, and the platform outputs the corresponding brain-computer command results. The Unity client generates operation requests such as object selection, action selection, and confirmation execution based on the selection results output by the P300. The scene client calls the switching sequence logic according to the current task state, determines whether the operation is legal, and immediately displays the device status change, error reason, and training results. The specific details are as follows:
[0053] 1) Using a brain-computer interface based on P300 event-related potentials, a wearable EEG headband collects multi-channel EEG signals from the user under the visual stimulation paradigm. The collected EEG signals are amplified, filtered, and converted from analog to digital. Taking the start time of each visual stimulus flash as the reference point, the EEG signal data within a preset time window after the stimulus occurs is extracted as a single response sample. After baseline correction, all single response samples corresponding to the same target option are superimposed and averaged to obtain the average evoked response waveform corresponding to each target option. The peak amplitude and peak latency of P300 event-related potentials are extracted from the average evoked response waveform as time-domain features.
[0054] In a specific example, the visual stimulus paradigm presents multiple selectable target options in a matrix format. Each target option is flashed in a preset random order, with each flash lasting a preset time and the interval between two adjacent flashes being a preset time. Each target option flashes a preset number of times. When performing baseline correction on a single response sample, the average signal value within a preset time period before the stimulus initiation time is used as the baseline value, and the signal value of each sampling point after the stimulus is subtracted from this baseline value. During the superposition and averaging process, all single response samples of the same target option are added point by point and then divided by the total number of samples to obtain the average evoked response waveform corresponding to that target option. When extracting time-domain features, the maximum positive peak amplitude and its corresponding peak latency are extracted from the preset time window in which the P300 component appears in the average evoked response waveform. Figure 3 As shown, the P300 visual stimulation matrix uses a brain-computer interface to map brain-computer selection results into scene movement commands and device operation commands. After the user completes the selection step by step through the brain-computer interface, the Unity client receives the selection results based on the server connection and converts them into executable device operation requests within the scene.
[0055] 2) Based on the EEG signals acquired by the brain-computer interface described in step 1), P300 EEG samples are pre-collected when the user gazes at each target option. The temporal features are extracted and labeled with the corresponding target option labels to construct a training sample set. The training sample set is used to train a linear discriminant analysis classifier. The trained linear discriminant analysis classifier is used to classify the extracted temporal features, calculate the inter-class scatter matrix and intra-class scatter matrix, solve the generalized eigenvalue problem to obtain the optimal projection direction vector, project the temporal features of the sample to be classified onto the optimal projection direction vector, calculate the probability value of the sample to be classified relative to each target option, and select the preset instruction corresponding to the target option with the highest probability value as the control instruction output. The control instruction includes device operation instructions and scene control instructions.
[0056] 3) The control commands output by the brain-computer interface described in step 2) are transmitted to the simulation end via the network: The Unity client connects to the server via TCP / IP protocol. After establishing a long TCP connection, it receives network data packets containing length header data and JSON format data. The length header is converted from little-endian to host-endian, and the byte length of the subsequent JSON data body is parsed. The complete JSON data body is read according to the byte length and decoded into a string. In the JSON data body, the msg field is the message type identifier, where ipc_algorithm_test indicates that the data is the output result of the brain-computer interface algorithm test; the algorithm_name field is the algorithm name identifier, where p300 represents the P300 event-related potential paradigm, ssvep This represents the steady-state visual evoked potential paradigm; the result_args field is a result parameter object, and its data subfield stores the control instruction string output after the brain-computer interface recognition; the msg field and algorithm_name field in the string are parsed. When the msg field value is ipc_algorithm_test and the algorithm_name field value is p300 or ssvep, the control instruction is extracted from the result_args.data field and stored in the data queue. In each frame update of the main thread, one piece of data is taken from the data queue at a preset time interval for processing. If there are multiple backlogged data in the data queue, all old data except the latest one are discarded.
[0057] In a specific example, the Unity client connects to the server's IP address and listening port via TcpClient and reads 4-byte header data via NetworkStream; the preset time interval is set by the developers according to the system's real-time requirements.
[0058] 4) Match the control commands from the brain-computer interface obtained in step 3) with the preset device-color mapping table, and perform the following switching operation verification: If the match is successful, the device operation command is triggered to execute the corresponding virtual device operation; if the match fails, the control commands are matched with the preset ordinary command mapping table and the scene control command is triggered to execute the corresponding scene control operation. For device operation commands, the standard switching operation process is modeled as a finite state machine. The state of the finite state machine is the current step index. Each state corresponds to a desired device identifier and a desired operation color. When the operation input by the user is consistent with both the desired device identifier and the desired operation color corresponding to the current state, the operation is executed and the state is transferred to the next step index. When the operation input by the user is inconsistent with the desired device identifier or the desired operation color, the operation is rejected and error type information is generated. The error types include sequence error when the device identifier is inconsistent and operation direction error when the color is inconsistent. In addition, device state constraint verification and the finite state machine sequence verification are performed in parallel. The device state constraint verification uses Boolean algebra expressions to describe the preconditions of each operation to verify whether the current operation meets the device state safety conditions.
[0059] In a specific example, the standard switching operation procedure uses an internal bridge structure as a typical operating condition. The internal bridge structure is a wiring configuration with two incoming lines, one transformer, and a set of internal bridge circuit breakers. One of the incoming lines is marked L1, which passes through a disconnecting switch in sequence. ,breaker disconnect switch Connected to transformer T1, another incoming line is marked L2, which passes through a disconnecting switch in sequence. ,breaker disconnect switch Connected to transformer T1, and the incoming line L1 side and the incoming line L2 side are connected by a disconnecting switch. ,breaker disconnect switch The internal bridge branches are connected to form a bridge-shaped connection of "L1-internal bridge-L2"; the states of each disconnecting switch and circuit breaker are independently controllable open or closed states; starting from the initial state where the incoming line L1 and transformer T1 are in working state, the internal bridge branch is open, and the incoming line L2 side is open, according to the preset standard operation procedure sequence, the process sequentially passes through closing the disconnecting switch and circuit breaker on the incoming line L2 side, closing the internal bridge branch, and opening the circuit breaker and disconnecting switch on the incoming line L1 side, finally switching to the target state where the incoming line L2 is powered alone; Figure 4This is a schematic diagram of the main interface for switching operations in a Unity virtual simulation scene. Each device is equipped with a status indicator light and operation buttons. The scene includes a task prompt bar displaying the target of the current training task; an operation feedback area providing correct or incorrect prompts when the user completes an operation; and a summary of training results that can be viewed through the report panel after training is complete. The preset standard operation sequence is as follows: Close the isolating switch. Close the isolating switch , closed circuit breaker Close the isolating switch Close the isolating switch , closed circuit breaker Disconnect the circuit breaker Disconnect the isolating switch Disconnect the isolating switch .
[0060] like Figure 6 As shown, the operation sequence verification is implemented using a finite state machine. The system maintains the current step index variable and initializes it to 0. When a user operation command is received, the expected device identifier and expected operation color corresponding to the current step index are read. If the device identifier operated by the user matches the expected device identifier and the operation color matches the expected color, it is determined to be a correct operation; if the device identifiers do not match, it is determined to be an incorrect sequence; if the device identifiers match but the colors do not match, it is determined to be an incorrect operation direction. The state transition process of the finite state machine is as follows: maintain the current step index variable and initialize it to 0; when a user operation command is received, read the expected device identifier and expected operation color corresponding to the current step index; compare the device identifier operated by the user with the expected device identifier; compare the color operated by the user with the expected operation color; if both match, the operation is determined to be correct and the corresponding virtual device state change is executed, and the current step index is incremented by 1; if the device identifiers do not match, it is determined to be an incorrect sequence and an error message containing expected device information is generated; if the device identifiers match but the colors do not match, it is determined to be an incorrect operation direction and an error message containing expected color information is generated; if... Figure 5 As shown, device status feedback is implemented using red and green indicator lights. Each operable device corresponds to a status indicator light, and the system updates the indicator light color based on the user's selected operation. Green indicates that the device is in the open state, and red indicates that the device is in the closed state. After the user completes a correct operation, the Unity scene will immediately update the indicator light color of the corresponding device, forming a closed loop of "operation input - status change - visual feedback".
[0061] The device state constraint verification uses Boolean algebra expressions to describe the preconditions of each operation, and Boolean variables to represent the real-time state of each device, where a value of 1 indicates that the device is in a closed state, and a value of 0 indicates that the device is in a closed state; in the Boolean algebra expressions... Indicates the target device The precondition function for performing the closing operation is called the precondition Boolean expression. Indicates the target device The precondition function for performing a tripping operation is called a precondition Boolean expression. A result of 1 indicates that the corresponding operation is allowed, and a result of 0 indicates that it is prohibited. When a user requests a closing operation on the target device, the precondition Boolean expression is used. Verify whether the closing conditions are met, among which For the target device, The preconditions for the closing operation of this device are the state conditions of the preceding equipment. If the result of the Boolean expression of the preconditions is 1, the closing operation is allowed; if it is 0, it is determined to be a state conflict and the operation is refused. When a user requests to perform a tripping operation on the target device, the preconditions are determined according to the preset Boolean expression. Verify whether the tripping conditions are met, among which This indicates that the target device status variable is inverted. If the result of the Boolean expression of this precondition is 1, the tripping operation is allowed; if it is 0, it is determined to be a status conflict and the operation is refused.
[0062] In the device state constraint verification, the Boolean expressions for the preconditions of each device operation are as follows:
[0063] closure The precondition Boolean expression is ,in express State variables, express Invert the state variable. express Inverting the state variables, the above expression represents The closing operation needs to be performed in and Execute when all circuit breakers are in the open state;
[0064] closure The precondition Boolean expression is ,express The closing operation needs to be performed in In the closed state and This is executed when the circuit is in the open state, where express State variables;
[0065] closure The precondition Boolean expression is ,express The closing operation needs to be performed in and This is executed when all circuits are in the closed state, among which express State variables;
[0066] closure The precondition Boolean expression is ,express The closing operation needs to be performed in and This is executed when all circuit breakers are in the open state, among which express State variables, express Invert the state variable. express Invert the state variable;
[0067] closure The precondition Boolean expression is ,express The closing operation needs to be performed in In the closed state and This is executed when the circuit is in the open state, where express State variables;
[0068] closure The precondition Boolean expression is ,express The closing operation needs to be performed in and This is executed when all circuits are in the closed state, among which express State variables;
[0069] disconnect The precondition Boolean expression is ,in express Invert the state variable;
[0070] disconnect The precondition Boolean expression is ,in express Invert state variables; disconnect The precondition Boolean expression is ,in express Invert the state variable;
[0071] The above state variable is 1 when the circuit is closed and 0 when the circuit is open.
[0072] 5) During the switching operation verification and virtual device operation execution process described in step 4), a start timestamp is recorded at the beginning of training. During each operation, a preset log recording module records the operation time, device identifier, operation color, and correct or incorrect judgment result. At the end of training, an end timestamp is recorded, and the total time is calculated. The number of correct operations and the total number of operations are counted, and the operation accuracy rate is calculated. The training time, operation accuracy rate, total time, number of correct operations, and number of incorrect operations are generated into a structured training report for output and display. Simultaneously, each training result is stored in chronological order in a preset historical training record database, and the trend of operation accuracy rate changes within a preset number of operations is displayed in chart form. Figure 7 As shown, the training evaluation module generates a training report after the user completes a full switching operation training session. The interface displays information such as the operation steps, accuracy rate, total time, number of errors, and error type for this training session. The system also supports a history viewing function, allowing users to view recent training results and accuracy rate trends, and observe changes in operational proficiency across multiple training sessions. This completes the entire intelligent training process, from EEG signal acquisition, P300 feature extraction and classification, network command transmission and parsing, switching operation verification and virtual device-driven response, to training evaluation and history tracking.
[0073] In a specific example, the management of the historical training record repository also includes: Provides a history clearing function to delete all training records stored in the history training record library; It provides a retraining function to reset the current step index to its initial value, clear the start timestamp, reset the logger, and restore the state of all devices in the virtual scene to their initial state; Provide a return function to exit the current training interface and return to the main interface.
[0074] Example 2
[0075] This embodiment discloses a brain-computer interface-based intelligent training system for substation switching operations, used to implement the brain-computer interface-based intelligent training method for substation switching operations described in Embodiment 1, such as... Figure 1 As shown, the system adopts a three-layer architecture, including a brain-computer interface layer, a Unity connection and control layer, and a scene feedback layer:
[0076] The brain-computer interface layer consists of a wearable EEG headband and a P300 visual stimulation and recognition platform, which is responsible for collecting EEG data and outputting P300 command results.
[0077] The Unity connection and control layer completes the connection through server IP configuration and is responsible for command reception, device button mapping, task scheduling and switching sequence determination.
[0078] The scene feedback layer consists of a Unity virtual scene and an evaluation module, and is responsible for status display, error prompts, and training evaluation.
[0079] Specifically, the system includes:
[0080] Wearable EEG headband, used to collect users' EEG signals and output them to the P300 visual stimulation and recognition platform;
[0081] The P300 visual stimulation and recognition platform, connected to the wearable EEG headband, is used to present visual stimulation paradigms, perform superposition averaging and linear discriminant analysis on the collected EEG signals, and output control commands.
[0082] The Unity virtual simulation terminal connects to the P300 visual stimulus and recognition platform via TCP / IP protocol. It includes a TCP communication module, an instruction mapping module, a finite state machine verification module, a virtual scene rendering module, and a training and evaluation module. The TCP communication module connects to the server's IP address and listening port via TcpClient, establishing a long TCP connection, receiving network data packets containing length header data and JSON format data, and parsing the JSON data to extract control instructions. The instruction mapping module, connected to the TCP communication module, matches the parsed control instructions with a preset device-color mapping table. If a match is successful, the corresponding virtual device operation is triggered; otherwise, the control instructions are matched with a preset ordinary command mapping table, and the corresponding scene control operation is executed. The finite state machine verification module, connected to the instruction mapping module, maintains a standard operation step sequence. Each state corresponds to a desired device identifier and a desired operation color. When the user's operation matches the desired device identifier and desired operation color of the current state, the control state transitions; otherwise, an error type information is generated. The virtual scene rendering module, connected to the finite state machine verification module, displays the incoming lines L1 and L2, transformer T1, and disconnector switches. to ,breaker to In the virtual substation scenario, red and green indicator lights display the closed or open status of the equipment, and update the equipment status and display feedback information when the operation is correct or incorrect. The training evaluation module is connected to the finite state machine verification module, which is used to record the start timestamp at the beginning of training, record the operation time, equipment identification, operation color and judgment result for each operation, calculate the total time and operation accuracy rate when training is completed, generate a structured training report, and store each training result in the historical training record library and display the trend of accuracy rate change.
[0083] The above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Therefore, any changes made in accordance with the shape and principle of the present invention should be covered within the protection scope of the present invention.
Claims
1. A brain-computer interface-based intelligent training method for substation switching operations, characterized in that, Includes the following steps: 1) Using a brain-computer interface based on P300 event-related potentials, a wearable EEG headband collects multi-channel EEG signals from the user under the visual stimulus paradigm. The collected EEG signals are amplified, filtered, and processed by analog-to-digital conversion. Taking the start time of each visual stimulus flash as the reference point, the EEG signal data within a preset time window after the stimulus occurs is extracted as a single response sample. After baseline correction, all single response samples corresponding to the same target option are superimposed and averaged to obtain the average evoked response waveform corresponding to each target option. The peak amplitude and peak latency of P300 event-related potentials are extracted from the average evoked response waveform as time-domain features. 2) Based on the EEG signals acquired by the brain-computer interface described in step 1), P300 EEG samples are pre-collected when the user gazes at each target option. The temporal features are extracted and labeled with the corresponding target option labels to construct a training sample set. The training sample set is used to train a linear discriminant analysis classifier. The trained linear discriminant analysis classifier is used to classify the extracted temporal features. The inter-class scatter matrix and intra-class scatter matrix are calculated. The generalized eigenvalue problem is solved to obtain the optimal projection direction vector. The temporal features of the sample to be classified are projected onto the optimal projection direction vector. The probability value of the sample to be classified relative to each target option is calculated. The preset instruction corresponding to the target option with the highest probability value is selected as the control instruction output. The control instruction includes device operation instructions and scene control instructions. 3) The control commands output by the brain-computer interface described in step 2) are transmitted to the simulation end via the network: The Unity client connects to the server via TCP / IP protocol. After establishing a long TCP connection, it receives network data packets containing length header data and JSON format data. The length header is converted from little-endian to host-endian, and the byte length of the subsequent JSON data body is parsed. The complete JSON data body is read according to the byte length and decoded into a string. In the JSON data body, the msg field is the message type identifier, where ipc_algorithm_test indicates that the data is the output result of the brain-computer interface algorithm test; the algorithm_name field is the algorithm name identifier, where p300 represents the P300 event-related potential paradigm, ssvep This represents the steady-state visual evoked potential paradigm; the result_args field is a result parameter object, and its data subfield stores the control instruction string output after the brain-computer interface recognition; the msg field and algorithm_name field in the string are parsed. When the msg field value is ipc_algorithm_test and the algorithm_name field value is p300 or ssvep, the control instruction is extracted from the result_args.data field and stored in the data queue. In each frame update of the main thread, one piece of data is taken from the data queue at a preset time interval for processing. If there are multiple backlogged data in the data queue, all old data except the latest one are discarded. 4) Match the control commands from the brain-computer interface obtained in step 3) with the preset device-color mapping table, and perform the following switching operation verification: If the match is successful, trigger the device operation command to execute the corresponding virtual device operation; if the match fails, match the control commands with the preset ordinary command mapping table and trigger the scene control command to execute the corresponding scene control operation. For device operation commands, the standard switching operation process is modeled as a finite state machine. The state of the finite state machine is the current step index. Each state corresponds to a desired device identifier and a desired operation color. When the operation input by the user is consistent with both the desired device identifier and the desired operation color corresponding to the current state, the operation is executed and the state is transferred to the next step index. When the operation input by the user is inconsistent with the desired device identifier or the desired operation color, the operation is rejected and error type information is generated. The error types include sequence error when the device identifier is inconsistent and operation direction error when the color is inconsistent. In addition, device state constraint verification and the finite state machine sequence verification are performed in parallel. The device state constraint verification uses Boolean algebra expressions to describe the preconditions of each operation to verify whether the current operation meets the device state safety conditions. 5) During the switching operation verification and virtual device operation execution process described in step 4), the start timestamp is recorded at the beginning of training. During each operation, the operation time, device identifier, operation color, and correct or incorrect judgment result are recorded by the preset log recording module. When the training is completed, the end timestamp is recorded and the total time is calculated. The number of correct operations and the total number of operations are counted and the operation accuracy rate is calculated. The training time, operation accuracy rate, total time, number of correct operations, and number of incorrect operations are generated into a structured training report for output and display. At the same time, the training results of each time are stored in the preset historical training record library in chronological order and the trend of operation accuracy rate within the preset number of times is displayed in the form of a chart. This completes the entire intelligent training process, from EEG signal acquisition, P300 feature extraction and classification, network command transmission and parsing, switching operation verification and virtual device drive response to training evaluation and historical record tracking.
2. The intelligent training method for substation switching operations based on a brain-computer interface according to claim 1, characterized in that, In step 1), the visual stimulation paradigm presents multiple selectable target options in a matrix form. Each target option is flashed in a preset random order, with each flash lasting a preset time and the interval between two adjacent flashes being a preset time. Each target option flashes a preset number of times. When performing baseline correction on a single response sample, the average signal value within a preset time period before the stimulus start time is used as the baseline value, and the signal value of each sampling point after the stimulus is subtracted from the baseline value. During the superposition and averaging process, all single response samples of the same target option are added point by point according to the sampling point and then divided by the total number of samples to obtain the average induced response waveform corresponding to the target option; when extracting time domain features, the maximum positive peak amplitude and its corresponding peak latency are extracted from the preset time window in which the P300 component appears in the average induced response waveform.
3. The intelligent training method for substation switching operations based on a brain-computer interface according to claim 1, characterized in that, In step 3), the Unity client connects to the server's IP address and listening port via TcpClient and reads 4-byte header data via NetworkStream; the preset time interval is set by the developers according to the system's real-time requirements.
4. The intelligent training method for substation switching operations based on a brain-computer interface according to claim 1, characterized in that, In step 4), the standard switching operation procedure uses an internal bridge structure as a typical operating condition. The internal bridge structure is a wiring configuration with two incoming lines, one transformer, and a set of internal bridge circuit breakers. One of the incoming lines is marked L1, which passes through a disconnecting switch in sequence. ,breaker disconnect switch Connected to transformer T1, another incoming line is marked L2, which passes through a disconnecting switch in sequence. ,breaker disconnect switch Connected to transformer T1, and the incoming line L1 side and the incoming line L2 side are connected by a disconnecting switch. ,breaker disconnect switch The internal bridge branches are connected to form a bridge-shaped connection of "L1—internal bridge—L2"; each disconnecting switch and circuit breaker is in an independently controllable open or closed state; starting from the initial state where incoming line L1 and transformer T1 are in working state, internal bridge branches are open, and incoming line L2 is disconnected, according to the preset standard operating procedure sequence, the system sequentially closes the disconnecting switch and circuit breaker on the incoming line L2 side, closes the internal bridge branch, and opens the circuit breaker and disconnecting switch on the incoming line L1 side, finally switching to the target state where incoming line L2 is powered independently; the preset standard operating procedure sequence is as follows: close the disconnecting switch Close the isolating switch , closed circuit breaker Close the isolating switch Close the isolating switch , closed circuit breaker Disconnect the circuit breaker Disconnect the isolating switch Disconnect the isolating switch .
5. The intelligent training method for substation switching operations based on a brain-computer interface according to claim 4, characterized in that, In step 4), the state transition process of the finite state machine is as follows: maintain the current step index variable and initialize it to 0. When a user operation instruction is received, read the expected device identifier and expected operation color corresponding to the current step index. Compare the device identifier operated by the user with the expected device identifier and compare the color operated by the user with the expected operation color. If both are consistent, the operation is determined to be correct and the corresponding virtual device state change is executed. At the same time, the current step index is incremented by 1. If the device identifiers are inconsistent, it is determined to be an order error and an error message containing expected device information is generated. If the device identifiers are consistent but the colors are inconsistent, it is determined to be an operation direction error and an error message containing expected color information is generated.
6. The intelligent training method for substation switching operations based on a brain-computer interface according to claim 5, characterized in that, In step 4), the equipment state constraint verification uses Boolean algebra expressions to describe the preconditions of each operation, and Boolean variables to represent the real-time state of each device, where a value of 1 indicates that the device is in the closed state, and a value of 0 indicates that the device is in the open state; in the Boolean algebra expressions, Indicates the target device The precondition function for performing the closing operation is called the precondition Boolean expression. Indicates the target device The precondition function for performing the circuit breaker tripping operation is called the precondition Boolean expression. A result of 1 indicates that the corresponding operation is allowed, and a result of 0 indicates that the operation is prohibited. When a user requests to perform a closing operation on the target device, it is based on a preset precondition Boolean expression. Verify whether the closing conditions are met, among which For the target device, The preceding equipment state conditions upon which the closing operation of this device depends. If the result of the Boolean expression of the preceding condition is 1, the closing operation is allowed; if it is 0, it is determined to be a state conflict and the operation is refused. When a user requests to perform a tripping operation on the target device, it is based on a preset precondition Boolean expression. Verify whether the tripping conditions are met, among which This indicates that the target device status variable is inverted. If the result of the Boolean expression of this precondition is 1, the tripping operation is allowed; if it is 0, it is determined to be a status conflict and the operation is refused.
7. The intelligent training method for substation switching operations based on a brain-computer interface according to claim 6, characterized in that, In the device state constraint verification, the Boolean expressions for the preconditions of each device operation are as follows: closure The precondition Boolean expression is ,in express State variables, express Invert the state variable. express Inverting the state variables, the above expression represents The closing operation needs to be performed in and Execute when all circuit breakers are in the open state; closure The precondition Boolean expression is ,express The closing operation needs to be performed in In the closed state and This is executed when the circuit is in the open state, where express State variables; closure The precondition Boolean expression is ,express The closing operation needs to be performed in and This is executed when all circuits are in the closed state, among which express State variables; closure The precondition Boolean expression is ,express The closing operation needs to be performed in and This is executed when all circuit breakers are in the open state, among which express State variables, express Invert the state variable. express Invert the state variable; closure The precondition Boolean expression is ,express The closing operation needs to be performed in In the closed state and This is executed when the circuit is in the open state, where express State variables; closure The precondition Boolean expression is ,express The closing operation needs to be performed in and This is executed when all circuits are in the closed state, among which express State variables; disconnect The precondition Boolean expression is ,in express Invert the state variable; disconnect The precondition Boolean expression is ,in express Invert state variables; disconnect The precondition Boolean expression is ,in express Invert the state variable; The above state variable is 1 when the circuit is closed and 0 when the circuit is open.
8. The intelligent training method for substation switching operations based on a brain-computer interface according to claim 1, characterized in that, In step 5), the management of the historical training record library also includes: Provides a history clearing function to delete all training records stored in the history training record library; It provides a retraining function to reset the current step index to the initial value, clear the start timestamp to zero, reset the logging module, and restore the state of all devices in the virtual scene to the initial state; Provide a return function to exit the current training interface and return to the main interface.
9. A brain-computer interface-based intelligent training system for substation switching operations, characterized in that, The method for implementing the intelligent training method for substation switching operations based on a brain-computer interface as described in any one of claims 1 to 8 includes: Wearable EEG headband, used to collect users' EEG signals and output them to the P300 visual stimulation and recognition platform; The P300 visual stimulation and recognition platform, connected to the wearable EEG headband, is used to present visual stimulation paradigms, perform superposition averaging and linear discriminant analysis on the collected EEG signals, and output control commands. The Unity virtual simulation terminal connects to the P300 visual stimulus and recognition platform via TCP / IP protocol. It includes a TCP communication module, an instruction mapping module, a finite state machine verification module, a virtual scene rendering module, and a training and evaluation module. The TCP communication module connects to the server's IP address and listening port via TcpClient, establishing a long TCP connection, receiving network data packets containing length header data and JSON format data, and parsing the JSON data to extract control instructions. The instruction mapping module, connected to the TCP communication module, matches the parsed control instructions with a preset device-color mapping table. If a match is successful, the corresponding virtual device operation is triggered; otherwise, the control instructions are matched with a preset ordinary command mapping table, and the corresponding scene control operation is executed. The finite state machine verification module, connected to the instruction mapping module, maintains a standard operation step sequence. Each state corresponds to a desired device identifier and a desired operation color. When the user's operation matches the desired device identifier and desired operation color of the current state, the control state transitions; otherwise, an error type information is generated. The virtual scene rendering module, connected to the finite state machine verification module, displays the incoming lines L1 and L2, transformer T1, and disconnector switches. to ,breaker to In the virtual substation scenario, red and green indicator lights display the closed or open status of the equipment, and update the equipment status and display feedback information when the operation is correct or incorrect. The training evaluation module is connected to the finite state machine verification module, which is used to record the start timestamp at the beginning of training, record the operation time, equipment identification, operation color and judgment result for each operation, calculate the total time and operation accuracy rate when training is completed, generate a structured training report, and store each training result in the historical training record library and display the trend of accuracy rate change.