Traditional Chinese medicine concentration process intelligent temperature control method based on fuzzy algorithm
By using fuzzy algorithms and fuzzy PID control combined with expert self-tuning control during the concentration of traditional Chinese medicine, the problem of difficult to model temperature variables is solved, and more accurate and stable temperature control is achieved.
Patent Information
- Application Number
- CN202411955950.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-28
- Publication Date
- 2025-04-11
AI Technical Summary
During the process of concentrating traditional Chinese medicine, it is difficult to accurately model the temperature variables, and are nonlinear, time-varying and delaying, making it difficult to accurately control the temperature.
Using an intelligent temperature control method based on fuzzy algorithm, the temperature control model of the concentration process is constructed, fuzzy rules are designed, and the fuzzy PID control and expert self-tuning control algorithm are combined to achieve accurate temperature control.
It improves the accuracy and stability of temperature control, enhances the robustness and fault tolerance of the system, and ensures good dynamic and static characteristics of the controlled variables.
Smart Images

Figure CN119806239A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an intelligent temperature control method for a traditional Chinese medicine concentration process, and belongs to the technical field of traditional Chinese medicine production. Background Art
[0002] The most important processes in the production process of traditional Chinese medicine are extraction, concentration and alcohol precipitation. These three processes involve a variety of physical changes and are a complex dynamic process system. In a traditional Chinese medicine production process, the soaked raw medicinal materials are first placed in the extraction tank for cyclic decoction to extract the available components in the liquid as much as possible, and at the same time, the volatile oil is separated by heating and condensation for use in the preparation of ingredients; the next step is to heat and concentrate the extracted liquid to evaporate the excess water to obtain the required liquid that meets the density requirements; the subsequent alcohol precipitation stage is to separate the impurities in the liquid through alcohol, and use the characteristics of impurities that are not easily soluble in alcohol to separate the impurity layer and the liquid layer to obtain a pure and refined liquid, and finally the ingredients are packaged to obtain the finished liquid that meets the process requirements. In the concentration process control, in order to ensure the process quality, it is necessary to effectively and accurately control the temperature parameters, but the temperature variables in actual production are difficult to accurately model, and often have nonlinear, time-varying, and delayed characteristics. Summary of the invention
[0003] The present invention aims to solve the problem that the temperature variables in the control of the traditional Chinese medicine concentration process are difficult to accurately model and often have nonlinearity, time-varying and delayed properties, and further proposes an intelligent temperature control method for the traditional Chinese medicine concentration process based on fuzzy algorithm.
[0004] The technical solution adopted by the present invention to solve the above-mentioned problem is: the steps of the present invention include:
[0005] Step 1, constructing a temperature control model for the concentration process;
[0006] Step 2: Design fuzzy rules;
[0007] Step 3: According to the formulated fuzzy rules, use the simulation editor in Matlab2018a to build a simulation model of the concentrated temperature fuzzy self-tuning controller;
[0008] Step 4: Introduce the fuzzy self-tuning control algorithm of expert control.
[0009] Furthermore, the temperature control model of the concentration process constructed in step 1 specifically includes:
[0010] The state equation is constructed as:
[0011]
[0012] In formula (1), is the room temperature elastic coefficient, T is the evaporation chamber temperature, up is the control action of the steam valve, τ is the time delay of the control function damaging the room temperature, α and β are the structural parameters of the evaporator;
[0013] The pressure equation is constructed as:
[0014]
[0015] In formula (2), P is the pressure inside the evaporator, u is the control function of the vacuum valve, and ε and θ are the structural parameters of the evaporator;
[0016] Let T = x1, P = x2, and combine equations (1) and (2), we get the state equation:
[0017]
[0018] By performing Laplace transform on formula (3), we can obtain G1(s) and G2(s), which are the temperature mathematical model and pressure mathematical model respectively:
[0019]
[0020] Only the temperature is studied, and the temperature control model obtained by formula (4) is:
[0021]
[0022] In formula (5), K is the static gain, τ is the lag time, and T is the coefficient of the inertia link.
[0023] Furthermore, in step 2, based on the tracking of the deviation and the rate of change of the deviation during the control process, the self-tuning law of the fuzzy PID parameters is summarized as follows:
[0024] In the response stage, the error e is large, so the Kp value should be increased and the Kd value should be decreased to shorten the response time of the control system, and Ki=0 should be taken to suppress overshoot; in the following stage, the error e is moderate, and the moderate Ki and Kd values should be selected to ensure a faster adjustment speed, and a smaller Kp value should be used to reduce overshoot; in the adjustment stage, the error e is small, and the Kp and Ki values should be appropriately increased to reduce the oscillation of the system and improve the stability of the controller. At the same time, when ec is small, the Kd value is slightly larger, and when ec is large, the Kd value is reduced;
[0025] In the fuzzy PID temperature control system, the fuzzy rules meet the following requirements: when the temperature is too high, the temperature can be reduced significantly to make it closer to the expected value, and the control amount should be increased at this time; conversely, when the temperature value is close to the expected value, a smaller control amount is applied to slow down the control rate and make the control system reach a stable state.
[0026] Furthermore, the two input values of the fuzzy controller designed in step 3 are the error e and the error change rate ec, while Kp, Ki, and Kd are its three outputs. Through the quantization of the fuzzy controller, the maximum membership method is used to obtain the accurate output value, thereby adjusting the PID coefficient, accumulating and outputting: Kp = Kp' + ΔKp, Ki = Ki' + ΔKi, Kd = Kd' + ΔKd, acting on the controlled object, and finally obtaining the output graph.
[0027] Furthermore, in step 4, the expert system rules are introduced through the error changes and rules as follows:
[0028] The constant A is greater than the constant B, ka is the amplification factor, ka>1, kb is the suppression factor, 0<kb<1, and em(k) is the deviation extreme value;
[0029] 1. The absolute value of the error e(k) is greater than a constant value A: At this time, no matter how the error changes, the maximum or minimum value of the controller can be directly output to obtain the fastest error adjustment, allowing the error to reduce its absolute value at the fastest rate;
[0030] 2. The absolute value of the error e(k) keeps increasing or is a fixed constant. At this time, e(k)ec(k)>0: If the error value is relatively large, greater than the constant B, a stronger controller is selected:
[0031] u(k)=u(k-1)+k a {[e(k)-e(k-1)]k p}+e(k)k i +[e(k)-2e(k-1)+e(k-2)]k d (6)
[0032] When the absolute value of the error increases but the error itself is very small, less than the smaller constant B, a weaker controller is selected to make the error change in the opposite direction and the absolute value decrease:
[0033] u(k)=u(k-1)+[e(k)-e(k-1)]k p +e(k)k i +[e(k)-2e(k-1)+e(k-2)]k d (7)
[0034] 3. The absolute value of the error e(k) keeps decreasing: the controller output can be kept unchanged to achieve dynamic balance;
[0035] Expressed as a control rule: if e(k)ec(k)<0and e(k)ec(k-1)>0,thenΔK p =ΔK i =ΔK d=0;
[0036] 4. When the error e(k) is at an extreme value: the control output is determined based on the deviation value at time k. When the absolute value of the deviation at this moment is greater than B, the control regulation is stronger:
[0037] u(k)=u(k-1)+k a e m (k)·k p (8)
[0038] When the absolute value of the deviation is less than B, the control regulation is weak:
[0039] u(k)=u(k-1)+k b e m (k)·k p (9)
[0040] 5. The absolute value of the error e(k) is less than a very small value: saturation needs to be reduced. The solution is to add an integral separation effect, and its mathematical expression is:
[0041]
[0042] In formula (10),
[0043] M+N∈Xe, obviously, with the change of deviation, the value changes continuously in the range of (0, 1), which reduces the steady-state error and has stronger anti-saturation performance;
[0044] Expressed as a control rule: if |e(k)|<ε, then ΔK p =ΔK i =ΔK d =0;
[0045] When the temperature deviation is different, select different control methods. When the deviation and the deviation change rate meet three and five, select expert control, and select fuzzy PID control for the rest.
[0046] The beneficial effects of the present invention are as follows: the present invention combines fuzzy control theory with conventional PID algorithm by fuzzy self-tuning PID control, and derives fuzzy mathematical relationships between three parameters Kp, Ki, and Kd of the PID controller and the deviation e and the deviation change rate ec through experience, and performs online adjustment on the parameters according to fuzzy control theory to meet the control needs of different deviations and deviation change rates, so as to ensure good dynamic and static characteristics of the controlled variable; compared with conventional PID, the present invention has the advantages of good robustness, high fault tolerance, and strong stability; the present invention introduces expert self-tuning control to reduce overshoot more quickly and accelerate the stabilization speed, and at the same time, adds expert rules on the basis of the fuzzy rule base to realize segmented control and improve system performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is the block diagram of the fuzzy self-tuning controller;
[0048] Figure 2 It is a schematic diagram of the membership function of the error e and the error change rate ec;
[0049] Figure 3 It is a schematic diagram of the membership function of Kp;
[0050] Figure 4 It is a schematic diagram of the membership function of Ki;
[0051] Figure 5 It is a schematic diagram of the membership function of Kd;
[0052] Figure 6 This is the fuzzy self-tuning PID flow chart;
[0053] Figure 7 It is a schematic diagram of fuzzy PID control simulation;
[0054] Figure 8 It is the block diagram of expert fuzzy control system. DETAILED DESCRIPTION
[0055] Specific implementation method 1: Figure 1 As shown, the intelligent temperature control method of traditional Chinese medicine concentration process based on fuzzy algorithm includes the following specific steps:
[0056] Step 1, constructing a temperature control model for the concentration process;
[0057] The state equation is constructed as:
[0058]
[0059] In formula (1), is the room temperature elastic coefficient, T is the evaporation chamber temperature, u p is the control action of the steam valve, τ is the time delay of the control function damaging the room temperature, α and β are the structural parameters of the evaporator;
[0060] The pressure equation is constructed as:
[0061]
[0062] In formula (2), P is the pressure inside the evaporator, u is the control function of the vacuum valve, and ε and θ are the structural parameters of the evaporator;
[0063] Let T = x1, P = x2, and combine equations (1) and (2), we get the state equation:
[0064]
[0065] By performing Laplace transform on formula (3), we can obtain G1(s) and G2(s), which are the temperature mathematical model and pressure mathematical model respectively:
[0066]
[0067] Only the temperature is studied, and the temperature control model obtained by formula (4) is:
[0068]
[0069] In formula (5), K is the static gain, τ is the lag time, and T is the coefficient of the inertia link;
[0070] Step 2: Design fuzzy rules; Based on the tracking of the deviation and the rate of change of the deviation during the control process, the self-tuning rules of the fuzzy PID parameters are summarized as follows:
[0071] In the response stage, the error e is large, so the Kp value should be increased and the Kd value should be decreased to shorten the response time of the control system, and Ki=0 should be taken to suppress overshoot; in the following stage, the error e is moderate, and the moderate Ki and Kd values should be selected to ensure a faster adjustment speed, and a smaller Kp value should be used to reduce overshoot; in the adjustment stage, the error e is small, and the Kp and Ki values should be appropriately increased to reduce the oscillation of the system and improve the stability of the controller. At the same time, when ec is small, the Kd value is slightly larger, and when ec is large, the Kd value is reduced;
[0072] In the fuzzy PID temperature control system, the fuzzy rules meet the following conditions: when the temperature is too high, the temperature can be reduced significantly to make it close to the expected value, and the control amount should be increased at this time; on the contrary, when the temperature value is close to the expected value, a smaller control amount is applied to slow down the control rate and make the control system reach a stable state;
[0073] Step 3. According to the established fuzzy rules, use the simulation editor in Matlab2018a to build a simulation model of the concentrated temperature fuzzy self-tuning controller; the designed fuzzy controller has two input values, which are the error e and the error change rate ec, while Kp, Ki, and Kd are its three outputs. Through the quantization of the fuzzy controller, the maximum membership method is used to obtain the accurate output value, so as to adjust the PID coefficient, accumulate and output: Kp = Kp' + ΔKp, Ki = Ki' + ΔKi, Kd = Kd' + ΔKd, act on the controlled object, and finally obtain the output graph;
[0074] Step 4: Introduce the fuzzy self-tuning control algorithm of expert control;
[0075] Through the error changes and rules, the expert system rules are introduced as follows:
[0076] The constant A is greater than the constant B, ka is the amplification factor, ka>1, kb is the suppression factor, 0<kb<1, and em(k) is the deviation extreme value;
[0077] 1. The absolute value of the error e(k) is greater than a constant value A: At this time, no matter how the error changes, the maximum or minimum value of the controller can be directly output to obtain the fastest error adjustment, allowing the error to reduce its absolute value at the fastest rate;
[0078] 2. The absolute value of the error e(k) keeps increasing or is a fixed constant. At this time, e(k)ec(k)>0: If the error value is relatively large, greater than the constant B, a stronger controller is selected:
[0079] u(k)=u(k-1)+k a {[e(k)-e(k-1)]k p}+e(k)k i +[e(k)-2e(k-1)+e(k-2)]k d (6)
[0080] When the absolute value of the error increases but the error itself is very small, less than the smaller constant B, a weaker controller is selected to make the error change in the opposite direction and the absolute value decrease:
[0081] u(k)=u(k-1)+[e(k)-e(k-1)]k p +e(k)k i +[e(k)-2e(k-1)+e(k-2)]k d (7)
[0082] 3. The absolute value of the error e(k) keeps decreasing: the controller output can be kept unchanged to achieve dynamic balance;
[0083] Expressed as a control rule: if e(k)ec(k)<0and e(k)ec(k-1)>0,thenΔK p =ΔK i =ΔK d =0;
[0084] 4. When the error e(k) is at an extreme value: the control output is determined based on the deviation value at time k. When the absolute value of the deviation at this moment is greater than B, the control adjustment is stronger:
[0085] u(k)=u(k-1)+k a e m (k)·k p (8)
[0086] When the absolute value of the deviation is less than B, the control regulation is weak:
[0087] u(k)=u(k-1)+k b e m (k)·k p (9)
[0088] 5. The absolute value of the error e(k) is less than a very small value: saturation needs to be reduced. The solution is to add an integral separation effect, and its mathematical expression is:
[0089]
[0090] In formula (10),
[0091] M+N∈Xe, obviously, with the change of deviation, the value changes continuously in the range of (0, 1), which reduces the steady-state error and has stronger anti-saturation performance;
[0092] Expressed as a control rule: if |e(k)|<ε, then ΔK p =ΔK i =ΔK d =0;
[0093] When the temperature deviation is different, select different control methods. When the deviation and the deviation change rate meet three and five, select expert control, and select fuzzy PID control for the rest.
[0094] Among them, the size of the input and output variables of fuzzy control is described in the form of language as {negative large, negative medium, negative small, zero, positive small, positive medium, positive large}. At the same time, in order to improve the accuracy of the system, when the error e approaches zero, positive zero and negative zero are divided to increase the resolution of the error. Therefore, the fuzzy subset of variable e is set to [NB, NM, NS, NO, PO, PS, PM, PB], and the fuzzy subsets of the remaining four variables ec, ΔKp, ΔKi, ΔKd are: {NB, NM, NS, ZO, PS, PM, PB}.
[0095] Therefore, for this fuzzy controller, the fuzzy rules of PID parameters are shown in Table 3.1, Table 3.2 and Table 3.3 below:
[0096] Table 3.1ΔKp fuzzy control rules table
[0097]
[0098] Table 3.2ΔKi fuzzy control rules table
[0099]
[0100] Table 3.2ΔKi fuzzy control rules table
[0101]
[0102] Table 3.3ΔKd fuzzy control rules table
[0103]
[0104] Fuzzy control rules are expressed by "if...then" statements, and the above rule table is described by 56 languages:
[0105] According to the actual engineering experience on site, the temperature deviation range is generally [-30,30], and the temperature difference change rate range is [-6,6]. In order to facilitate modeling and simulation, the fuzzy domain of the fuzzy self-tuning temperature controller is set as:
[0106] e=[-3,-2,-1,0,1,2,3], ec=[-3,-2,-1,0,1,2,3], ΔKp=[-0.3,-0.2,-0.1,0,0.1,0. 2,0.3], ΔKi=[-0.06,-0.04,-0.02,0,0.02,0.04,0.06], ΔKd=[-3,-2,-1,0,1,2,3].
[0107] The basic domain of the fuzzy controller is converted to the fuzzy domain through the quantization factor conversion, and the defuzzification is converted and output through the proportional factor. According to the mapping, the quantization factors of the error and the error change rate are K e =30 / 3=10,K ec =6 / 3=2.
[0108] Because the initial segment response of the system is large, the input and output variables of each fuzzy subset adopt triangular membership functions. To ensure the sensitivity of control, the edge adopts Gaussian function which can improve robustness.
[0109] The above is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent replacement and improvement made to the above embodiments without departing from the content of the technical solution of the present invention, based on the technical essence of the present invention, within the spirit and principles of the present invention, still fall within the protection scope of the technical solution of the present invention.
Claims
1. An intelligent temperature control method for Chinese medicine concentration process based on fuzzy algorithm, characterized in that: The specific steps include: Step 1, constructing a temperature control model for the concentration process; Step 2: Design fuzzy rules; Step 3: According to the formulated fuzzy rules, use the simulation editor in Matlab2018a to build a simulation model of the concentrated temperature fuzzy self-tuning controller; Step 4: Introduce the fuzzy self-tuning control algorithm of expert control.
2. The intelligent temperature control method for Chinese medicine concentration process based on fuzzy algorithm according to claim 1 is characterized in that: The temperature control model of the concentration process constructed in step 1 specifically includes: The state equation is constructed as: In formula (1), is the room temperature elastic coefficient, T is the evaporation chamber temperature, u p is the control action of the steam valve, τ is the time delay of the control function damaging the room temperature, α and β are the structural parameters of the evaporator; The pressure equation is constructed as: In formula (2), P is the pressure inside the evaporator, u is the control function of the vacuum valve, and ε and θ are the structural parameters of the evaporator; Let T = x1, P = x2, and combine equations (1) and (2), we get the state equation: By performing Laplace transform on formula (3), we can obtain G1(s) and G2(s), which are the temperature mathematical model and pressure mathematical model respectively: Only the temperature is studied, and the temperature control model obtained by formula (4) is: In formula (5), K is the static gain, τ is the lag time, and T is the coefficient of the inertia link.
3. The intelligent temperature control method for Chinese medicine concentration process based on fuzzy algorithm according to claim 1 is characterized in that: In step 2, based on the tracking of the deviation and the rate of change of the deviation during the control process, the self-tuning rules of the fuzzy PID parameters are summarized as follows: In the response stage, the error e is relatively large, so the value of Kp should be increased and the value of Kd should be decreased to shorten the response time of the control system, and Ki=0 should be taken to suppress overshoot; In the following stage, the error e is moderate, and the values of Ki and Kd are moderate to ensure a faster adjustment speed. At the same time, a smaller Kp value is used to reduce overshoot. In the adjustment stage, the error e is small, and the values of Kp and Ki should be appropriately increased to reduce system oscillation and improve controller stability. At the same time, when ec is small, the Kd value is slightly larger, and when ec is large, the Kd value is reduced. In the fuzzy PID temperature control system, the fuzzy rules meet the following requirements: when the temperature is too high, the temperature can be reduced significantly to make it approach the expected value, and the control amount should be increased at this time; On the contrary, when the temperature value is close to the expected value, a smaller control amount is applied to slow down the control rate and make the control system reach a stable state.
4. The intelligent temperature control method for Chinese medicine concentration process based on fuzzy algorithm according to claim 1 is characterized in that: The two input values of the fuzzy controller designed in step 3 are the error e and the error change rate ec, while Kp, Ki, and Kd are its three outputs. Through the quantization of the fuzzy controller, the maximum membership method is used to obtain the precise output value, so as to adjust the PID coefficient. After accumulation and output: Kp = Kp' + ΔKp, Ki = Ki' + ΔKi, Kd = Kd' + ΔKd, acting on the controlled object, and finally obtaining the output graph.
5. The intelligent temperature control method for Chinese medicine concentration process based on fuzzy algorithm according to claim 1 is characterized in that: In step 4, the expert system rules are introduced through error changes and rules as follows: The constant A is greater than the constant B, ka is the amplification factor, ka>1, kb is the suppression factor, 0<kb<1, and em(k) is the deviation extreme value; 1. The absolute value of the error e(k) is greater than a constant value A: At this time, no matter how the error changes, the maximum or minimum value of the controller can be directly output to obtain the fastest error adjustment, allowing the error to reduce its absolute value at the fastest rate; 2. The absolute value of the error e(k) keeps increasing or is a fixed constant. At this time, e(k)ec(k)>0: If the error value is relatively large, greater than the constant B, a stronger controller is selected: u(k)=u(k-1)+k a {[e(k)-e(k-1)]k p }+e(k)k i +[e(k)-2e(k-1)+e(k-2)]k d (6), When the absolute value of the error increases but the error itself is very small, less than the smaller constant B, a weaker controller is selected to make the error change in the opposite direction and the absolute value decrease: u(k)=u(k-1)+[e(k)-e(k-1)]k p +e(k)k i +[e(k)-2e(k-1)+e(k-2)]k d (7), 3. The absolute value of the error e(k) keeps decreasing: the controller output can be kept unchanged to achieve dynamic balance; Expressed as a control rule: if e(k)ec(k)<0and e(k)ec(k-1)>0,thenΔK p =ΔK i =ΔK d =0; 4. When the error e(k) is at an extreme value: the control output is determined based on the deviation value at time k. When the absolute value of the deviation at this moment is greater than B, the control regulation is stronger: u(k)=u(k-1)+k a and m (k)·k p (8), When the absolute value of the deviation is less than B, the control regulation is weak: u(k)=u(k-1)+k b and m (k)·k p (9), 5. The absolute value of the error e(k) is less than a very small value: saturation needs to be reduced. The solution is to add an integral separation effect, and its mathematical expression is: Formula (10) M+N∈Xe, obviously, with the change of deviation, the value changes continuously in the range of (0, 1), which reduces the steady-state error and has stronger anti-saturation performance; Expressed as a control rule: if |e(k)|<ε, then ΔK p =ΔK i =ΔK d =0; When the temperature deviation is different, select different control methods. When the deviation and the deviation change rate meet three and five, select expert control, and select fuzzy PID control for the rest.
Citation Information
Patent Citations
PID control based self-focusing lens ion exchange temperature control method and device
CN101710245A
Design of PID controller and application method of PID controller in primary control system
CN111538230A
3D printing temperature control algorithm
CN112114517A
Two-connecting-rod mechanical arm control method and device based on self-adjusting fuzzy iterative learning and medium
CN113296393A
Intelligent PID controller online optimization method and system
CN114839861A