A Chinese medicine intelligent aqueous extraction system and method based on digital twin technology
Through digital twin technology combined with CFD simulation and adaptive control of generative adversarial neural network, the lag and delay problems of PID control in traditional Chinese medicine production are solved, and the safety, stability and energy consumption optimization of the traditional Chinese medicine extraction process are achieved.
Patent Information
- Application Number
- CN202310733327.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-06-20
AI Technical Summary
During the production process of traditional Chinese medicine, there is pure lag and large delay in PID control, resulting in imbalance in the control system, serious thermal shock, shortened equipment life, and difficult to achieve coordinated optimization with other process control systems, and it is difficult to accurately predict and deal with abnormal working conditions.
The intelligent water extraction system of traditional Chinese medicine based on digital twin technology is adopted, combined with data acquisition, simulation and PID control modules, and uses CFD simulation technology, singular value decomposition algorithm and generative adversarial neural network to achieve adaptive control and optimize extraction energy consumption and quality.
It realizes safe and stable predictive control, optimizes the energy consumption of the extraction process, improves the accuracy of the control system and equipment life, and realizes visualization and intelligent decision-making of the system process.
Smart Images

Figure CN116578053B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent production of traditional Chinese medicine, and in particular relates to an intelligent aqueous extraction system and method for traditional Chinese medicine based on digital twin technology. Background Art
[0002] Digital twinning is a digital concept and technology based on the integration of data and models. It creates precise digital mappings of physical objects in real time in digital space, and uses data integration, analysis, and prediction to simulate, verify, predict, and control the entire lifecycle of physical entities, ultimately forming an optimized closed loop for intelligent decision-making. The physical objects targeted include physical objects, behaviors, and processes. The data involved in building the twin includes real-time sensor data and historical operational data, and the integrated models encompass physical, mechanistic, and process models. Applying this technology to intelligent extraction systems for traditional Chinese medicine will effectively optimize the energy allocation of the extraction process, achieving energy-saving, high-quality, and safe extraction control.
[0003] Generative Adversarial Networks (GANs) parameter self-tuning PID controller - GANs is a generative model that is widely used in data generation. This method belongs to the unsupervised learning method. The training method adopts the adversarial training method. The gradient update information of the generative model comes from the discriminant model. This process does not require a complex Markov chain. Compared with other models, GANs can generate clearer and more realistic sample data. Through GANs' own learning, the PID control parameters under a certain optimal control law can be found. The controller mainly consists of two parts: (1) Classic PID controller: directly performs closed-loop control on the controlled object; (2) GANs adversarial neural network: according to the operation of the system
[0004] State, adjust the parameters of the PID controller, that is, the output state of the output layer corresponds to the three adjustable parameters K of the PID controller P ,k I ,K D .
[0005] CFD (Computational Fluid Dynamics) simulation technology uses numerical solutions to the differential equations governing fluid flow to derive the discrete distribution of the fluid flow field over a continuous region, thereby approximating fluid flow conditions. Simulation technology can simulate a variety of operating conditions, and the results are visualized, achieving significant results in solving practical problems.
[0006] Singular Value Decomposition (SVD) is one of the most widely used algorithms in the field of machine learning, and is also one of the cornerstones that cannot be avoided when learning machine learning algorithms. The SVD algorithm is mainly used in the fields of feature decomposition in dimensionality reduction algorithms, recommendation systems, natural language processing, computer vision, etc. SVD decomposes a matrix into two orthogonal matrices and a diagonal matrix. The transformation corresponding to the orthogonal matrix is a rotation transformation, and the transformation corresponding to the diagonal matrix is a scaling transformation. The application of this technology will break the barriers to the integration of control system and simulation system technologies, better utilize simulation technology to guide the control process, highlight the advantages of simulation soft measurement, and solve the control imbalance and limitations brought about by a single detection site in automated control.
[0007] In terms of technology application, the current traditional Chinese medicine production process generally uses industrial control technology based on PID to achieve loop control. Although relatively mature tuning methods for PID parameters have been developed and rich tuning experience has been accumulated in actual applications, the decision on the operating index range of the production process still relies on the experience of process engineers. As a result, it is difficult to achieve coordinated optimization of the pharmaceutical process with other process control systems, difficult to achieve optimization of comprehensive production indicators, difficult to determine the target values of optimized operating indicators, and difficult to predict, judge, and handle abnormal operating conditions in a timely and accurate manner. Especially in the extraction process, due to the pure lag and large time delay of PID control, severe thermal shock is very likely to occur, resulting in control system imbalance, large-scale loss of heating heat source, and shortening the life of the equipment. Summary of the Invention
[0008] In view of this, the present invention proposes a safe and stable intelligent aqueous extraction system and method for traditional Chinese medicine based on digital twin technology, which can realize predictive control, optimize extraction energy consumption, and ensure extraction quality.
[0009] To achieve the above object, the present invention provides the following technical solutions:
[0010] A digital twin technology-based intelligent aqueous extraction system for traditional Chinese medicine comprises a data acquisition module, a simulation module, a PID control module, and a system execution module; the data acquisition module is used to extract oil bath temperature measurement data; the simulation module integrates process simulation and dimensionality reduction calculation based on the oil bath temperature measurement data, uses a singular value decomposition algorithm to form a fast calculation ROM, and completes a fast prediction output for data obtained by real-time measurement; the PID control module uses a generative adversarial neural network (GANs) to perform adaptive control based on the predicted output of the simulation module; and the system execution module completes the execution action to achieve adaptive control.
[0011] Furthermore, the simulation module is mainly composed of a heat transfer process simulation submodule, a dimensionality reduction calculation submodule and a data calculation submodule;
[0012] The heat transfer process simulation module is based on CDF simulation technology, and uses numerical solution to control the differential equation of the flow of traditional Chinese medicine liquid to obtain the discrete distribution of the flow field of the traditional Chinese medicine liquid in the continuous area to complete the simulation calculation;
[0013] The dimensionality reduction calculation submodule applies a singular value decomposition algorithm to perform dimensionality reduction training on the simulation calculation data to generate a prediction data set;
[0014] The data calculation submodule encapsulates the predicted data set into a fast calculation ROMs module.
[0015] Furthermore,
[0016] The PID control module uses the GANs neural network parameters to self-tune the PID controller; the fast calculation ROMs module is used as the input data of the GANs neural network, and the output of the GANs neural network is used as the three optimization setting parameters K required by the PID controller. P ,K I ,K D , and perform adaptive control.
[0017] Furthermore,
[0018] The system execution module converts the output value obtained after parameter optimization of the GANs neural network parameter self-tuning PID controller into an analog signal to control the opening and closing of the relay heating switch, so that the extraction system enters the boiling and reheating process or the boiling and cooling process.
[0019] On the other hand, the present invention also proposes a method for intelligent aqueous extraction of traditional Chinese medicine based on digital twin technology, comprising:
[0020] S1. Extract the oil bath temperature measurement data; integrate process simulation and dimensionality reduction calculation to convert the oil bath temperature measurement data into rising steam volume and complete rapid prediction output;
[0021] S2, based on the predicted output of rising steam volume, uses generative adversarial neural networks (GANs) to self-tune the PID controller for adaptive control;
[0022] S3. The output value obtained by the adaptive control is converted into an analog signal to control the opening and closing of the relay heating switch, so that the extraction system enters the boiling and then heating process or the boiling and then cooling process.
[0023] Furthermore, in step S1, the process simulation realizes the field calculation of the process control system, flow field visualization, experimental data set construction, prediction data set packaging, and acquisition of unmeasurable data based on the measurement data; the dimensionality reduction calculation needs to select the full-order system profile temperature and rising steam volume corresponding to the flow field simulation results obtained at different oil bath set temperatures as transient snapshot parameters, and generate a snapshot matrix by permuting and combining the transient snapshot data.
[0024] Furthermore, in step S2, the generative adversarial neural network GANs self-tuning PID controller uses the output value of the fast-calculated ROMs and the set rising steam volume as the input data signal of the generative adversarial neural network GANs, and synchronously generates a noise signal from a Gaussian random variable and inputs it into the probability generation model. The model needs to pre-set the learning rate and the number of hidden layers, and then perform the inverse transform sampling process.
[0025] Furthermore, after the inverse transform sampling is completed, the signal and the input data signal are input into the discriminant model together to perform data discrimination, so that the generated probability distribution and the real data distribution are as close as possible, thereby obtaining the rising steam amount that meets the real data spatial distribution.
[0026] Compared with the existing technology, the intelligent aqueous extraction system and method of traditional Chinese medicine based on digital twin technology of the present invention has the following outstanding beneficial effects:
[0027] The intelligent aqueous extraction system for traditional Chinese medicine based on digital twin technology uses data that can be actually measured for simulation and obtains more vivid unmeasurable parameters for system control, which highlights the advantages of soft measurement in the system and avoids the limitations of single detection. At the same time, the system can obtain flow field data through simulation, which helps to realize the visualization of the system process. With energy optimization as the goal, the system obtains a fast calculation model through simulation data training, which provides an optional way to achieve predictive control, and also provides a more intelligent strategy selection for later process tuning. The traditional PID controller uses GANs neural network parameter self-tuning to make the simulation sampling period and the actual measurement control cycle time more convenient to control and optimize, making the prediction results more accurate. In the end, a safe, energy-saving, predictably controllable and efficient digital twin intelligent aqueous extraction system for traditional Chinese medicine was obtained, which has good promotion and application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings, which constitute part of the present invention, are provided to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are provided to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:
[0029] Figure 1This is an architectural diagram of the intelligent aqueous extraction system for traditional Chinese medicine based on digital twin technology described in the present invention;
[0030] Figure 2 This is the heat transfer process simulation module architecture of the intelligent aqueous extraction system for traditional Chinese medicine based on digital twin technology described in the present invention;
[0031] Figure 3 This is a simulation function diagram of the intelligent aqueous extraction system for traditional Chinese medicine based on digital twin technology described in the present invention. DETAILED DESCRIPTION
[0032] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0033] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0034] like Figure 1 As shown in the figure, the present invention is a Chinese medicine intelligent aqueous extraction system based on digital twin technology, including a data acquisition module (oil bath temperature measurement value), a simulation module, a PID control system module, and a system execution module. The simulation module includes a heat transfer process simulation module, a dimensionality reduction calculation module, and a data calculation module. The functions of the simulation module are as follows: Figure 3 shown.
[0035] The heat transfer process simulation module in the simulation module realizes the field calculation of the process control system based on the measurement data, flow field visualization, experimental data set construction, prediction data set packaging, acquisition of unmeasurable data and other functions. In this embodiment, it is based on CFD simulation technology, and utilizes numerical solution to control the flow of traditional Chinese medicine liquid to obtain the discrete distribution of the flow field of the traditional Chinese medicine liquid in the continuous area, completes the simulation calculation, and calculates and outputs the temperature field data of the longitudinal section of the extraction system and the rising steam volume data. The architecture is as follows Figure 2 As shown in the figure, during the simulation process, considering the requirements for model accuracy, the extraction system model needs to be customized, including process parameters, material parameters, and model geometric dimensions. In the process parameter adjustment part, the UDF model is used to determine the heat transfer area of the system based on the volume of the oil bath and the water in the round-bottom flask, and at the same time determine the height of the water in the flask. A functional relationship between the heat transfer area and the height of the water in the round-bottom flask is established and introduced into the simulation. Since the extraction process can be approximately simplified to a traditional natural heat convection process, in the process of selecting the calculation simulation model, on the basis of steady-state calculation, the Boussinesq natural heat convection model, fluid-solid coupling model, gas-liquid two-phase VOF model and standard Ke turbulence model can be comprehensively used to perform specific calculation iterations.
[0036] After completing the simulation calculation, the heat transfer process simulation module enters the dimensionality reduction calculation module. This module needs to select the full-order system profile temperature and rising steam volume corresponding to the flow field simulation results obtained at different oil bath set temperatures as transient snapshot parameters, and generate the snapshot matrix U by permuting and combining the transient snapshot data. xT :
[0037]
[0038] This matrix stores the position information x used for dimensionality reduction j And the temperature information of the cross section (information on the amount of rising steam) T i , the position information is j discrete points, j = 1, 2, ..., N; the temperature information (rising steam amount information) is i discrete points, i = 1, 2, ..., m. u(x j ,T i ) represents the i-th temperature information (rising steam volume information) at the j-th position. The two-dimensional matrix U xT It has N rows and m columns.
[0039] Create the covariance matrix R:
[0040] R=1 / N·(U xT ′·U xT )
[0041] Among them U xT ' represents the two-dimensional matrix U xT The transposed matrix of .
[0042] Then perform eigenvalue and eigenvector decomposition, V is the eigenvector, and D is the characteristic root:
[0043] R·V=D·V
[0044] The eigenvector is the mode, and the eigenroot corresponds to the energy value of each mode. Generally, the mode corresponding to the largest eigenroot is called the first mode, that is, φ1.
[0045] V=[φ1,φ 2, …,φ i ]
[0046] Where, φ i Represents the i-th mode. The amplitude and size of the mode can be expressed by A:
[0047] A=U xT ·V
[0048] The signal change corresponding to each mode is:
[0049] A=U xT ·φ i
[0050] This will successfully xT In the matrix u(x j ,T i ) is split into two independent position signal modal amplitudes A i (x j ) function and profile temperature signal mode φ i (T i ) functions, as shown below.
[0051]
[0052] Generally, the energy (characteristic roots) of the first few modes is often much greater than the energy of the latter ones. Therefore, it is only necessary to analyze the first few modes to summarize the characteristics of the entire signal.
[0053] Based on the aforementioned dimensionality reduction principles, the module divides the data set into different parts based on different ambient temperatures and the difference between the extraction liquid level and the heat transfer medium level. Each data set is input into the dimensionality reduction module program, which extracts the eigenvalues of the data set, generates independent characteristic matrix data, and calculates the corresponding energy percentage. After the calculation is completed, the characteristic matrix data set generated under different conditions is the fast calculation ROMs data set. This data set is encapsulated in the form of Python code to provide prediction outputs of the oil bath temperature and the amount of rising steam from the water liquid in the round-bottom flask.
[0054] The PID control module uses an adversarial neural network for adaptive control. The output of the rapidly calculated ROMs and the set steam rise rate are used as input signals for the generative adversarial neural network (GANs). A noise signal generated by a Gaussian random variable is simultaneously input into the probabilistic generative model, which requires a pre-set learning rate and number of hidden layers. The module then enters the inverse transform sampling process.
[0055] The Probability Density Function (PDF) is a function used to describe the probability of a random number being distributed in a given interval. Integrating the PDF over a given interval gives the probability of a random number being distributed in that interval, i.e.:
[0056]
[0057] Among them, P rob It represents the probability of a random number being distributed in a given interval, s represents a uniformly distributed random number, a represents the lower limit of the random number, b represents the upper limit of the random number, and ρ(s) represents the density function.
[0058] Cumulative Distribution Function (CDF) S(s) is defined as the probability that a random distribution is less than a given number. According to the definition of PDF, CDF is:
[0059]
[0060] According to CDF, the probability of a random number being distributed in a specific interval [a, b] can be expressed as:
[0061] P rob (a≤s≤b)=F(b)-F(a)
[0062] Among them, F(b) represents the probability of being less than a given number b, and F(a) represents the probability of being less than a given number a.
[0063] Because the PDF is the probability density function of random numbers, it conforms to the rules of probability: the PDF must be greater than or equal to 0, and the PDF integrates 1 over all real numbers, meaning the sum of probabilities is 1. Because the CDF is the integral of the PDF, it defines that the CDF must be monotonically increasing, and its domain is [0, 1]. Because the CDF is monotonically increasing, it has an inverse function, and its inverse function is also monotonically increasing, and its domain is [0, 1].
[0064] Define the inverse cumulative distribution function of a specific distribution, and process the uniformly distributed random numbers through inverse transformation sampling to obtain random numbers that conform to the distribution function of the random variable, that is:
[0065]
[0066] Where S is a uniformly distributed random number, which has the same meaning as s; G is a random number of other distributions that conforms to a specific distribution. The G value can be obtained by random sampling of the system. When the system randomly generates a G value, the random number s that conforms to the specific distribution can be calculated. This realizes the randomness of any distribution F. S (s) is the inverse transform sampled.
[0067] The above has completed the preprocessing and inverse transform sampling of the randomly generated noise signal. The signal and the input data signal are input into the discriminant model together to perform data discrimination, so that the generated probability distribution and the real data distribution are as close as possible, thereby obtaining the rising steam volume that meets the real data spatial distribution. This value is used as the controlled quantity y(t) of the PID controller and the set rising steam volume x(t) to calculate the three optimization setting parameters required for the PID controller, the proportional coefficient K P , integral coefficient K I , differential coefficient K DThe entire system uses soft measurement technology to convert actual measurement values into rising steam volume in the fast calculation ROMs and data calculation modules through simulation processes to determine the system status, thereby guiding the system to perform PID control, complete execution actions, and achieve predictive control.
[0068] The mathematical expression of the PID control process is as follows:
[0069] e(t_=x(t)-y(t)
[0070]
[0071]
[0072] Among them: K P -Proportional coefficient; K I -Integral coefficient; K D -Differential coefficient; e(t) is the deviation value, and u(t) is the output value.
[0073] The above three formulas can be combined to get:
[0074]
[0075] Where, T s is the sampling time; T I is the integration time; T D is the differential time.
[0076] The design method of the intelligent aqueous extraction system of traditional Chinese medicine based on digital twin technology of the present invention is based on LABVIEW and ANSYS FLUENT system programs, integrating automatic control technology and simulation means. With the help of dimensionality reduction processing on the MATLAB platform, the data obtained by simulation can guide the system to complete control optimization in real time after passing through the data processing module.
[0077] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A Chinese medicine intelligent aqueous extraction system based on digital twin technology, characterized in that: The system includes a data acquisition module, a simulation module, a PID control module, and a system execution module. The data acquisition module is used to extract oil bath temperature measurement data. The simulation module integrates process simulation and dimensionality reduction calculation based on the oil bath temperature measurement data, uses a singular value decomposition algorithm to form a fast calculation ROM, and completes a fast prediction output based on the data collected and measured in real time. The PID control module uses a generative adversarial neural network (GANs) to perform adaptive control based on the prediction output of the simulation module. The system execution module completes the execution action and realizes adaptive control; The simulation module is mainly composed of a heat transfer process simulation submodule, a dimensionality reduction calculation submodule and a data calculation submodule; The heat transfer process simulation submodule is based on CFD simulation technology, and utilizes numerical solutions to the differential equations that control the flow of Chinese herbal medicine liquid to obtain the discrete distribution of the flow field of the Chinese herbal medicine liquid in a continuous area and complete the simulation calculation; The dimensionality reduction calculation submodule applies a singular value decomposition algorithm to perform dimensionality reduction training on the simulation calculation data to generate a prediction data set; The data calculation submodule encapsulates the predicted data set into a fast calculation ROMs module.
2. The intelligent aqueous extraction system for traditional Chinese medicine based on digital twin technology according to claim 1 is characterized in that: The PID control module uses the GANs neural network parameters to self-tune the PID controller; the fast calculation ROMs module is used as the input data of the GANs neural network, and the output of the GANs neural network is used as the three optimization setting parameters K required by the PID controller. P ,K I ,K D , and perform adaptive control.
3. The intelligent aqueous extraction system for traditional Chinese medicine based on digital twin technology according to claim 2 is characterized in that: The system execution module converts the output value obtained after parameter optimization of the GANs neural network parameter self-tuning PID controller into an analog signal to control the opening and closing of the relay heating switch, so that the extraction system enters the boiling and reheating process or the boiling and cooling process.
4. A method for intelligent aqueous extraction of traditional Chinese medicine based on digital twin technology, characterized in that: S1. Extract the oil bath temperature measurement data; integrate process simulation and dimensionality reduction calculation to convert the oil bath temperature measurement data into rising steam volume and complete rapid prediction output; S2, based on the predicted output of rising steam volume, uses generative adversarial neural networks (GANs) to self-tune the PID controller for adaptive control; S3. The output value obtained by the adaptive control is converted into an analog signal to control the opening and closing of the relay heating switch, so that the extraction system enters the boiling and then heating process or the boiling and then cooling process; In step S1, the process simulation realizes the field calculation of the process control system, flow field visualization, experimental data set construction, prediction data set packaging, and acquisition of unmeasurable data based on the measurement data; the dimensionality reduction calculation selects the full-order system profile temperature and rising steam volume corresponding to the flow field simulation results obtained at different oil bath set temperatures as transient snapshot parameters, and generates a snapshot matrix by permuting and combining the transient snapshot data.
5. The intelligent aqueous extraction method of traditional Chinese medicine based on digital twin technology according to claim 4 is characterized in that: In step S2, the generative adversarial neural network (GANs) self-tuning PID controller uses the output value of the fast-calculated ROMs and the set rising steam volume as the input data signal of the generative adversarial neural network (GANs), and synchronously generates a noise signal from a Gaussian random variable and inputs it into a probability generation model. The model needs to pre-set the learning rate and the number of hidden layers, and then perform an inverse transform sampling process.
6. The intelligent aqueous extraction method of traditional Chinese medicine based on digital twin technology according to claim 5 is characterized in that: After the inverse transform sampling is completed, the signal and the input data signal are input into the discrimination model to perform data discrimination, thereby obtaining the rising steam amount that meets the spatial distribution of the real data.