A method for distributing configuration parameters for a plasma control system

By using shared memory communication and a preloading mechanism, the efficient distribution of configuration parameters for the plasma control system is achieved, solving the problems of high real-time performance and low memory usage in long-pulse steady-state operation, and supporting the system's flexible expansion and real-time requirements.

CN120523591BActive Publication Date: 2025-11-07HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510560580.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-11-07
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

The plasma control system of a nuclear fusion tokamak device faces challenges in long-pulse steady-state operation, including high real-time performance, low memory usage, and dynamic expansion capabilities. Existing technologies are insufficient to meet the requirements for efficient distribution of system configuration parameters.

Method used

It adopts a shared memory communication and preloading mechanism, transmits configuration parameters through a publish-subscribe mechanism between the master node and the real-time node, and uses shared memory queue management and dynamic parameter parsing in the real-time node to ensure the real-time and flexible distribution of parameters and support the expansion of algorithm components.

Benefits of technology

It significantly reduces the memory usage and time consumption of configuration parameter distribution, meets the massive data processing requirements of long pulse operation, ensures the high real-time performance and flexibility of the system, and supports the flexible expansion of algorithm components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120523591B_ABST
    Figure CN120523591B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of plasma control of nuclear fusion tokamak device, and particularly relates to a plasma control system configuration parameter distribution method.The technical scheme comprises deploying parameter analysis plug-ins of auxiliary components and algorithm components on real-time nodes, and the auxiliary components and the algorithm components interact through shared memory;in the discharge preparation stage, the auxiliary components obtain configuration parameters from a configuration parameter management component of a master node, parameter analysis plug-ins of each algorithm component perform parameter preloading, and the parameter analysis plug-ins perform real-time parameter analysis in the discharge control stage.The present application significantly reduces memory occupation and time consumption of configuration parameter distribution, meets the massive parameter management demand of long-pulse operation;through shared memory communication and preloading mechanism, the system high real-time is guaranteed, and time margin is left for algorithm operation;combined with dynamic parameter analysis and modular design, flexible expansion of algorithm components and dynamic switching of control strategies are supported, and redundant parameter occupation resources are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of plasma control technology for nuclear fusion tokamak devices, and in particular to a method for distributing configuration parameters of a plasma control system. Background Technology

[0002] Nuclear fusion tokamak devices (such as BEST, CFETR, and ITER) are important experimental devices for realizing long-pulse steady-state fusion energy. The plasma control system is the core control system of the tokamak nuclear fusion experiment. During the experiment, the plasma control system collects plasma state data in real time and executes control algorithms and calculates control commands according to the configuration parameters to realize the discharge control of the nuclear fusion experiment.

[0003] like Figure 1 As shown, the plasma control system hardware deployment adopts a cluster mode, consisting of one master node server and at least one real-time node server. Nuclear fusion discharge experiments are conducted on a per-"gun" basis. Parameter configuration is performed by operators before each discharge begins through a human-machine interface (hereinafter referred to as the interface) deployed on the master node server, with data management services provided by the configuration parameter management (CS) component. The configuration parameters are ultimately applied to the algorithm execution and control of the real-time nodes during the discharge process.

[0004] System configuration parameter distribution is an indispensable and important component of plasma real-time control systems, and its implementation faces the following challenges:

[0005] First, the goal of nuclear fusion experiments is long pulse or even steady-state operation. The new generation of plasma control system needs to support long pulse steady-state operation. Long pulse operation means a larger amount of data for system configuration parameters. Therefore, the distribution of configuration parameters needs to take into account the system memory limitations during long pulse operation.

[0006] Second, the shortest control cycle of the algorithm in the plasma control system is 100 microseconds, which includes the time to acquire the current configuration parameters, logical operations, and current data archiving. Therefore, the distribution and acquisition of configuration parameters must have high real-time performance to leave sufficient time margin for subsequent operation.

[0007] Third, the control algorithm of the plasma control system is adjusted according to the real-time operating status of the plasma. Therefore, the configuration parameters of the algorithm also need to be dynamically adjusted according to the algorithm operation requirements of the system.

[0008] The three requirements are not independent, but are interrelated and restricted, and the distribution of configuration parameters needs to be comprehensively solved among the three to obtain a plasma control system configuration parameter real-time distribution and deployment scheme that meets the requirements. Therefore, the application provides a plasma control system configuration parameter distribution method. SUMMARY

[0009] The application aims to provide a plasma control system configuration parameter distribution method that takes into account the high real-time performance, low memory occupation and dynamic expansion capability in the background art, so as to meet the core requirements of long-pulse operation of future nuclear fusion devices.

[0010] The technical scheme of the application is a plasma control system configuration parameter distribution method, comprising the following steps:

[0011] A parameter analysis plug-in of a support component and an algorithm component is deployed at a real-time node, and the support component and the algorithm component interact through shared memory;

[0012] A configuration parameter management component of a master node broadcasts a shot number to the support component through a publish-subscribe mechanism in a discharge preparation stage, the support component sends a configuration parameter request to the configuration parameter management component, the configuration parameter management component generates a JSON format configuration parameter data packet according to the request and returns it to the support component, and the support component stores it in the shared memory;

[0013] The shared memory of each algorithm component and the support component is named by logical CPU identification and is managed in a queue mode, and the algorithm component parameter analysis plug-in loads the shared memory configuration parameter into a local memory configuration parameter management structure after detecting a parameter ready command in the shared memory queue;

[0014] In a discharge control stage, the parameter analysis plug-in traverses a configuration parameter management structure (WaveformManager) structure, dynamically determines an activated control sequence (Sequence) and a control phase (Phase), and calculates a current time parameter value based on vertex value pair (t, y) interpolation.

[0015] Optionally, an interface data structure of the configuration parameter management component and the support component is defined by an interface description language, and the interface description language generates cross-platform data serialization code.

[0016] Optionally, the communication content of the shared memory message queue is a Command object, and the Command object comprises:

[0017] A type field: identifying a command category, including a parameter data packet ready command and a control instruction;

[0018] Length field: indicates the size of the data payload in bytes;

[0019] Source field: marks the logical CPU identification of the command initiator;

[0020] Data payload: a pointer to the configuration parameter data packet in shared memory.

[0021] Optionally, the configuration parameter management structure (WaveformManager) is divided into a hierarchical structure by control items (Category), specifically including:

[0022] Control item (Category): manages multiple control sequences (Sequence) in a hash table and records the currently activated control sequence (Sequence);

[0023] Control sequence (Sequence): associates multiple control phases (Phase) through a linked list, and each control phase (Phase) contains a vertex array of execution time points;

[0024] Control phase (Phase): binds a unique algorithm Algorithm and its configuration parameters, which are stored in vertex value pairs (t, y), and the data between vertices is generated through interpolation, including static retention, step retention, or linear interpolation.

[0025] Optionally, the discharge control phase, the time counting method of real-time parameter analysis includes:

[0026] Absolute timing: takes the discharge start time as the reference, and the global time starts from -9 seconds and accumulates;

[0027] Relative timing: takes the algorithm start time as the 0 time point, which is used for local timing when switching the internal state of the algorithm.

[0028] Optionally, during the real-time parameter analysis process, only the configuration parameters corresponding to the currently activated Algorithm are analyzed, and the parameters of the inactive algorithms are retained in the shared memory to avoid redundant data occupying local memory.

[0029] Optionally, the shared memory message queue adopts a full-duplex communication mechanism, specifically through independent read and write buffers for bidirectional data transmission, and the buffer manages queue elements through head and tail pointers in a circular manner.

[0030] Optionally, the configuration parameters include:

[0031] Algorithm scheduling scheme: dynamically switches the control strategy by setting the time execution combination of the control item (Category);

[0032] Plasma control target parameters: defined in waveform data, including plasma current, shape and density parameters.

[0033] Optionally, the interpolation calculation of the vertex value pair (t, y) is specifically:

[0034] Static holding: the y value remains unchanged throughout the discharge cycle;

[0035] Step holding: the y value remains the previous vertex value before t time, until the next vertex takes effect;

[0036] Linear interpolation: according to the adjacent vertex value according to the formula:

[0037]

[0038] Calculate the y value at the current time, where y is the configuration parameter value at the current time t, y m is the parameter value of the mth vertex, y m-1 is the parameter value of the m-1th vertex, t m is the time point of the mth vertex, t m-1 is the time point of the m-1th vertex.

[0039] Optionally, the naming rule of the shared memory message queue is "shm.rt.cpuID.command", wherein cpuID is the logical CPU number bound by the algorithm component, and the message queues corresponding to different cpuID are physically isolated.

[0040] Compared with the prior art, the present application has at least one of the following beneficial technical effects:

[0041] Through the "whole transmission, real-time analysis" mode, only the necessary parameters are loaded and dynamically analyzed, which significantly reduces the memory occupation and adapts to the massive data processing demand of long pulse operation.

[0042] Adopting shared memory communication and preloading mechanism, the parameter distribution time is reduced, the time margin in the algorithm control cycle is ensured, and the real-time requirement of 100 microseconds is met.

[0043] Supporting algorithm components to analyze parameters on demand, dynamically switching control strategies, avoiding redundant parameter resource occupation, and improving system flexibility and response ability.

[0044] By decoupling the Support component and the algorithm component, the algorithm extension process is simplified, and when a new algorithm is added, the core distribution logic does not need to be reconstructed, and the system maintainability is enhanced.

[0045] Based on the IDL defined interface and the JSON format transmission, the data protocol consistency between the master node and the real-time node is ensured, and the communication error risk is reduced.

[0046] The application significantly reduces the memory occupation and time consumption of configuration parameter distribution through the "overall transmission and real-time analysis" mode, meets the massive parameter management needs of long pulse operation, guarantees the high real-time performance of the system through shared memory communication and preloading mechanism, and leaves sufficient time margin for algorithm operation. BRIEF DESCRIPTION OF DRAWINGS

[0047] Figure 1 Figure 1 is a hardware architecture diagram of a plasma control system;

[0048] Figure 2 Figure 2 is a discharge phase division diagram;

[0049] Figure 3 Figure 3 is a configuration parameter deployment diagram;

[0050] Figure 4 Figure 4 is a parameter transmission timing diagram;

[0051] Figure 5 Figure 5 is a shared memory message queue structure design diagram;

[0052] Figure 6 Figure 6 is a configuration parameter management structure diagram;

[0053] Figure 7(a) is a target parameter waveform of IP current set by the shape configuration control directory limited algorithm interface;

[0054] Figure 7(b) is a real-time analysis of the target parameter waveform of the plasma current IP in the discharge process;

[0055] Figure 8 Figure 8 is a service time consumption statistical diagram of experimental cannon parameter analysis;

[0056] Figure 9 Figure 9 is a memory change curve of a 25-hour simulation experiment system. DETAILED DESCRIPTION

[0057] The technical solutions of the application will be further described below in combination with the drawings and specific embodiments.

[0058] EMBODIMENT

[0059] The application provides a configuration parameter distribution method of a plasma control system, which includes the following detailed description of the method.

[0060] Nuclear fusion discharge experiments are carried out in units of "cannons", and each cannon fusion experiment is run within a set time. The plasma control system controls each cannon experiment in a cycle after starting, such as Figure 2The corresponding system operation shown can be divided into the following stages, namely, the inter-shot stage before the discharge starts, the discharge preparation stage after the system receives the shot number, and the formal discharge control stage after receiving the discharge start trigger. In this stage, each algorithm component is periodically run until the discharge ends and returns to the inter-shot stage, and waits for the next discharge.

[0061] The discharge parameters are configured through the human-computer interaction interface of the master node in the inter-shot stage before the next shot starts. The configuration content includes two aspects, one is the algorithm scheduling scheme of the system, and the other is the control target parameter of the plasma. The purpose of the present application is to realize the distribution of the master node configuration parameters to the real-time node algorithm components under the premise of guaranteeing the real-time performance of the system and the long pulse operation requirement, and to be finally applied to the running of each algorithm of the real-time node in the discharge control stage.

[0062] (I) System deployment

[0063] To realize the above functions, the system structure deployment of the present application is as shown in Figure 3 .

[0064] (1) Deploy the auxiliary component (hereinafter referred to as Support) in the real-time node to realize the unified acquisition of all configuration parameters from the master node. The reason for this deployment is that it is necessary to guarantee the real-time performance of each algorithm component and reduce its unnecessary workload. Secondly, Support as the "manager" component of the real-time node is easier to obtain the parameter transmission opportunity, and because it has no real-time requirement, it has less restrictions and can deploy flexible and diverse data communication methods. Thirdly, each algorithm component and Support run independently, eliminating the coupling relationship between modules, so that when adding algorithms in the later stage, Support does not need to add or change logic, thereby ensuring the scalability of the configuration parameter distribution.

[0065] (2) Deploy parameter parsing plug-ins in each algorithm component of the real-time node to realize the organization and parsing service of the configuration parameters of each algorithm component.

[0066] (3) Support component and each algorithm component perform efficient data interaction through shared memory (SHM, share memory).

[0067] (II) Process design

[0068] To ensure the real-time performance of the discharge control stage and support long pulse operation, the implementation of this process is divided into three parts, namely, "parameter package transmission" and "parameter preloading" in the discharge preparation stage, and "parameter parsing" in the discharge control stage.

[0069] 1. Parameter transmission (CS→Support)

[0070] Parameter transmission refers to the process of transmitting configuration parameters from the master node to the real-time node. After the parameters are set on the master node interface, they are organized and managed by the configuration server (hereinafter referred to as CS). In the real-time node, the Support component is responsible for receiving the configuration parameters, so the configuration parameter transmission is an interactive process between the master node CS and the real-time node Support.

[0071] Parameter data packet content

[0072] The configuration parameters include the user's settings for the algorithm scheduling scheme of the system plan operation, the desired performance parameters of the plasma, etc. Among them, the setting of the algorithm scheduling scheme is realized based on the organizational structure of system control. The content of system control is divided into multiple control items (hereinafter referred to as Category), each of which is composed of multiple algorithms (hereinafter referred to as Algorithm) that implement different control functions. In the parameter configuration phase, the algorithm execution combination of each control item (hereinafter referred to as Category) in the time dimension is set, and the algorithm configuration parameters are combined to realize algorithm scheduling. In order to realize the above algorithm combination and configuration parameter combination, between Category and Algorithm, two levels of control sequence (hereinafter referred to as Sequence) and control segment (hereinafter referred to as Phase) are deployed. Phase is the combination of an algorithm and its specific set of configuration parameters, and Sequence is the execution sequence of different Phases in the time dimension. By configuring multiple different Sequences, different control strategies for each Category in different plasma states can be implemented.

[0073] It should be noted that the interface parameter configuration does not set all time data, but only sets the key vertex value pairs (including time t and data value y) when the data changes. The data at each time between the vertices is obtained by interpolation, so the CS does not store all parameter data at each time, but only stores the data vertex values and related information such as data type.

[0074] Parameter transmission communication protocol

[0075] Data transmission between the Support component and the CS component:

[0076] The publish-subscribe mechanism is used for transmission to ensure the timeliness of data transmission and processing.

[0077] JSON is used as the data transmission format. JSON has the characteristics of universality, strong readability, and flexibility. Its universality enables data exchange between multiple programming languages and platforms, and its readability and flexibility make the data exchange process more intuitive and easy to handle.

[0078] IDL is used to define the interface data structure between systems, ensuring the consistency of the communication interface between two servers.

[0079] Parameter transmission process

[0080] To ensure the real-time operation of the system during the discharge process, the "parameter transmission" timing is deployed in the preparation stage before the discharge starts. The runtime sequence diagram is shown in Figure 3 , which contains the following three steps:

[0081] ① Data ready: the system workflow engine publishes the shot number information to the CS, and the CS component binds the configuration parameter data packet to the shot number and broadcasts the "data ready" message with the shot number through the publish-subscribe communication mechanism to the Support. After receiving the message, the Support writes the shot number to the system common memory Common and replies to the confirmation information.

[0082] ② Configuration parameter request: the system has loaded the Category information in the algorithm component into the list in the system common memory Common during the startup stage. The Support traverses the contents in the list, composes the message with the parameter information "rtCsRequest" (including the shot number, the current algorithm component logical CPU number, and the current component Category list), and then publishes the parameter request message to the CS. The Support requests the configuration data from the CS for all algorithm components in a non-blocking manner.

[0083] ③ Configuration parameter acquisition: the CS composes the response message data according to the Category information list of the configuration parameter request message and returns it to the Support. The Support acquires the response message in a callback function manner in parallel, and stores it in a specific shared memory area according to the corresponding CPU number of the message.

[0084] 2. Parameter preloading (Support→algorithm component)

[0085] To ensure the real-time performance of "parameter parsing" during the discharge control stage, the system will pre-load all configuration parameters before the discharge, so as to quickly perform parameter parsing during each discharge cycle. Parameter preloading refers to the process of loading and deploying the configuration parameter data packet stored in the shared memory of the Support to the memory of each algorithm component. Parameter preloading is implemented by the parameter parsing plug-in deployed on each algorithm component, which involves two processes: shared memory data packet transmission and algorithm component parameter data loading.

[0086] (1) Parameter data shared memory transmission

[0087] The parameter parsing plug-in of each algorithm component and the Support use a shared memory-based message queue mechanism to achieve full-duplex communication. To distinguish between algorithm components, the shared memory is named "shm.rt.cpuID.command", where cpuID is the logical CPU identifier where each algorithm component runs, and a custom data structure Communication is used to manage it. The structure design is shown in Figure 5 as including:

[0088] Data queue Command Queue: used to store data queue area, managed in the form of Command array in the data structure, where the communication content carrier is each Command object in the queue. The Command data structure includes type (Command type), length (Command size), source (Command sender), and playload (Command attached data).

[0089] Front pointer: points to the first element in the queue, recorded in the form of Command array element index.

[0090] Tail pointer: points to the next position of the last element of the queue, recorded in the form of Command data element index.

[0091] The Support stores the configuration parameter data packet in the corresponding "shm.rt.cpuID.command" shared memory area according to cpuID, and each algorithm component cyclically detects the shared memory queue. When the type of the Command element popped out of the queue is the parameter data packet preparation ready command (RT_CMD_SHOT_START_REQ), the parameter data packet payload pointer of the Command is obtained, each algorithm component enters the running state, and the parameter data local loading is driven.

[0092] (2) Algorithm component parameter data loading

[0093] The purpose of parameter data local loading is to load the parameter data packet of shared memory into the memory data structure of the algorithm component, so as to quickly obtain the algorithm configuration parameters at the corresponding time during system running. As shown in Figure 6 , the configuration parameters of the algorithm component are organized and managed by the tree-shaped Waveform-Manager to achieve flexible and variable control functions. Therefore, the parameter loading process of the algorithm component is the process of filling the WaveformManager object from top to bottom by the parameter parsing plug-in according to the shared memory configuration parameter data packet.

[0094] WaveformManager is divided according to the control item category, which contains multiple control sequences Sequence, Sequence contains all phase and phase execution time vertex array, phase carries a unique execution algorithm Algorithm and its configuration parameters to achieve specific functions. Configuration parameters are composed of multiple configuration parameter items Waveform, all Waveform are divided into multiple parameter data sets Subset according to different functions for management, and the configuration parameter item Waveform itself is composed of multiple consecutive vertex values Vertex, Vertex contains a vertex value pair (time t and data value y) representing the time when the data changes. In this WaveformManager structure, the upper parent element manages the lower child element in the form of a table (map), and the sibling elements in the same layer are associated in the form of a linked list to facilitate quick lookup, such as Waveform and Vertex, which will store the pointer of the next sibling element. In addition, each parent element records the current time activated child element, such as the category recording the currently activated Sequence, and the Sequence recording the current phase.

[0095] 3. Real-time parameter parsing

[0096] The data preloaded into the memory is only the vertex value of the configuration parameter, and these data need to be further derived to obtain the configuration data at the corresponding time of the algorithm (i.e., parameter parsing) before they can be applied to the algorithm running. If only the real-time aspect is considered, parameter parsing can complete interpolation before the discharge control starts, however, due to the system needs to be suitable for long pulse even steady-state operation, pre-storing a large number of parameters in the memory will cause huge memory occupation. In addition, since the algorithm run by the system is adjusted according to the real-time state of the plasma, the configuration parameters are redundant settings, and not all configuration parameters of the algorithm will eventually be used for discharge control, and parameter pre-parsing will cause unnecessary memory consumption. Therefore, in this scheme, a real-time parameter parsing mode is adopted, that is, according to the vertex value of the configuration parameter of the running algorithm in each discharge period, the configuration parameter y value at the current running time is parsed and updated, which is used for subsequent algorithm logic operation.

[0097] Each running period parameter parsing plug-in traverses the Category of the current algorithm component WaveformManager one by one, and performs the following three-step process:

[0098] (1) Determine the Sequence executed by the current cycle Category: the system will request each Category to execute different control Sequence according to the plasma running state. The Sequence information of the current activation is recorded in the Category of WaveformManager, and whether to switch to a new Sequence is determined by comparing the activated Sequence with the current system request.

[0099] (2) Determine the phase in the executed Sequence: whether to switch to the next execution phase is determined according to the current running time of the system

[0100] (3) Determine all configuration parameter values of the current time of the Phase algorithm: all Vertex arrays (t1, y1), …, (tn, yn) of the data item are recorded in Waveform, and the system determines the selected related Vertex according to the current running time, and derives the value of the data item y at the current time through the Vertex. The derivation of y value is divided into two steps:

[0101] • Select the corresponding vertex value according to t: t has two selection methods, the default is to take the time of discharge start as -9 seconds for timing, which is called absolute timing; the other method is to take the algorithm entering as 0 time for timing, which is called relative timing, and is mainly used for system secondary switching algorithm timing. After t is determined, the selected vertex value is confirmed.

[0102] • Derive y value from vertex value according to data type: the data type is set when the data is defined, and there are three types, static data, i.e. y value remains unchanged throughout the process, step data keeps y value before t time until the next vertex value comes, and waveform data is obtained by linear interpolation of two vertex values (t m-1 ,y m-1 )(t m-1 ,y m-1 ) line, that is:

[0103] y=(y m -y m-1 )(t-t m-1 ) / (t m -t m-1 )+y m-1 .

[0104] Experimental verification

[0105] The plasma control system equipped with the configuration parameter distribution scheme currently has 16 algorithm components, of which 13 components need to be configured with parameter distribution. The system has been used in EAST device nuclear fusion control experiments for more than 1,000 shots, and has undergone 25-hour long pulse simulation experiments, with zero failures, fully verifying the stability and reliability of the configuration parameter distribution scheme.

[0106] 1. Configuration parameter distribution function verification

[0107] The configuration parameters of the control system, such as the target value of the plasma current IP, are set through the interface before discharge, and the parameter value corresponding to the current time is analyzed in real time during each operating period during the discharge process. Combined with the collected diagnostic data, the command data for plasma control is obtained through specific control logic calculation.

[0108] Taking the target parameter analysis of the plasma current IP in the 129109 experiment shot of the EAST device as an example, the functionality of parameter analysis is analyzed. As shown in FIG. 7(a), the target parameter waveform of the IP current set by the interface of the shape configuration control directory limited algorithm is in units of mega ampere (MA); and as shown in FIG. 7(b), the target parameter waveform of the plasma current IP analyzed in real time during the discharge process is in units of ampere (A). The system switches to the limit algorithm at 0.2 seconds, and the system uses the limit algorithm IP current parameter as the control target quantity of the plasma current. By comparing the IP current target quantity obtained by the parameter analysis in FIG. 7(b) with the limit algorithm IP current target quantity set in FIG. 7(a) after 0.2 seconds, it can be found that the IP waveforms of the two figures are completely consistent, and the specific embodiment is that the inflection point values of the waveforms near 0.35 seconds in the two figures are both about 142,000 A.

[0109] 2. Real-time analysis of configuration parameter distribution

[0110] Since the shape configuration control algorithm component is the algorithm component with the most parameters among the above-mentioned 16 components, as shown in FIG. 8, the longest time period of the parameter analysis service of the shape algorithm component in the 100 shots of the 2023 EAST annual experiment is selected for statistics, and it can be concluded that the maximum time consumption of the parameter analysis service is within 20 microseconds (the set running period of the shape real-time component is 100 microseconds), which meets the real-time requirement of parameter analysis and leaves sufficient time margin for complex logic operation. Figure 8

[0111] 3. Memory occupation change of long pulse running system

[0112] In order to verify the parameter analysis capability of the long pulse system, a simulation test with a duration of 25 hours was carried out, and the system memory was statistically analyzed in real time through a Linux command script, and the statistical results are shown in FIG. 9. Figure 9 ​The statistical analysis result shows that the system memory occupation does not present a growth trend related to the length of the discharge experiment time.

[0113] In summary, the plasma control configuration parameter distribution scheme meets the functional requirements of parameter distribution, and has good real-time performance and the ability to serve long pulse operation.

[0114] The above specific embodiments are only several optional embodiments of the present application, and based on the technical solutions of the present application and the related inspirations of the above embodiments, those skilled in the art can make various alternative improvements and combinations on the above specific embodiments.

Claims

1. A method of distributing configuration parameters for a plasma control system, characterized by, The method comprises the following steps: Deploying a parameter parsing plug-in of an auxiliary component and an algorithm component at a real-time node, and the auxiliary component and the algorithm component interact through shared memory; A configuration parameter management component of the master node broadcasts a gun number to the auxiliary component through a publish-subscribe mechanism in a discharge preparation stage, the auxiliary component sends a configuration parameter request to the configuration parameter management component, the configuration parameter management component generates a JSON format configuration parameter data packet according to the request and returns the configuration parameter data packet to the auxiliary component, and the auxiliary component stores the configuration parameter data packet in the shared memory; The shared memory of each algorithm component and the auxiliary component is named by a logical CPU identifier and is managed in a queue mode, and the algorithm component parameter parsing plug-in loads the shared memory configuration parameters into a local memory configuration parameter management structure after detecting a parameter ready command in the shared memory queue; In a discharge control stage, the parameter parsing plug-in traverses the configuration parameter management structure to dynamically determine an activated control sequence and a control section, and calculates a current time parameter value based on a vertex value pair (t, y); The communication content of the shared memory message queue is a Command object, and the Command object comprises: A type field: indicating a command category, including a parameter data packet ready command and a control instruction; A length field: indicating the size of a data payload in bytes; A source field: marking a logical CPU identifier of a command initiator; A data payload: a pointer to a configuration parameter data packet in the shared memory; The configuration parameter management structure is divided into a hierarchical structure according to control items, and specifically comprises: A control item: managing multiple control sequences in a hash table and recording a currently activated control sequence; A control sequence: associating multiple control sections through a linked list, and each control section containing a Vertex array of execution time vertices; A control section: binding a unique algorithm Algorithm and configuration parameters thereof, wherein the configuration parameters are stored in a vertex value pair (t, y), and data between vertices is generated through interpolation, and the interpolation mode includes static retention, step retention or linear interpolation; The interpolation calculation of the vertex value pair (t, y) is specifically: Static retention: the y value remains unchanged throughout the discharge period; Step retention: the y value remains the previous vertex value before t time, until the next vertex takes effect; Linear interpolation: according to the following formula: Calculate the current time y value, where y is the configuration parameter value of the current time t, y m is the parameter value of the mth vertex, y m-1 is the parameter value of the m-1th vertex, t m is the time point of the mth vertex, t m-1 is the time point of the m-1th vertex.

2. The method of claim 1, wherein, The interface data structure of the configuration parameter management component and the auxiliary component is defined through an interface description language, and the interface description language generates cross-platform data serialization code.

3. The method of claim 1, wherein the parameter distribution is performed by a parameter distribution unit of the plasma control system. In the discharge control stage, the time counting mode of the parameter real-time parsing includes: Absolute timing: taking the discharge start time as a reference, and accumulating the global time from -9 seconds; Relative timing: taking the algorithm start time as 0 time, and used for local timing when the algorithm internal state is switched.

4. The method of claim 3, wherein the configuration parameters are distributed to the plasma control system in a manner that is dependent on the type of the plasma control system. In the parameter real-time parsing process, only the configuration parameters corresponding to the activated Algorithm are parsed, and the parameters of the non-activated algorithms are reserved in the shared memory, so as to avoid occupying the local memory by redundant data.

5. The method of claim 1, wherein the parameter distribution is performed by a parameter distribution unit of the plasma control system. The shared memory message queue adopts a full-duplex communication mechanism, and specifically uses independent read and write buffers for bidirectional data transmission, and the buffers cyclically manage queue elements through head and tail pointers.

6. The plasma control system configuration parameter distribution method according to claim 1, characterized in that, The configuration parameters include: Algorithm scheduling scheme: dynamically switch control strategy by setting the time execution combination of control items; Plasma control target parameters: defined in the form of waveform data, including plasma current, configuration and density parameters.

7. The method of claim 1, wherein the parameter distribution is performed by a parameter distribution unit of the plasma control system. The naming rule of the shared memory message queue is "shm.rt.cpuID.command", wherein cpuID is the logical CPU number bound by the algorithm component, and the message queues corresponding to different cpuIDs are physically isolated.

Citation Information

Patent Citations

  • Method for managing fusion experiment configuration parameters

    CN118034764A

  • Multi-process dynamic data real-time storage method for fusion steady-state operation

    CN118093587A