Hydraulic servo position control method and system for rotary wheel of steel cylinder closing machine

By optimizing the pressure of the hydraulic servo system through fuzzy logic control and reinforcement learning, the problem of uneven stress on the inner wall of the cylinder during the rotary template back-sealing process is solved, achieving efficient and precise control of the cylinder, extending the service life and improving product quality. .

CN118409560BActive Publication Date: 2024-08-23HANGZHOU REBOTECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410874913.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-08-23
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

The existing rotary wheel template bottom sealing process causes the formation of longitudinal protrusions during the closing process of the cylinder, resulting in uneven stress at the bottom wall thickness and transition section of the cylinder, which is prone to cracks, slag inclusions and bubbles, thereby reducing the service life of the cylinder.

Method used

Fuzzy logic control combined with reinforcement learning strategy is used to intelligently adjust the pressure of the hydraulic servo system. Through the dynamic adjustment of the discretized PID controller and the correction factor α(k), the pressure of the rotating wheel is optimized to adapt to the wall thickness deviation. and real-time changes in pressure to achieve precise control of the inner wall of the cylinder.

Benefits of technology

It significantly reduces the problems of cracks, slag inclusions and bubbles on the inner wall of the cylinder, optimizes stress distribution, extends the service life of the cylinder, and improves product quality and production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118409560B
    Figure CN118409560B
Patent Text Reader

Abstract

The invention discloses a method and system for controlling the position of a rotary wheel hydraulic servo for a steel bottle closing machine; the invention relates to the technical field of steel bottle closing; selecting a wall thickness deviation Δ w and the pressure F as the input variables of the fuzzy logic control; read the fuzzy set and fuzzy rules to infer the fuzzy value α(k)' of the correction factor α(k); read the set state space and action space, and introduce the fuzzy value α(k)' as a suggestion for an action of the reinforcement learning algorithm; introduce a discretized PID controller to control the hydraulic servo system; the present invention uses the fuzzy logic control system of step S1, and the method can intelligently handle the two key variables of wall thickness deviation and pressure. The reinforcement learning strategy introduced in step S2 not only takes into account the dynamic processing accuracy, but also takes the processing efficiency into consideration. In this way, the correction factor α(k) obtained can more comprehensively reflect the actual needs of the processing process, and achieve the dual optimization of processing efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of steel cylinder closing, specifically to the technical field of hydraulic servo system control of a rotary wheel template bottom sealing process, and particularly to a rotary wheel hydraulic servo position control method and system for a steel cylinder closing machine. Background Art

[0002] The bottom sealing and closing processes of steel cylinders include flat template bottom sealing process and rotary wheel template bottom sealing process. Flat template bottom sealing equipment is simple, easy to operate and highly efficient, but the bottom fusion and concave bottom size control are poor. The rotary wheel template bottom sealing can be automatically controlled, the bottom center can reduce local defects and better fusion, and the concave bottom size is easy to control. Therefore, the mainstream technology generally prefers the rotary wheel template bottom sealing process.

[0003] The rotary wheel template bottom sealing process is to heat and pressurize a seamless steel pipe of a certain specification in a closing machine (also known as a bottom closing machine). Its basic mechanical structure and principle can be found in the following literature: Jiang Ziliang. A hot rotary hydraulic closing machine for steel cylinders [P]. CN202021913840.4: 2021-05-18;

[0004] The process is:

[0005] S1, heating the mouth of the seamless steel pipe to about 1100℃;

[0006] S2, the wheel moves linearly to the pipe mouth and makes tangential contact with it;

[0007] S3, the roller rotates 90° along the end face of the pipe mouth, that is, the roller and the pipe mouth change from tangential contact to vertical contact; during the rotation process, the roller is pressurized by the hydraulic servo system (driven by the hydraulic cylinder), and under the action of radial pressure of the roller shaft, the metal at the bottom of the seamless steel pipe is melted together and forms a plane shape with an outer convex hemispherical shape and an inner center that is approximately a umbilical hole (hereinafter referred to as the "longitudinal protrusion");

[0008] S4, the rotary wheel is reset and the cylinder with the bottom sealed is removed.

[0009] However, there are some defects in the tube cylinders produced by the rotary wheel template bottom sealing process. After analysis, the following defects are summarized, such as Figure 2 As shown:

[0010] (1) Grounding area: The shape and size of this area of ​​the tube bottle are limited by the spinning bottom sealing process, and the thickness is not enough, which easily leads to insufficient thickness and low fatigue life. During the use of cylinders, especially when they are frequently moved or impacted, this thinner area is more susceptible to damage.

[0011] (2) Transition section: The transition section of the cylinder is where stress is most concentrated. During the spinning process, the steel tube cannot be thickened according to the standard of the longitudinal protrusion, and the transition with the cylinder body is not smooth. This structural discontinuity and stress concentration will lead to a decrease in fatigue life and increase the risk of problems during the use of the cylinder.

[0012] The mechanism of the above defects is that: during the execution of S3, due to the radial pressure of the tube mouth by the rotating wheel, the center of the bottom of the cylinder will produce the following defects during the molding process: Figure 2 The longitudinal protrusion shown in the figure leads to the deviation of the bottom wall thickness of the steel cylinder from the transition section and the grounding part; when the wall thickness deviation causes the relative temperature to be low, the rotary wheel of the bottom collecting machine generates cracks, slag inclusions and bubbles on the inner wall of the steel cylinder due to the improper relative force of the hydraulic servo system. The deeper mechanism can be found in the following literature, which will not be elaborated here:

[0013] Wu Chuanxiao. Structural design and performance test of punch-drawn cold-spun high-pressure seamless steel cylinder[D]. Zhejiang University of Technology, 2019;

[0014] Xu Jiusheng. Causes and countermeasures of longitudinal grooves in the inner liner of compressed natural gas cylinders for vehicles[J]. Petroleum and Chemical Equipment, 2013, 16(5): 2.DOI: CNKI: SUN: HSFF.0.2013-05-027;

[0015] In order to solve the above defects, some existing technologies have been improved, for example:

[0016] One prior art discloses a bottom-sealing machine that can adjust the geometric shape of the cylinder head (Fan Yingjun, Guo Shijin, Li Jiushi, et al. High-pressure seamless large-diameter steel cylinder spinning and sealing machine [P]. CN02287580.8: 2004-11-17). It can improve the shape of the grounding part and the transition part by adjusting the relative position of the forming template and the blank, but it does not essentially optimize the above-mentioned phenomenon of improper relative force application, and may still cause the problem of inner wall stress;

[0017] Another prior art discloses a bottom closing machine with a special configuration (Wang Zhonghua, Bai Yanci. Cylinder closing device [P]. CN98114087.4: 2000-06-14), which can improve the shape of the landing part and the transition part by using a rotating wheel with a curved surface and an arc angle for construction, but it does not essentially optimize the above-mentioned phenomenon of improper relative force application, and may still cause the problem of inner wall stress;

[0018] Another prior art discloses a secondary molding process based on a rotary wheel template bottom sealing process (Li Linyu, Li Baisheng. Automatic closing molding equipment for seamless steel cylinders [P]. CN201811515063.5: 2019-02-12), which first pre-forms the mouth of the steel cylinder workpiece through a closing scraper mold, and then performs secondary molding of the mouth and shoulder of the steel cylinder workpiece through a molding rotary wheel, so that the stress at the end of the bottle mouth is improved and the blank is neat; however, the above-mentioned relative improper force phenomenon is not optimized in essence, and inner wall stress problems may still occur.

[0019] To this end, the present invention proposes a method and system for controlling the hydraulic servo position of a rotary wheel for a steel bottle closing machine. Summary of the invention

[0020] In view of this, the embodiment of the present invention hopes to provide a method and system for controlling the hydraulic servo position of a rotary wheel for a steel cylinder closing machine; the technical solution of the present invention is implemented as follows:

[0021] First, the hydraulic servo position control method of the rotary wheel for the cylinder closing machine:

[0022] 1. Overview:

[0023] The present invention aims to solve the following technical problems: considering that the longitudinal protrusion is inevitably formed according to the specific construction method of the rotary wheel template bottom sealing process, it is not realistic to eliminate the longitudinal protrusion; however, the hydraulic servo system can be intelligently controlled to enable the rotary wheel to adaptively and intelligently adjust the pressure according to the wall thickness deviation, thereby reducing the possibility of cracks, slag inclusions and bubbles on the inner wall of the cylinder, thereby optimizing the stress concentration phenomenon at the landing part and the transition section, and enhancing the service life of the cylinder.

[0024] The present invention chooses to use fuzzy logic control combined with reinforcement learning strategy. Fuzzy logic control can provide a fast and robust initial response, while reinforcement learning can make fine adjustments and optimizations on this basis. This combination enables the control system to utilize the expert's prior knowledge and to learn and adapt itself.

[0025] (II) Ideas for improvement:

[0026] The hydraulic servo system (hydraulic cylinder) of the traditional bottom collecting machine is based on PLC program control. Based on this hardware, a continuous PID controller algorithm can be introduced into the hydraulic servo system:

[0027] ;

[0028] Where: u(t) is the output electrical signal of the controller at time t. e(t) is the deviation between the set value and the actual value, that is, e(t) = r(t)-y(t), where r(t) is the set value and y(t) is the actual value.

[0029] Indicates that at a certain moment Deviation value. Deviation At that point in time The difference between the set value (expected value) and the actual value. is an integral variable (time point) used to represent any time from the initial moment to the current moment t in the integral term.

[0030] K p , K i and K d are the gains of the proportional, integral and differential controllers respectively. The proportional term K p e(t) is used to respond to deviations immediately. The larger the deviation, the stronger the control effect. i e(t) is used to eliminate steady-state errors and increase control by accumulating past deviations. d e(t) is used to predict the changing trend of future deviations and perform control in advance to reduce overshoot and improve system stability.

[0031] 2.1 Discrete PID controller:

[0032] The longitudinal protrusion is gradually formed under the action of radial pressure of the rotating wheel shaft; therefore, the above PID controller needs to be discretized:

[0033] ;

[0034] Where: u(k) is the controller output at sampling time k. e(k) is the deviation at sampling time k. e(k-1) is the deviation at sampling time k-1.

[0035] e(j) represents the deviation value at sampling time j. r(j) is the set value (expected value) at sampling time j, and y(j) is the actual value at the same sampling time. The deviation value e(j) is defined as ;

[0036] Discrete PID controllers are implemented in digital systems where time is divided into discrete sampling points instead of being continuous. At these sampling points, the system reads the actual value and calculates the deviation from the setpoint. So in practice, e(j) is the deviation between the setpoint and the actual value at a specific sampling time j, and it plays a key role in the discrete PID control algorithm, helping the system adjust the output to reduce or eliminate this deviation.

[0037] 2.2 Intelligent discrete PID controller:

[0038] In order to dynamically adjust the pressure of the rotary wheel, a correction term is introduced that changes dynamically with the discrete step length. The expression of the corrected discrete PID controller is:

[0039] ;

[0040] Among them, α(k) is a correction factor, and it is time-varying (changing with time k), so it can dynamically adjust the output u(k) of the PID controller. In other words, it actually dynamically scales the output of the entire PID controller. The correction factor α(k) is updated at each sampling time k, thereby adjusting the output strength of the PID controller in real time.

[0041] By changing the value of α(k), the output of the PID controller can be directly enlarged or reduced. For example, when α(k)>1, the output of the controller will be enlarged; when 0<α(k)<1, the output will be reduced; and when α(k)=0, the controller output is zero, that is, no control action is performed.

[0042] This mode allows the hydraulic servo system to dynamically adjust according to the current relative wall thickness and relative temperature difference to optimize the control effect. For example, when a large wall thickness deviation is detected, α(k) can be increased to strengthen the control effect; conversely, α(k) can be reduced to avoid over-control.

[0043] At this point, the technical context of this solution has been clarified: how to dynamically assign the correction factor α(k).

[0044] (III) Technical solution:

[0045] In order to dynamically assign the correction factor α(k), this solution chooses to provide a preliminary, expert knowledge-based dynamic adjustment strategy for α(k) through fuzzy logic control. First, ensure that there is a relatively reasonable control strategy at the beginning of the operation of the hydraulic servo system. Then use the reinforcement learning algorithm to further optimize this strategy. The reinforcement learning algorithm can adjust the value of α(k) according to the real-time status and performance feedback of the system to maximize the closing efficiency reward function. In this way, the hydraulic servo system can gradually learn how to adjust α(k) more accurately under different conditions. The specific operation steps include the following steps S1~S3.

[0046] 3.1 Step S1, read the fuzzy logic control system:

[0047] Select wall thickness deviation Δ wand the pressure F (these two values ​​are obtained from the existing cylinder design drawing and the hydraulic cylinder execution parameters respectively) as the input variables of the fuzzy logic control; the fuzzy value α(k)' of the correction factor α(k) is inferred by reading the fuzzy set and fuzzy rules; it includes the following steps S100~S102.

[0048] 3.1.1 Step S100, read the fuzzy set:

[0049] is the wall thickness deviation Δ w The fuzzy sets including “small S”, “medium M” and “large L” are defined by the pressure intensity F, and the membership functions are specified for these sets.

[0050] 3.1.1.1 Input variable wall thickness deviation Δ w The membership function of is:

[0051] For small S, the membership function μ S (Δ w ), using the following Gaussian membership function:

[0052] ;

[0053] A similar form can be used for the membership functions of medium M and large L, but the center value and width parameters are adjusted accordingly to reflect the different set ranges.

[0054] The membership function μ of M M (Δ w )for:

[0055] ;

[0056] Membership function μ of large L L (Δ w )for:

[0057] ;

[0058] Among them, c S is the central value of the set of small S, c M is the central value of the set of M, c L is the central value of the set of large L, σ 2 is the width parameter of the corresponding set, which determines the shape of the corresponding membership function. e is the base of the natural logarithm.

[0059] 3.1.1.2 The membership function of the pressure F is:

[0060] For small S, the membership function μ S (F) is:

[0061] ;

[0062] Among them, c S,F is the central value of the set of small pressure S, representing the typical value of what we consider to be a “small” pressure; σ S,F is the width parameter of the set, which determines the coverage of the fuzzy set "small".

[0063] The membership function μ of M M (F) is:

[0064] ;

[0065] Among them, c M,F is the central value of the set of medium M, representing the typical value of what we consider to be “medium” pressure; σ M,F is the corresponding width parameter.

[0066] Membership function μ of large L L (F) is:

[0067] ;

[0068] Among them, c L,F is the central value of the set of large L, representing the typical value of what we consider to be a “large” pressure; σ L,F is the width parameter of the collection.

[0069] 3.1.2 Step S101, fuzzy reasoning:

[0070] Based on the established fuzzy rule base (Fuzzy Inference Engine), the fuzzy inference engine is used to calculate the wall thickness deviation Δ according to the input w and the real-time value of the applied pressure F, the fuzzy set FS of the fuzzy value α(k)' of the correction factor α(k) is inferred.

[0071] The fuzzy inference engine uses a series of IF-THEN rules that define the relationship between input and output. i :

[0072] ;

[0073] Among them, μ Ai (Δ w ), μ Bi (F) and μ Ci (α(k)') are the input Δ w , F and output α(k)' correspond to the membership function of the fuzzy set.

[0074] The fuzzy reasoning machine will output the final fuzzy value α(k)' fuzzy set FS through the weighted average aggregation method according to the activation degree of all fuzzy rules (i.e., the logical and operation results of the input membership).

[0075] 3.1.3 Step S102, defuzzification:

[0076] The fuzzy set FS of the final fuzzy value α(k)' is defuzzified to obtain the fuzzy value α(k)'.

[0077] There are many methods for defuzzification, including the maximum membership method and the centroid method (also known as the centroid method or area center method). This solution takes the centroid method as an example:

[0078] ;

[0079] Among them, μ F (x) represents the membership function of the fuzzy set FS, and a and b represent the domain of the fuzzy set.

[0080] However, based on the discretization form described in Section 2.2 and the form required in step S3, the fuzzy set should be composed of a series of discrete points, so the above integral formula needs to be further converted into a summation form. Suppose the fuzzy set FS is composed of n discrete points, and the membership degree of each point is μ i , the corresponding value is x i , then the discretized centroid method formula can be expressed as:

[0081] ;

[0082] Through the above expression, the fuzzy set FS of the fuzzy value α(k)' can be defuzzified into a specific value.

[0083] It is understandable that the fuzzy value α(k)' at this time can be used as the correction factor α(k) described in 2.3 above, that is, it can be directly substituted into step S3 for the subsequent position control of the cylinder closing machine. However, the fuzzy value α(k)' at this time only considers the accuracy factor, but does not consider the actual processing efficiency factor. Therefore, the subsequent step S2 will further refine the fuzzy value α(k)' to obtain the dual effect of taking into account both processing efficiency and processing accuracy.

[0084] 3.2 Step S2, introduce reinforcement learning algorithm:

[0085] Read the set state space and action space, and then maximize the closing efficiency through the reward function, introduce the fuzzy value α(k)' as a suggestion for an action of the reinforcement learning algorithm, and dynamically output the correction factor α(k) of the reinforcement learning algorithm, and observe the reward obtained after executing the action and the change of the system state. It includes the following steps S200~S203.

[0086] 3.2.1 Step S200, state space and action space:

[0087] 1) State space S: including the real-time value of wall thickness deviation d and the real-time value of applied pressure f:

[0088] ;

[0089] Among them, D is the range of all possible values ​​of wall thickness deviation, and F is the set of all possible values ​​of applied pressure.

[0090] 2) Action space A: It is defined as the range of values ​​of the correction factor α(k), which is a discretized value:

[0091] A = {α1(k), α2(k),...,α n (k)};

[0092] Among them, α i (k) is the ith discrete value that the correction factor α(k) may take at the kth moment, and n is the total number of discrete values.

[0093] 3.2.2 Step S201, reward function:

[0094] When the closing efficiency of the hydraulic servo system action is improved, a positive reward is given, and when the closing efficiency is reduced, a negative reward is given; and a reward factor r is generated;

[0095] Assume the current closing efficiency is E current , the last closing efficiency is E previous , then the change in closing efficiency ΔE is expressed as:

[0096] ΔE = E current -E previous ;

[0097] Based on this change, the reward factor r can be defined as a positive and negative reward mechanism:

[0098] ;

[0099] 3.2.3 Step S202, execute SARSA algorithm:

[0100] Initialize the parameters and value functions in the algorithm. The SARSA algorithm combines the fuzzy value α(k)' output by the fuzzy logic control, the efficiency state of the current hydraulic servo system and the reward factor r, selects and outputs the actual value of the correction factor α(k). The SARSA algorithm selects the actual action to be performed based on the action suggestion and the current state. It includes the following steps S2020~S2022;

[0101] 3.2.3.1 Step S2020, combined with fuzzy logic control:

[0102] When selecting the action to be performed, the SARSA algorithm considers the fuzzy value α(k)′ output by the fuzzy logic control and the efficiency state of the current hydraulic servo system. This process can be expressed as selecting an action a t , the action is based on the current state s t and the fuzzy value α(k)′, and the value function Q(s t ,a). Action a t Choose to use the ε-greedy strategy:

[0103] ;

[0104] in, is a small positive number, indicating the probability of exploration. In practical applications, the fuzzy value α(k)′ is used as the action a t A reference or weight for selection. a is a specific value of the correction factor α(k), which is selected by the agent based on the current state and environmental feedback.

[0105] More specifically, the agent will t and previous experience (reflected by the value function (Q(s,a)) to select an action a t This action aims to maximize the long-term cumulative reward. In practical applications, this action may be a discrete value, representing the adjustment of the correction factor α(k), which is used to control certain parameters of the hydraulic servo system to optimize the closing efficiency.

[0106] When choosing an action, the agent adopts the above-mentioned ε-greedy strategy, that is, in most cases it will choose the action that is currently considered the best (that is, the action with the highest Q value, where the Q value is the value function Q(s t , the output value of a), but there is a small probability This will cause it to randomly choose an action to explore possible better options. This strategy balances the need to exploit currently known information and explore unknown options.

[0107] 3.2.3.2 Step S2021, perform actions and observe rewards:

[0108] According to the action selected by the SARSA algorithm, the correction factor α(k) is adjusted. t After adjusting the correction factor α(k), observe the newly obtained reward factor r′ and the new hydraulic servo system efficiency state s t+1 This process is the environment's response to the action, and it uses reward factors to feedback the quality of the action.

[0109] 3.2.3.3 Step S2022, update the reinforcement learning algorithm:

[0110] Based on the observed new reward factor r′ and the new state s t+1 , update the value function Q(s) in the SARSA algorithm t ,a). The update formula follows the update rule of SARSA:

[0111] ;

[0112] Where: η is the learning rate, which controls the step size of the update. γ is the discount factor, which is used to weigh the importance of future rewards. t+1 Is in the new state st+1 The next action is chosen according to the value function and possible ε-greedy strategy. t ,a)' is the updated value function.

[0113] 3.2.4 Step S203, obtaining the correction factor α(k):

[0114] The value function Q(s) in step S202 t ,a) is used to estimate the expected return of performing action a in state s. Action a corresponds to different correction factors α(k). Based on the updated value function Q(s t ,a)', the process of selecting the correction factor α(k) is selected through a strategy:

[0115] When selecting action a (i.e., correction factor α(k)), the ε-greedy strategy is adopted to find a balance between "exploitation" of the currently known best action and "exploration" of new actions that may be better. The probability of selecting the action a with the largest value function in the current state (correction factor α(k)):

[0116] ;

[0117] Among them, s t is the current state;

[0118] The principle of the above formula is to randomly select an action in the defined action space S (i.e., the discrete value range of the correction factor α(k)), argmax a (Q(s t , a)) represents the choice of making Q(s t ,a) The largest action a.

[0119] Therefore, the correction factor α(k) is selected from a predefined action space based on the value function and the current policy. The value function provides information about the expected return of choosing different actions in different states, and the policy defines how to choose actions based on this information.

[0120] 3.3 Step S3, execute PID controller:

[0121] As described in 2.3 above, a discretized PID controller is introduced to control the hydraulic servo system, and the electrical signal of the hydraulic servo system is dynamically scaled based on the obtained correction factor α(k):

[0122] ;

[0123] Where u(k) is the controller output (electrical signal) at sampling time k. e(k) is the deviation at sampling time k. e(k-1) is the deviation at sampling time k-1. e(j) represents the deviation value at sampling time j. r(j) is the set value (expected value) at sampling time j, and y(j) is the actual value at the same sampling time. The deviation value e(j) is defined as ; K p , K i and K d are the gains of the proportional, integral and derivative controllers respectively.

[0124] The correction factor α(k) is based on the output of the fuzzy logic control system in step S1, taking into account the wall thickness deviation Δ w The fuzzy value α(k)' that changes with the dynamic change of the pressure F is obtained by combining the reinforcement learning strategy output for processing efficiency in step S2. This correction factor α(k) has the dual effect of taking into account both processing efficiency and processing accuracy.

[0125] 4. Mechanisms for solving technical problems:

[0126] 4.1 Intelligent control system:

[0127] As the core driving force of the cylinder closing machine, the hydraulic servo system accurately controls the movement of the rotary wheel through the hydraulic servo valve. The introduction of fuzzy logic control and reinforcement learning strategies enables the system to intelligently calculate the correction factor α(k) based on the real-time data of wall thickness deviation and pressure, and then adjust the output of the hydraulic servo system to achieve precise control of the pressure of the rotary wheel.

[0128] 4.2 Adaptive intelligent adjustment:

[0129] The control system uses fuzzy logic control and reinforcement learning algorithms based on feedback data to dynamically adjust the pressure of the rotary wheel to ensure accuracy and efficiency during processing. This adaptive intelligent adjustment mechanism enables the rotary wheel to adjust the pressure in real time according to the wall thickness deviation of different parts, avoiding excessive or insufficient pressure.

[0130] 4.3 Reduce the defective rate:

[0131] By precisely controlling the pressure applied by the rotary wheel, this method can significantly reduce the possibility of cracks, slag inclusions and bubbles on the inner wall of the cylinder. Cracks, slag inclusions and bubbles are common defects in the manufacturing process of cylinders, which seriously affect the quality and safety of the product. The above intelligent control method greatly reduces the probability of these defects through real-time monitoring and adjustment, thereby improving the product yield.

[0132] 4.4 Optimize stress distribution and enhance service life:

[0133] The landing part and transition section of the cylinder are key areas of stress concentration. By intelligently controlling the pressure applied by the rotary wheel, the stress distribution in these areas can be optimized and the stress concentration phenomenon can be reduced. The optimized stress distribution not only improves the structural strength of the cylinder, but also effectively extends its service life. During long-term use, the cylinder can better resist changes in internal and external pressures and reduce the risk of damage caused by stress concentration.

[0134] Secondly, the hydraulic servo position control system for the rotary wheel of the cylinder closing machine:

[0135] like Figure 3 As shown, the system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory. When the program instructions are executed by the processor, the processor executes the servo position control method as described above, and after the correction factor α(k) is generated, it is read by the PLC controller and controls the rotary wheel hydraulic servo system.

[0136] Compared with the prior art, the present invention has the following beneficial effects:

[0137] 1. Intelligent adaptive adjustment: The present invention uses the fuzzy logic control system of step S1, which can intelligently handle the two key variables of wall thickness deviation and pressure. The reinforcement learning strategy introduced in step S2 not only takes into account the dynamic processing accuracy, but also takes the processing efficiency into consideration. In this way, the correction factor α(k) obtained can more comprehensively reflect the actual needs of the processing process, achieving dual optimization of processing efficiency and accuracy.

[0138] 2. Accurate real-time control: The present invention uses a discrete PID controller algorithm to intelligently control the hydraulic servo system. This control method can accurately adjust the pressure through the correction factor according to the real-time wall thickness deviation data, thereby ensuring that the rotary wheel is always in the best state during the processing.

[0139] 3. Reduce the defective rate: The present invention can significantly reduce the possibility of cracks, slag inclusions and bubbles on the inner wall of the steel cylinder through intelligent adaptive adjustment. Not only improve the product quality, but also reduce the defective rate, thereby reducing production costs. At the same time, by accurately controlling the pressure applied by the rotary wheel, the present invention can optimize the stress distribution of the steel cylinder landing part and the transition section, and reduce the phenomenon of stress concentration. This helps to enhance the structural strength and service life of the steel cylinder.

[0140] 4. Improve the robustness of the production process: The method of the present invention combines a variety of advanced control strategies, making the entire production process more robust to external interference and internal changes. Even in a complex production environment, it can maintain stable processing quality and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0141] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0142] Figure 1 It is a schematic diagram of the method flow of the present invention.

[0143] Figure 2 This is a schematic diagram of the structure of a half-section of the bottom of a tube cylinder.

[0144] Figure 3 It is a schematic diagram of the system composition of the present invention.

[0145] Figure 4 Schematic diagram of overall stress simulation for the experimental group and control group of the test case.

[0146] Figure 5Schematic diagram of stress simulation at the landing site of the experimental group and the control group of the test example.

[0147] Figure 6 Schematic diagram of stress simulation in the transition section of the experimental group and the control group of the test example. DETAILED DESCRIPTION

[0148] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;

[0149] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0150] Embodiment 1: Figure 1 As shown, this embodiment discloses a method for controlling the hydraulic servo position of a rotary wheel for a steel cylinder closing machine; the method aims to realize intelligent control of the hydraulic servo system, so that the rotary wheel can adaptively and intelligently adjust the pressure according to the wall thickness deviation, thereby reducing the possibility of cracks, slag inclusions and bubbles on the inner wall of the steel cylinder, thereby optimizing the stress concentration phenomenon at the grounding part and the transition section of the steel cylinder, and enhancing the service life of the steel cylinder; this scheme includes the following steps S1~S3.

[0151] In this embodiment, regarding step S1, the fuzzy logic control system is read: select the wall thickness deviation Δ w and pressure F, as the input variables of fuzzy logic control; the pressure F can be obtained from the hydraulic cylinder execution parameters; and the wall thickness deviation Δ w You need to determine according to the design documents Figure 2 The difference between the longitudinal protrusion shown and the other wall thickness is determined. Then the fuzzy set and fuzzy rules are read to infer the fuzzy value α(k)' of the correction factor α(k). Step S1 includes the following steps S100-S102.

[0152] Specifically, in step S100, the fuzzy set is read: the input variable wall thickness deviation Δ wThe pressure F defines fuzzy sets, including "small S", "medium M" and "large L", and specifies the corresponding membership functions. These fuzzy sets and membership functions will be used in subsequent fuzzy logic reasoning to achieve intelligent control of the pressure of the rotary wheel. Among them:

[0153] 1) Input variable wall thickness deviation Δ w The membership function of is:

[0154] The membership function μ of small S S (Δ w ):

[0155] ;

[0156] The membership function μ of M M (Δ w )for:

[0157] ;

[0158] Membership function μ of large L L (Δ w )for:

[0159] ;

[0160] Among them, c S is the central value of the set of small S, c M is the central value of the set of M, c L is the central value of the set of large L, σ 2 is the width parameter of the corresponding set, which determines the shape of the corresponding membership function. e is the base of the natural logarithm.

[0161] It can be understood that the above membership function belongs to the Gaussian membership function, which can smoothly describe the degree to which the variable belongs to a fuzzy set. Similar to the wall thickness deviation Δw, the pressure F is also specified for the small S, medium M and large L sets of the pressure F. The center value and width parameters of these functions are set according to the actual range and typical value of the pressure:

[0162] 2) The membership function of the pressure F is:

[0163] For small S, the membership function μ S (F) is:

[0164] ;

[0165] Among them, c S,F is the central value of the set of small pressure S, representing the typical value of what we consider to be a “small” pressure; σ S,Fis the width parameter of the set, which determines the coverage of the fuzzy set "small".

[0166] The membership function μ of M M (F) is:

[0167] ;

[0168] Among them, c M,F is the central value of the set of medium M, representing the typical value of what we consider to be “medium” pressure; σ M,F is the corresponding width parameter.

[0169] Membership function μ of large L L (F) is:

[0170] ;

[0171] Among them, c L,F is the central value of the set of large L, representing the typical value of what we consider to be a “large” pressure; σ L,F is the width parameter of the collection.

[0172] It can be understood that by defining fuzzy sets and membership functions, the uncertainty of input variables can be described and handled more flexibly. Its flexibility enables the hydraulic system to better adapt to various complex situations such as slight changes in cylinder wall thickness or fluctuations in pressure. The membership function provides a basis for subsequent fuzzy logic reasoning, allowing the system to intelligently adjust the pressure of the rotary wheel according to real-time wall thickness deviation and pressure data.

[0173] Furthermore, the Python execution program of the above step S101 is as follows:

[0174] import math

[0175] def gaussian_membership_function(x, c, sigma):

[0176] """

[0177] # Gaussian membership function

[0178] :param x: #input value

[0179] :param c: #center value

[0180] :param sigma: #Standard deviation of width parameter

[0181] :return: #Membership value

[0182] """

[0183] return math.exp(-((x - c) ** 2) / (2 * sigma ** 2))

[0184] def calculate_membership_functions(input_value, parameters):

[0185] """

[0186] #Calculate and return six membership function values

[0187] :param input_value: #Input value (wall thickness deviation Δw or applied pressure F)

[0188] :param parameters: # parameter dictionary, including the center value and width parameters of each membership function

[0189] :return: # Membership values ​​of small S, medium M, and large L

[0190] """

[0191] # Initialize the membership dictionary

[0192] memberships = {'S': 0, 'M': 0, 'L': 0}

[0193] # Calculate membership based on parameters

[0194] for set_name, params in parameters.items():

[0195] c, sigma = params['center'], params['sigma']

[0196] memberships[set_name] = gaussian_membership_function(input_value, c,sigma)

[0197] return memberships

[0198] # Parameter settings (adjustable)

[0199] parameters_delta_w = {

[0200] 'S': {'center': -1,'sigma': 0.5},

[0201] 'M': {'center': 0,'sigma': 0.5},

[0202] 'L': {'center': 1,'sigma': 0.5},

[0203] }

[0204] parameters_F = {

[0205] 'S': {'center': 50,'sigma': 10},

[0206] 'M': {'center': 100,'sigma': 10},

[0207] 'L': {'center': 150,'sigma': 10},

[0208] }

[0209] # Main program

[0210] delta_w_value = {} # Wall thickness deviation value

[0211] F_value = {} # Pressure application intensity value

[0212] memberships_delta_w = calculate_membership_functions(delta_w_value,parameters_delta_w)

[0213] memberships_F = calculate_membership_functions(F_value, parameters_F)

[0214] print("Memberships for delta_w:", memberships_delta_w)

[0215] print("Memberships for F:", memberships_F)

[0216] In the above program, the calculate_membership_functions function will accept the input value (wall thickness deviation Δw or applied pressure F) and the related parameters (center value and width parameter), and then return the membership of the corresponding fuzzy set (small S, medium M, large L). The gaussian_membership_function function calculates the Gaussian membership of a given input value x for a specific center value c and width parameter sigma. The function iterates over these parameters, calculates the membership of the input value to each fuzzy set using the Gaussian membership function, and returns a dictionary containing these memberships.

[0217] Specifically, step S101, fuzzy reasoning: In this step, a fuzzy reasoning engine is used to perform intelligent reasoning to obtain the input wall thickness deviation Δ w The fuzzy set FS of the fuzzy value α(k)' of the correction factor α(k) is derived from the real-time data of the applied pressure F. This step is the core link of the intelligent control of the hydraulic servo system, which aims to enable the rotary wheel to adaptively adjust the applied pressure according to the real-time wall thickness deviation.

[0218] Fuzzy inference engines use a series of IF-THEN rules that define the relationship between input and output. Each rule R i All express a specific relationship between conditions and results:

[0219] ;

[0220] Among them, μ Ai (Δ w ), μ Bi (F) and μ Ci (α(k)') are the input Δ w , F, and the output α(k)' correspond to the membership functions of the fuzzy sets. These membership functions are used to quantify the degree to which the input and output belong to a specific fuzzy set ("small S", "medium M", "large L").

[0221] Then, fuzzy reasoning is performed as follows:

[0222] 1) Input fuzzification: The real-time measured wall thickness deviation Δ w The value of the pressure F is converted into the membership of the fuzzy set through the corresponding membership function.

[0223] 2) Rule Activation: The fuzzy inference machine evaluates all IF-THEN rules. For each rule, it calculates the logical AND operation result of the membership degree corresponding to the input value, which reflects the activation degree of the rule.

[0224] 3) Calculation of output fuzzy value: According to the weighted average aggregation method of all activated rules, the fuzzy inference machine will output a fuzzy set FS of fuzzy value α(k)'. This weighted average takes into account the activation degree of each rule and its corresponding output membership:

[0225] There are n fuzzy rules, each rule Ri corresponds to an output membership μC i (α(k)') and an activation factor w i (is the minimum value of the corresponding membership degree). The fuzzy set FS of the final fuzzy value α(k)' obtained by the weighted average aggregation method is expressed as:

[0226] ;

[0227] Among them, i traverses all rules from 1 to n. This expression is actually a weighted average of the output membership of all rules to obtain the final fuzzy value.

[0228] It can be understood that through fuzzy reasoning, the operating system can dynamically adjust the fuzzy value of the fuzzy value α(k)' according to the real-time wall thickness deviation and pressure data. This adaptability allows the pressure of the rotary wheel to respond more accurately to changes in the cylinder manufacturing process, thereby improving product quality. The system can adjust the pressure of the rotary wheel according to actual conditions to avoid excessive or insufficient pressure from negatively affecting the quality of the cylinder, thereby making fuzzy reasoning help reduce the possibility of cracks, slag inclusions and bubbles on the inner wall of the cylinder.

[0229] Furthermore, the Python execution program of step S101 is as follows, which needs to call the calculate_membership_functions function described above to be executed, and can also be implemented with the fuzzy rule library provided in the second embodiment:

[0230] # Input parameters

[0231] parameters_delta_w = {...} # Membership function parameters of wall thickness deviation Δw

[0232] parameters_F = {...} # Membership function parameters of pressure F

[0233] parameters_alpha_k_prime = {...} # Membership function parameters of correction factor α(k)'

[0234] # Fuzzy inference function

[0235] def fuzzy_inference(delta_w, F):

[0236] # Calculate the membership of the input value

[0237] memberships_delta_w = calculate_membership_functions(delta_w,parameters_delta_w)

[0238] memberships_F = calculate_membership_functions(F, parameters_F)

[0239] # Initialize the membership of the output fuzzy set FS to 0

[0240] memberships_alpha_k_prime = {key: 0 for key in parameters_alpha_k_prime.keys()}

[0241] # Traverse all fuzzy rules for reasoning

[0242] for rule_key in memberships_delta_w.keys():

[0243] # Get the input membership of the current rule

[0244] mu_delta_w = memberships_delta_w[rule_key]

[0245] mu_F = memberships_F[rule_key]

[0246] # Calculate the activation degree of the rule (take the minimum value of the membership as the activation degree)

[0247] rule_activation = min(mu_delta_w, mu_F)

[0248] # If the rule is activated (i.e. the activation degree is greater than 0), update the membership of the output fuzzy set FS

[0249] if rule_activation>0:

[0250] for output_key in memberships_alpha_k_prime.keys():

[0251] # The rule output directly corresponds to the same fuzzy set, such as "small S" input corresponds to "small S" output, etc.

[0252] memberships_alpha_k_prime[output_key] = max(memberships_alpha_k_prime[output_key], rule_activation)

[0253] return memberships_alpha_k_prime

[0254] # Main program

[0255] delta_w_value = ... # A specific wall thickness deviation value

[0256] F_value = ... # A specific pressure value

[0257] memberships_alpha_k_prime = fuzzy_inference(delta_w_value, F_value)

[0258] print("Fuzzy output memberships for α(k)':", memberships_alpha_k_prime)

[0259] In the above program, the membership of the input values ​​(wall thickness deviation Δw and applied pressure F) to their respective fuzzy sets ("small S", "medium M", "large L", etc.) is calculated by calling the calculate_membership_functions function. Then, the program traverses all fuzzy rules. For each rule, it calculates the activation degree of the rule, that is, the minimum value of the input membership. This minimum value indicates the degree to which the premise part of the rule is satisfied. If the activation degree of the rule is greater than 0, it means that the rule is valid for the current input, and the program will update the membership of the fuzzy set FS of the fuzzy value α(k)' according to the output part of the rule.

[0260] Specifically, step S102, defuzzification: the fuzzy set FS of the final fuzzy value α(k)' is defuzzified by performing the centroid method to obtain the fuzzy value α(k)':

[0261] ;

[0262] Among them, μ F(x) represents the bell-shaped membership function of the fuzzy set FS, a and b represent the domain of the fuzzy set. Where c is the center point of the bell:

[0263] ;

[0264] However, for the form required by step S3 below, the fuzzy set FS should be composed of a series of discrete points, so the above integral formula needs to be further converted into a summation form. Suppose the fuzzy set FS is composed of n discrete points, and the membership degree of each point is μ i , the corresponding value is x i , then the discretized centroid method is implemented as:

[0265] ;

[0266] Through the above expression, the fuzzy set FS of the fuzzy value α(k)' can be defuzzified into a specific value.

[0267] It is understandable that the fuzzy value α(k)' at this time can be directly substituted into step S3 for the subsequent position control of the cylinder closing machine. However, the fuzzy value α(k)' at this time only considers the accuracy factor, but does not consider the actual processing efficiency factor. Therefore, the subsequent step S2 will further refine the fuzzy value α(k)' to obtain the dual effect of taking into account both processing efficiency and processing accuracy.

[0268] Furthermore, the Python execution program of step S102 is as follows:

[0269] def defuzzify(FS):

[0270] """

[0271] The fuzzy set FS is defuzzified using the centroid method.

[0272] FS: Fuzzy set, represented in dictionary form, with keys as possible output values ​​and values ​​as corresponding membership degrees.

[0273] """

[0274] # Initialize the numerator and denominator

[0275] numerator = 0

[0276] denominator = 0

[0277] # Traverse each element in the fuzzy set

[0278] for value, membership in FS.items():

[0279] numerator += value * membership

[0280] denominator += membership

[0281] # Use the centroid formula to calculate the defuzzified value

[0282] if denominator == 0:

[0283] raise ValueError("The sum of the membership of a fuzzy set cannot be 0")

[0284] defuzzified_value = numerator / denominator

[0285] return defuzzified_value

[0286] # Example fuzzy set FS

[0287] FS_example = {

[0288] 10: 0.1,

[0289] 20: 0.5,

[0290] 30: 0.8,

[0291] 40: 1.0,

[0292] 50: 0.6, 60: 0.3

[0294] }

[0295] # Defuzzify the example fuzzy set

[0296] alpha_k_prime = defuzzify(FS_example)

[0297] print(f"The defuzzified value α(k)' = {alpha_k_prime}")

[0298] The principle of the above program is that the defuzzification adopts the centroid method, and a specific value is obtained by calculating the weighted average of all elements in the fuzzy set. First, initialize the two variables numerator (numerator) and denominator (denominator) to zero. Then traverse each element in the fuzzy set, calculate the weighted sum (numerator) and the sum of the membership (denominator). Finally, the defuzzified value is obtained by division. The function returns the specific value alpha_k_prime after defuzzification, which can be directly used in the subsequent control system.

[0299] In this embodiment, regarding step S2, a reinforcement learning algorithm is introduced: the set state space and action space are read, and then the closing efficiency is maximized through the reward function, and the fuzzy value α(k)' is introduced as a suggestion for an action of the reinforcement learning algorithm, and the reinforcement learning algorithm dynamically outputs the correction factor α(k), and observes the reward obtained after executing the action and the change of the system state. It includes the following steps S200~S203.

[0300] Specifically, in step S200, the state space and the action space are:

[0301] 1) State space S: including the real-time value of wall thickness deviation d and the real-time value of applied pressure f:

[0302] ;

[0303] Among them, D is the range of all possible values ​​of wall thickness deviation, and F is the set of all possible values ​​of applied pressure.

[0304] 2) Action space A: Action is the decision made by the agent (i.e., control system) based on the current state, which is used to change the state of the system or affect the environment. It is defined as the range of values ​​of the correction factor α(k), which is a discretized value:

[0305] A = {α1(k), α2(k),...,α n (k)};

[0306] Among them, α i (k) is the ith discrete value that the correction factor α(k) may take at the kth moment, and n is the total number of discrete values.

[0307] It is understandable that based on the state space and action space, the reinforcement learning algorithm can more accurately understand the current state of the system and take appropriate actions (i.e., select the appropriate correction factor) as needed. This helps to achieve precise control of the pressure and position of the rotary wheel, thereby improving the manufacturing accuracy and quality of the cylinder. Since the state space contains the real-time values ​​of the wall thickness deviation and the pressure applied, the algorithm can dynamically adjust the correction factor according to the real-time changes of this information. This adaptive adjustment capability enables the system to flexibly respond to changes in various processing conditions and ensure stable and consistent molding quality of the cylinder.

[0308] Specifically, in step S201, the reward function is: when the closing efficiency of the hydraulic servo system action is improved, a positive reward is given, and when the closing efficiency is reduced, a negative reward is given; and a reward factor r is generated; let the current closing efficiency be E current , the last closing efficiency is E previous , then the change in closing efficiency ΔE is expressed as: ΔE = E current -E previous ; This change represents the change in closing efficiency from the last action to the current action. Based on this change, the reward factor r can be defined as a positive and negative reward mechanism:

[0309] ;

[0310] Its mechanism is:

[0311] 1) When ΔE>0, it means that the closing efficiency has improved, and a positive reward is given, that is, r = +1. This encourages the algorithm to continue exploring behaviors that can improve the closing efficiency.

[0312] 2) When ΔE<0, it means that the closing efficiency is reduced, and a negative reward is given, that is, r = -1. This is a penalty for behaviors that are not conducive to task completion, guiding the algorithm to avoid such behaviors.

[0313] 3) When ΔE = 0, it means that the closing efficiency has not changed, and the reward factor is 0, that is, r = 0. This means that the current behavior has neither positive nor negative effects.

[0314] Furthermore, the Python execution program of the above steps S200 to S201 is as follows:

[0315] import numpy as np

[0316] # Define state space and action space

[0317] def create_state_action_spaces():

[0318] # The range of wall thickness deviation and pressure

[0319] D = np.arange(-1.0, 1.1, 0.1) # The range of wall thickness deviation

[0320] F = np.arange(0, 101, 10) # The range of pressure intensity

[0321] # Create state space

[0322] state_space = [(d, f) for d in D for f in F]

[0323] # Action space is the discrete value of the correction factor

[0324] action_space = np.arange(-1.0, 1.1, 0.2) # Example correction factor range

[0325] return state_space, action_space

[0326] # Define reward function

[0327] def calculate_reward(current_efficiency, previous_efficiency):

[0328] delta_E = current_efficiency - previous_efficiency

[0329] if delta_E>0:

[0330] return 1 # Closing efficiency is improved, positive rewards are given

[0331] elif delta_E<0:

[0332] return -1 # Closing efficiency is reduced, giving negative rewards

[0333] else:

[0334] return 0 # The closing efficiency has not changed, and the reward is 0

[0335] # Main program

[0336] if __name__ == "__main__":

[0337] # Create state space and action space

[0338] state_space, action_space = create_state_action_spaces()

[0339] print("State Space:", state_space)

[0340] print("Action Space:", action_space)

[0341] # The value of the two closing efficiency

[0342] previous_efficiency = 80 # The last closing efficiency

[0343] current_efficiency = 85 # Current closing efficiency

[0344] # Calculate rewards

[0345] reward = calculate_reward(current_efficiency, previous_efficiency)

[0346] print("Reward:", reward)

[0347] In the above program, the create_state_action_spaces function generates all possible state combinations to form a state space based on the preset wall thickness deviation range D and pressure range F. The action space is defined based on the preset correction factor range, which represents the possible action adjustment amount. The calculate_reward function receives the current closing efficiency and the last closing efficiency as input. The change in closing efficiency is determined by calculating the difference between the two, delta_E. The positive or negative value of the reward is determined by the positive or negative value of delta_E. If the efficiency is improved, the reward is positive, if the efficiency is reduced, the reward is negative, and if there is no change, the reward is zero.

[0348] Specifically, step S202 executes the SARSA algorithm: used to solve the optimal strategy in a reinforcement learning environment. The characteristic of the SARSA algorithm is that it considers the current state, the current action, the next state, and the action to be taken in the next state at the same time during the learning process, hence the name SARSA (State-Action-Reward-State-Action). In this step, the SARSA algorithm is combined with fuzzy logic control to realize intelligent control of the hydraulic servo system.

[0349] First, the parameters and value functions in the algorithm need to be initialized. The value function is used to estimate the long-term reward of taking a specific action under a given state, and it is the basis for the SARSA algorithm to make decisions. Initializing these parameters and value functions is a prerequisite for the algorithm to start learning. The SARSA algorithm will work in combination with the fuzzy value α(k)' output by the fuzzy logic control, the efficiency state of the current hydraulic servo system, and the reward factor r. The fuzzy value α(k)' output by the fuzzy logic control reflects the system's preliminary judgment on the correction factor, which is based on factors such as the current wall thickness deviation and pressure. This fuzzy value provides a reference point for the SARSA algorithm, but the SARSA algorithm will further make refined decisions based on actual conditions.

[0350] The SARSA algorithm then uses the above information to select and output the actual value of the correction factor α(k). This process is the core of the algorithm, which takes into account the current state, possible actions, and the expected returns from these actions. Through continuous trial and error and learning, the SARSA algorithm can gradually find the optimal action strategy, that is, how to adjust the correction factor based on factors such as the current wall thickness deviation and pressure, so as to achieve adaptive adjustment of the pressure of the rotary wheel. At the same time, the SARSA algorithm selects the actual action to be performed based on the action suggestion and the current state. The action suggestion here comes from the fuzzy logic control of step S1, and the SARSA algorithm is responsible for making the final decision based on these suggestions. In this way, we can ensure that the pressure of the rotary wheel can be dynamically adjusted according to the actual situation to adapt to different processing conditions and wall thickness deviations.

[0351] Specifically, step S203, obtain the correction factor α(k): the value function Q(s) in step S202 t ,a) is used to estimate the expected return of performing action a in state st. Action a corresponds to different correction factors α(k). Based on the updated value function Q(s t ,a)', the process of selecting the correction factor α(k) is selected by the following strategy:

[0352] When selecting action a (i.e., correction factor α(k)), the ε-greedy strategy is adopted:

[0353] The action a (correction factor α(k)) with the largest value function in the current state is selected with a probability of 1-ε. The correction factor α(k) corresponding to this action is what we think is the best choice in the current state. At the same time, randomly selecting an action with a probability of ε ensures that the system has enough opportunities to explore new possibilities:

[0354] ;

[0355] Among them, s t is the current state;

[0356] The principle of the above formula is to randomly select an action in the defined action space S (i.e., the discrete value range of the correction factor α(k)), argmax a (Q(s t , a)) represents the choice of making Q(s t ,a) The largest action a.

[0357] Therefore, the correction factor α(k) is selected from the predefined action space A based on the value function and the current policy. The value function provides information about the expected return of choosing different actions in different states, and the policy defines how to choose actions based on this information.

[0358] It is understandable that through the combined use of the value function and the ε-greedy strategy, the system can adaptively select the optimal correction factor α(k) according to different states, thereby realizing intelligent control of the hydraulic servo system. By optimizing the pressure applied by the rotary wheel, the possibility of cracks, slag inclusions and bubbles on the inner wall of the cylinder is reduced, thereby improving product quality and pass rate. Through the precise selection of the correction factor α(k), the stress concentration phenomenon at the landing part and transition section of the cylinder can be optimized, and the structural strength and safety of the product can be improved. Its mechanism is mainly attributed to the idea of ​​reinforcement learning and the application of the ε-greedy strategy. Through continuous learning and experimentation, the system can gradually find the optimal action selection (i.e., the correction factor α(k)), thereby realizing precise control of the hydraulic servo system.

[0359] Furthermore, the Python execution program of step S203 is as follows:

[0360] import numpy as np

[0361] # Both the state space and the action space (the value of the correction factor α(k)) are discrete

[0362] num_states = {} # size of the state space, example value

[0363] num_actions ={} # The size of the action space (i.e. the number of possible values ​​of the correction factor)

[0364] # Q = ... (get the updated Q value table from step S202 of embodiment 3)

[0365] # Set the ε value in the ε-greedy strategy

[0366] epsilon = 0.1

[0367] # Current state st (needs to be obtained or specified from the actual environment)

[0368] current_state = {}

[0369] # ε-greedy strategy selects action (correction factor α(k)) function

[0370] def epsilon_greedy_policy(state, Q, epsilon):

[0371] if np.random.rand() <epsilon:

[0372] # Randomly select an action with probability ε

[0373] return np.random.randint(num_actions)

[0374] else:

[0375] # Otherwise choose the action with the largest Q value

[0376] return np.argmax(Q[state, :])

[0377] # Execute step S203 to obtain the correction factor α(k)

[0378] def get_correction_factor(current_state, Q, epsilon):

[0379] # Use the ε-greedy strategy to select actions (correction factor)

[0380] chosen_action = epsilon_greedy_policy(current_state, Q, epsilon)

[0381] # Assume that the action space (the value of the correction factor α(k)) is predefined and mapped to [0.1, 0.3, 0.5, 0.7, 0.9]

[0382] correction_factors = [0.1, 0.3, 0.5, 0.7, 0.9]

[0383] return correction_factors[chosen_action]

[0384] # The process of selecting the correction factor once

[0385] # The Q value table is obtained and updated from step S202

[0386] # Q = ... (Use the Q value updated in step S202)

[0387] correction_factor = get_correction_factor(current_state, Q, epsilon)

[0388] print(f"Selected correction factor α(k): {correction_factor}")

[0389] In the above program, the size of the state space and action space (i.e., the possible values ​​of the correction factor) is first set. At the same time, the updated Q value table is obtained from step S202, and the ε value in the ε-greedy policy is set. The epsilon_greedy_policy function implements the ε-greedy policy. It accepts the current state, the Q value table, and the ε value as input, and returns an action index. This action index corresponds to the selected correction factor. If the random number is less than ε, an action is randomly selected; otherwise, the action with the largest Q value in the current state is selected. The get_correction_factor function is the core of step S203. It calls the epsilon_greedy_policy function to select the action (i.e., the index of the correction factor), and then returns the corresponding correction factor value according to the predefined correction factor list. This list should be set according to the possible values ​​of the correction factor in the actual application. In the simulation part, the updated Q value table is obtained from step S202, and the get_correction_factor function is called to select the correction factor. Finally, the selected correction factor value is printed out.

[0390] In this embodiment, regarding step S3, a PID controller is executed: a discretized PID controller is introduced to control the hydraulic servo system, and the electrical signal of the hydraulic servo system is dynamically scaled based on the obtained correction factor α(k):

[0391] ;

[0392] Where u(k) is the controller output (electrical signal) at sampling time k. e(k) is the deviation at sampling time k. e(k-1) is the deviation at sampling time k-1. e(j) represents the deviation value at sampling time j. r(j) is the set value (expected value) at sampling time j, and y(j) is the actual value at the same sampling time. The deviation value e(j) is defined as ; K p , K i and K d are the gains of the proportional, integral and derivative controllers respectively.

[0393] Where u(k) represents the controller output electrical signal at sampling time k. e(k) is the deviation at sampling time k, which represents the difference between the set value (expected value) r(k) and the actual value y(k), that is, e(k) = r(k) - y(k). Similarly, e(k-1) is the deviation at sampling time k-1, and e(j) represents the deviation at any sampling time j.

[0394] The three main parts of a PID controller are proportional (P), integral (I), and derivative (D) control, which are controlled by K p , K i and K d There are three gain parameters to adjust. Proportional control is used to reduce the current deviation, integral control is used to eliminate the accumulated deviation in the past, and derivative control is used to predict and reduce the deviation in the future.

[0395] It can be understood that the controller output u(k) here is dynamically scaled by the correction factor α(k). This correction factor α(k) is based on the output of the fuzzy logic control system of step S1, which takes into account the dynamic changes of the wall thickness deviation Δw and the pressure F to generate a fuzzy value α(k)'. In addition, the correction factor α(k) is also combined with the output of the reinforcement learning strategy for processing efficiency in step S2. In this way, the correction factor α(k) can take into account both processing efficiency and processing accuracy; it can adjust the output of the PID controller according to the real-time wall thickness deviation and pressure, so that the rotary wheel can adaptively adjust the pressure. This can not only reduce the possibility of cracks, slag inclusions and bubbles on the inner wall of the cylinder, but also optimize the stress concentration phenomenon at the landing part and transition section of the cylinder.

[0396] Furthermore, the Python execution program of step S3 is as follows:

[0397] import serial

[0398] import time

[0399] # Initialize serial communication

[0400] serial_port = serial.Serial('COM1', 9600, timeout=1) # COM1 port

[0401] #PID controller parameters

[0402] Kp = 1.0

[0403] Ki = 0.1

[0404] Kd = 0.01

[0405] # Initialize PID variables

[0406] previous_error = 0

[0407] integral = 0

[0408] # Input correction factor α(k)

[0409] alpha_k = {...}

[0410] def pid_controller(setpoint, process_variable, k):

[0411] global previous_error, integral

[0412] error = setpoint - process_variable

[0413] derivative = error - previous_error

[0414] integral += error

[0415] u_k = alpha_k * (Kp * error + Ki * integral + Kd * derivative)

[0416] previous_error = error

[0417] return u_k

[0418] # Main loop

[0419] for k in range(100): # Perform 100 control loops

[0420] # Get the actual value from the hydraulic system sensor (process_variable)

[0421] process_variable = k / {...}

[0422] # Set the target value (setpoint)

[0423] setpoint = {...}

[0424] # Calculate the output u(k) of the PID controller

[0425] u_k = pid_controller(setpoint, process_variable, k)

[0426] # Send u(k) to the PLC controller through the serial port

[0427] message = f"U{u_k:.2f}\n" # Format the message, keep two decimal places

[0428] serial_port.write(message.encode()) # Send electrical signal u(k) to PLC

[0429] #Simulation control cycle delay

[0430] time.sleep(0.1)

[0431] # Close serial communication

[0432] serial_port.close()

[0433] In the above program, Python's serial library is first used to initialize serial communication. The COM1 port is used, and the baud rate is set to 9600. The proportional (Kp), integral (Ki), and differential (Kd) gain parameters of the PID controller are set. Then the global variables used for PID calculation are initialized, including the previous error (previous_error) and the integral of the error (integral). The pid_controller function calculates the output u(k) of the PID controller based on the setpoint (setpoint), the actual value (process_variable), and the current time (k). This function uses global variables to track the previous error and the integral of the error.

[0434] 100 control loops (adjustable) are performed in the main loop. In each loop, the actual value is obtained from a sensor or other means, and a target value is set. Then, the pid_controller function is called to calculate the output u(k) of the PID controller. At the same time, the correction factor α(k) is updated in each control loop;

[0435] After calculating u(k), it is formatted into a string message and sent to the PLC controller through the serial port. This message starts with "U" followed by the value of u(k), with two decimal places. After receiving this message, the PLC can control the action of the hydraulic system (hydraulic cylinder) according to the value of u(k). A delay of one control cycle is simulated after each control cycle to simulate the control cycle in the actual system.

[0436] Embodiment 2: Based on the technical solution of embodiment 1, this embodiment further discloses a fuzzy rule base. The fuzzy inference engine of step S101 uses a series of IF-THEN rules, but these rules are all encapsulated in the fuzzy rule base. In this embodiment, the fuzzy rule base includes the following rules (R i ):

[0437] (Rule 1) If the wall thickness deviation is small and the applied pressure is small, then the correction factor α(k) should be small.

[0438] Principle: When the wall thickness deviation and the applied pressure are both very small, it indicates that the current position control of the rotary wheel is already quite accurate and the applied pressure is also small. In this case, the system only needs to be fine-tuned to maintain its accuracy, so the correction factor should be set to a small value.

[0439] (Rule 2) If the wall thickness deviation is small and the applied pressure is moderate, the correction factor α(k) should be small.

[0440] Principle: Even if the pressure is moderate, the position control is still relatively accurate because the wall thickness deviation is very small. In order to avoid new problems caused by overcorrection, the correction factor should be kept small.

[0441] (Rule 3) If the wall thickness deviation is small and the applied pressure is large, the correction factor α(k) should be medium.

[0442] Principle: When the wall thickness deviation is small, if the pressure is too high, it may cause unnecessary deformation. Therefore, it is necessary to increase the correction amount appropriately to offset the impact caused by excessive pressure, but still avoid over-adjustment, so the correction factor is set to medium.

[0443] (Rule 4) If the wall thickness deviation is moderate and the applied pressure is small, the correction factor α(k) should be medium.

[0444] Principle: Moderate wall thickness deviation indicates that a certain amount of adjustment is needed to achieve more precise control. Since the applied pressure is small, it may not be enough to cause significant deformation, so a moderate correction amount is needed to ensure the accuracy of the adjustment.

[0445] (Rule 5) If the wall thickness deviation is moderate and the applied pressure is moderate, then the correction factor α(k) should be medium.

[0446] Principle: When the wall thickness deviation and pressure are moderate, a moderate correction amount can be used to smoothly and effectively adjust the position, which is neither too aggressive nor too conservative.

[0447] (Rule 6) If the wall thickness deviation is moderate and the applied pressure is large, then the correction factor α(k) should be large.

[0448] Principle: A larger pressure may cause a larger deformation, so a larger correction amount is needed to ensure the accuracy of the rotating wheel position and prevent position deviation caused by excessive pressure.

[0449] (Rule 7) If the wall thickness deviation is large and the applied pressure is small, then the correction factor α(k) should be large.

[0450] Principle: When the wall thickness deviation is large, even if the pressure is small, a large correction amount is required to quickly reduce the deviation and return the rotary wheel position to the correct track as soon as possible.

[0451] (Rule 8) If the wall thickness deviation is large and the applied pressure is moderate, then the correction factor α(k) should be large.

[0452] Principle: When the wall thickness deviation is large and the pressure is moderate, a larger correction amount is required to quickly correct the deviation.

[0453] (Rule 9) If the wall thickness deviation is very large and the application pressure is very high, then the correction factor α(k) should be large or extremely large.

[0454] Principle: In the extreme case where both the wall thickness deviation and the application pressure are very large, a very large correction amount is required to quickly correct the position deviation. This situation may indicate serious problems in the production process and may even require emergency measures to prevent further problems.

[0455] In this embodiment, terms such as "very small" and "very large" are defined based on the membership function in Embodiment 1. However, for different interval divisions, this embodiment provides a standardized method for reference. Taking "very small" and "extremely large" as examples:

[0456] 1) Very small: A left-descending membership function is used to represent "very small", such as a down-half trapezoidal or down-half ridge-shaped function. Let x represent the input value (wall thickness deviation or application pressure), and a and b be the parameters defining the "very small" range. Then the membership function μ VS (x) can be expressed as:

[0457] ;

[0458] where b < a, b is the lower bound of the "very small" range, and a is the upper bound. When x is less than or equal to a, the membership degree is calculated according to the function; when x is greater than a, x does not belong to the fuzzy set of "very small" at all.

[0459] 2) "Extremely large" can be represented by a membership function similar to that of "very large", but with a narrower range, indicating that only very large values belong to this fuzzy set. Its membership function μ EL(x) is expressed as:

[0460] ;

[0461] where g < f, g is the lower bound of the "extremely large" range, and f is the upper bound.

[0462] Furthermore, the Python execution program of the fuzzy rule base disclosed in this embodiment is as follows:

[0463] import numpy as np

[0464] import skfuzzy as fuzz

[0465] from skfuzzy import control as ctrl

[0466] # Define the universe of discourse of the input and output

[0467] wall_thickness_deviation = ctrl.Antecedent(np.arange(0, 101, 1), 'wall_thickness_deviation')

[0468] applied_pressure = ctrl.Antecedent(np.arange(0, 101, 1), 'applied_pressure')

[0469] correction_factor = ctrl.Consequent(np.arange(0, 101, 1), 'correction_factor')

[0470] # Define fuzzy sets and their membership functions for input and output

[0471] wall_thickness_deviation.automf(3, names=['small', 'medium', 'large'])

[0472] applied_pressure.automf(3, names=['small', 'medium', 'large'])

[0473] correction_factor['small'] = fuzz.trimf(correction_factor.universe,[0, 0, 50])

[0474] correction_factor['medium'] = fuzz.trimf(correction_factor.universe,[25, 50, 75])

[0475] correction_factor['large'] = fuzz.trimf(correction_factor.universe,[50, 100, 100])

[0476] # Define fuzzy rules

[0477] rule1 = ctrl.Rule(wall_thickness_deviation['small']&applied_pressure['small'], correction_factor['small'])

[0478] rule2 = ctrl.Rule(wall_thickness_deviation['small']&applied_pressure['medium'], correction_factor['small'])

[0479] rule3 = ctrl.Rule(wall_thickness_deviation['small']&applied_pressure['large'], correction_factor['medium'])

[0480] rule4 = ctrl.Rule(wall_thickness_deviation['medium']&applied_pressure['small'], correction_factor['medium'])

[0481] rule5 = ctrl.Rule(wall_thickness_deviation['medium']&applied_pressure['medium'], correction_factor['medium'])

[0482] rule6 = ctrl.Rule(wall_thickness_deviation['medium']&applied_pressure['large'], correction_factor['large'])

[0483] rule7 = ctrl.Rule(wall_thickness_deviation['large']&applied_pressure['small'], correction_factor['large'])

[0484] rule8 = ctrl.Rule(wall_thickness_deviation['large']&applied_pressure['medium'], correction_factor['large'])

[0485] rule9 = ctrl.Rule(wall_thickness_deviation['large']&applied_pressure['large'], correction_factor['large'])

[0486] # Create a control system and add rules

[0487] control_system = ctrl.ControlSystem([rule1, rule2, rule3, rule4,rule5, rule6, rule7, rule8, rule9])

[0488] simulator = ctrl.ControlSystemSimulation(control_system)

[0489] # Main program (inference)

[0490] simulator.input['wall_thickness_deviation'] = 65 # Input: moderate wall thickness deviation

[0491] simulator.input['applied_pressure'] = 75 # Input: Larger applied pressure

[0492] simulator.compute()

[0493] print(simulator.output['correction_factor'])

[0494] The skfuzzy library (an extension of scipy.fuzzy or fuzzy-c-means) is used in the above program to build a fuzzy rule base. The principle is that the domain (i.e. the possible value range, using an integer range of 0 to 100) is defined for wall thickness deviation, pressure and correction factor. Then fuzzy sets are defined for each input and output. Three fuzzy sets (small, medium and large) are automatically created using the automf method, and the membership functions of the three fuzzy sets (small, medium and large) are manually defined for the correction factor. Fuzzy rules are created using ctrl.Rule based on the provided rules. These rules determine the fuzzy set of the output (correction factor) based on the fuzzy set of the input (wall thickness deviation and pressure). All rules are then added to a control system, and a simulator is created to run the control system.

[0495] The main program demonstrates that the simulator provides input values ​​(wall thickness deviation of 65 and pressure of 75) and calculates the output (correction factor). This output is a fuzzy set, which represents the distribution of possible values ​​of the correction factor under given input.

[0496] Example 3: Please refer to Figure 1 Based on the first embodiment, this embodiment further discloses the specific implementation of the SARSA algorithm and its ε-greedy strategy in step S202. It includes the following steps S2020~S2022.

[0497] In this embodiment, regarding step S2020, combined with fuzzy logic control: the SARSA algorithm considers the fuzzy value α(k)′ output by the fuzzy logic control and the efficiency state of the current hydraulic servo system when selecting the action to be actually performed. This process can be expressed as selecting an action a t , the action is based on the current state s t and the fuzzy value α(k)′, and the value function Q(s t ,a). Action a t Choose to use the ε-greedy strategy:

[0498] ;

[0499] in, is a small positive number, indicating the probability of exploration. In practical applications, the fuzzy value α(k)′ is used as the action a t A reference or weight for selection. a is a specific value of the correction factor α(k), which is selected by the agent based on the current state and environmental feedback. t ,a) The initialization expression is as follows:

[0500] ;

[0501] Among them, the symbol stands for "for all"; S is the state space and A is the action space. At the beginning, for all state-action pairs, their expected rewards are assumed to be 0, and these values ​​are gradually learned and adjusted as the algorithm runs.

[0502] It should be noted that the state s t Including the current closing efficiency E current , the real-time value of wall thickness deviation d and the real-time value of applied pressure f are a vector or a data structure.

[0503] It should be noted that action a t , is the agent according to the current state s t A behavior or decision selected. In the control system of the cylinder closing machine, action a t represents a specific control instruction for the hydraulic servo system, such as the electrical signal u(k-1) output by step S3 at the previous time k-1; action a t The choice of is based on the current state st and the value function Q(st,a), with the goal of maximizing the long-term cumulative reward. Under the ε-greedy strategy, most of the time the action with the highest Q value (that is, the action currently considered optimal) is chosen, but there is also a certain probability ϵ to randomly select an action to explore possible better options.

[0504] More specifically, when choosing actions, the agent adopts an ε-greedy strategy that balances exploration and exploitation. With a probability of , the agent will choose the action with the highest Q value in the current state, that is, the action that it believes can bring the largest long-term cumulative reward. This is to use the knowledge that the agent has learned in order to obtain the maximum reward. However, in order to avoid falling into the local optimal solution, the agent will also This randomness gives the agent the opportunity to explore actions that may not be optimal under the current knowledge system, but may actually bring greater rewards. In this way, the agent can continuously expand its knowledge boundaries and discover better strategies.

[0505] Preferably, in practical applications, the selected action a t is the electrical signal u(k-1) output by step S3 at the previous time k-1, which represents the adjustment amount of the correction factor α(k). This adjustment amount is then used to control certain parameters of the hydraulic servo system, such as the pressure of the rotary wheel, to optimize the closing efficiency. In this way, the hydraulic system can dynamically adjust the pressure of the rotary wheel according to the real-time processing conditions and wall thickness deviation, thereby realizing adaptive intelligent control.

[0506] In this embodiment, regarding step S2021, executing the action and observing the reward: In the hydraulic servo position control system of the cylinder closing machine, step S2021 is to execute the action selected by the SARSA algorithm and observe the resulting reward and new system state. Specifically, when the system selects an action a according to the SARSA algorithm t (i.e., adjusting the correction factor α(k)), the action will be executed immediately. The execution of the action is equivalent to step S3 being activated, and then adjusting the hydraulic servo system and its pressure to adapt to the current wall thickness deviation. After the action is executed, the system will observe and record two key information: the new reward factor r′ and the new hydraulic servo system efficiency state st+1. The reward factor r′ is the direct feedback of the environment to the execution of the action (derived based on the form of step S201) and is used to evaluate the action a t (i.e., adjusting the correction factor α(k)) (based on the evaluation of production efficiency).

[0507] If the system efficiency is improved, the wall thickness deviation is reduced, or the quality of the cylinder is improved after the action is performed, the reward factor r' will be positive; on the contrary, if the action causes the system performance to deteriorate or problems to occur, the reward factor r' will be negative. The new state st+1 reflects the new situation after the system performs the action, including the pressure applied by the hydraulic servo system.

[0508] In this embodiment, regarding step S2022, the reinforcement learning algorithm is updated: after observing the new reward factor r′ and the new state st+1 Then, step S2022 is entered to update the value function Q(s) in the SARSA algorithm. t ,a). Value function Q(s t ,a) plays a central role in reinforcement learning, estimating the long-term cumulative reward that can be obtained by performing action a in a given state s:

[0509] ;

[0510] Where: η is the learning rate, which is an interval value between [0,1], and controls the step size of the value function update. The larger the learning rate, the greater the adjustment of the value function at each update, and the learning speed may be faster, but it may also lead to an unstable learning process; the smaller the learning rate, the smaller the update amplitude, the more stable the learning process, but it may take more learning time. Therefore, the assignment of η needs to be subjectively assigned based on the subjective initiative of technical personnel in this field.

[0511] γ is a discount factor, which is a value between [0,1] and is used to weigh the importance of future rewards. The closer the discount factor is to 1, the more the system values ​​future rewards; the closer the discount factor is to 0, the more the system focuses on current immediate rewards. Therefore, the value of γ needs to be assigned subjectively based on the subjective initiative of technicians in this field.

[0512] a t+1 is in the new state s t+1 The next action is selected according to the value function and possible ε-greedy strategy. This action selection process is similar to the action selection process described in step S2020, aiming to maximize the long-term cumulative reward.

[0513] Q(s t ,a)' is the updated value function, which will be used to guide the system to make smarter decisions in the future.

[0514] Furthermore, the Python execution program of this embodiment is as follows:

[0515] import numpy as np

[0516] # Call the discrete values ​​of state space and action space

[0517] num_states = 10 # state space

[0518] num_actions = 5 # Action space

[0519] # Initialize the value function Q(s, a)

[0520] Q = np.zeros((num_states, num_actions))

[0521] # SARSA algorithm parameters

[0522] learning_rate = 0.1 # learning rate η

[0523] discount_factor = 0.9 # discount factor γ

[0524] epsilon = 0.1 # ε in the ε-greedy strategy

[0525] # Current state st and action at

[0526] current_state = 0 # Example initial state

[0527] current_action = np.argmax(Q[current_state, :]) # Select the initial action, which is simplified to select the action with the largest Q value

[0528] # Environment feedback function, returns new state and reward

[0529] def step(current_state, current_action):

[0530] new_state = (current_state + 1) % num_states # state transfer

[0531] reward = 1 if new_state == 0 else 0 # Reward function

[0532] return new_state, reward

[0533] # ε-greedy strategy selects actions

[0534] def epsilon_greedy_policy(state, epsilon):

[0535] if np.random.rand() <epsilon:

[0536] return np.random.randint(num_actions) # Randomly select actions with probability ε

[0537] else:

[0538] return np.argmax(Q[state, :]) # Otherwise select the action with the largest Q value

[0539] # SARSA update process

[0540] def sarsa_update(current_state, current_action, new_state, reward):

[0541] # Choose the next action according to the ε-greedy strategy in the new state

[0542] next_action = epsilon_greedy_policy(new_state, epsilon)

[0543] # Update value function Q(s, a)

[0544] Q[current_state, current_action] += learning_rate * (reward +discount_factor * Q[new_state, next_action]- Q[current_state, current_action])

[0545] return next_action

[0546] # A SARSA learning process

[0547] new_state, reward = step(current_state, current_action)

[0548] next_action = sarsa_update(current_state, current_action, new_state,reward)

[0549] # Update the current state and action to prepare for the next iteration

[0550] current_state = new_state

[0551] current_action = next_action

[0552] # Output the updated value function Q(s, a) and form a Q value table

[0553] print("Updated Q-value function:")

[0554] print(Q)

[0555] In the above program, the initialization value function Q is an all-zero matrix whose size is determined by the size of the state space and action space. The learning rate, discount factor and ε value of the SARSA algorithm and the ε value in the ε-greedy policy are also set. The step function simulates the environment's response to the action and returns a new state and reward. The epsilon_greedy_policy function implements the ε-greedy policy, randomly selecting an action with a probability of ε, otherwise selecting the action with the largest Q value in the current state.

[0556] The sarsa_update function performs the update step of the SARSA algorithm. It updates the Q value of the current state and action based on the new state, reward, and next action. The update formula is the core of the SARSA algorithm, which combines the immediate reward and the estimate of the future reward to adjust the Q value.

[0557] In one part of the SARSA learning process, we perform an action, observe the feedback from the environment, and update the value function using the SARSA update rule. Then, we update the current state and action to prepare for the next iteration. Finally, we output the updated value function Q, which now contains the new knowledge that the system has learned through one SARSA learning. In practical applications, this learning process will be repeated until the value function converges or a predetermined number of learning rounds is reached.

[0558] Test example:

[0559] 1. Purpose of the experiment:

[0560] The purpose of this example is to verify the advantages of introducing a rotary wheel hydraulic servo position control system into the sealing machine in the cylinder processing process, compare it with the traditional control method (control group), and evaluate the impact of the new control method on the stress distribution of the cylinder.

[0561] (II) Test equipment and methods:

[0562] 2.1 Experimental group equipment:

[0563] Automatic spinning TH12001-40R closing machine, equipped with a hydraulic servo position control system for the spinning wheel.

[0564] The rotary wheel hydraulic servo position control system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory. When the program instructions are executed by the processor, the processor executes the rotary wheel hydraulic servo position control method (S1~S3) as described above. After the correction factor α(k) is generated, the PLC controller reads it and controls the rotary wheel hydraulic servo system of the automatic spinning TH12001-40R closing machine.

[0565] The hydraulic system performs pressure simulation through the Autodesk Inventor assembly environment.

[0566] A Siemens S7-200 CPU 226 PLC controller was used to implement the PID controller algorithm and the correction factor α(k).

[0567] 2.2 Control group equipment:

[0568] The same model of automatic spinning TH12001-40R closing machine adopts conventional PLC timing diagram programming control.

[0569] 2.3 Simulation environment:

[0570] Use the assembly environment of Autodesk Inventor to simulate the hydraulic system execution process.

[0571] The stress was simulated using the finite element analysis module of Autodesk Inventor.

[0572] Communication is established with Autodesk Inventor via Siemens S7-200 CPU 226 PLC.

[0573] 2.4 Test materials:

[0574] The 347 stainless steel cylinder has a diameter of 500 mm and a height of 2000 mm, a wall thickness of 15 mm, a longitudinal protrusion diameter of 80 mm and a thickness of 28 mm. The remaining parameters are shown in Table 1;

[0575] Table 1. Material parameters

[0576]

[0577] (III) Experimental content and steps:

[0578] 3.1 Preparation stage:

[0579] Set the closing machine parameters for the experimental group and the control group.

[0580] Create a cylinder model in Autodesk Inventor and set the material properties.

[0581] 3.2 Execution phase:

[0582] Experimental group: The rotary wheel hydraulic servo position control method was executed through the PID instruction function block of the PLC controller, and the correction factor α(k) was applied.

[0583] Control group: The closing machine was controlled according to the conventional PLC timing diagram.

[0584] The processing of two sets of closing machines is simulated in the simulation environment until the processing of the cylinder is completed.

[0585] 3.3 Analysis phase:

[0586] The finite element analysis module of Autodesk Inventor is used to perform stress simulation analysis on the processed steel cylinder.

[0587] The overall stress, ground contact stress and transition section stress of the cylinders in the experimental group and the control group were compared.

[0588] 3.3.1 Landing location setting:

[0589] Determine the exact location of the cylinder contact point, that is, the area where the bottom of the cylinder contacts the ground.

[0590] A vertical downward pressure is applied to the area to simulate the stress conditions when the cylinder is placed.

[0591] Set boundary conditions to limit the displacement of the bottom of the cylinder.

[0592] 3.3.2 Transition section setting:

[0593] Determine the specific position of the transition section of the cylinder. Apply corresponding rigid body constraints to the transition section to simulate the stress conditions in the actual processing process.

[0594] 3.3.3 Pressure parameters:

[0595] 3.3.4 Common parameters of experimental group and control group:

[0596] Simulated cylinder internal pressure: set to 15MPa to simulate the internal pressure of the cylinder when it is working normally.

[0597] Simulated surface stress: 55Mpa;

[0598] Simulated internal stress: 12~15Mp;

[0599] Set the allowable tensile strength: set according to the range of GB713-2014;

[0600] (IV) Test results:

[0601] 4.1 Overall stress comparison:

[0602] The overall stress distribution of the cylinders in the experimental group was significantly better than that in the control group, showing more uniform stress distribution and lower stress concentration. Figure 4 As shown, (a) and (c) are control groups, and (b) and (d) are experimental groups.

[0603] 4.2 Stress comparison of landing part:

[0604] At the landing site of the cylinder, the stress in the experimental group was significantly lower than that in the control group, indicating that the new control method effectively reduced the stress concentration in this area. Figure 5 As shown, (a) is the control group and (b) is the experimental group. It should be pointed out that Figure 5 In part (b), the stress of the wall structure is because this part is set as a fixed point in the software for simulation, and the structure of this part is half-cut for clear display, so in reality this stress point does not exist.

[0605] 4.3 Stress comparison of transition section:

[0606] In the transition section of the cylinder, the stress distribution of the experimental group is also better than that of the control group, showing a relatively smoother transition and a lower stress peak. Figure 6 As shown, (a) is the control group and (b) is the experimental group.

[0607] Note: "Landing area" and "Transition area" can be combined Figure 2 See together.

[0608] V. Conclusion:

[0609] This example verifies the effectiveness of the rotary wheel hydraulic servo position control method in the processing of the steel cylinder closing machine. By introducing this control system, the experimental group of steel cylinders showed significantly better overall stress, stress at the grounding part, and stress at the transition section than the control group with the traditional control method. This result proves the significant effect of the new control method in improving the processing quality of steel cylinders and reducing stress concentration, and provides strong support for process improvement in the steel cylinder manufacturing industry.

[0610] All the above embodiments only express the implementation methods of the relevant practical applications of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.

[0611] For those skilled in the art, it can be further appreciated that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

Claims

1. A method for controlling the position of a rotary wheel hydraulic servo for a steel cylinder closing machine, characterized in that: Follow these steps: S1, read the fuzzy logic control system: select the wall thickness deviation Δ w and the pressure F as the input variables of fuzzy logic control; read the fuzzy set and fuzzy rules to infer the fuzzy value α(k)'; S2, executing the reinforcement learning algorithm: reading the set state space and action space, and then maximizing the closing efficiency through the reward function, treating the fuzzy value α(k)' as an action of the reinforcement learning algorithm, the reinforcement learning algorithm dynamically outputs the correction factor α(k), and observing the reward obtained after executing the action; S3, executing the PID controller: introducing a discretized PID controller to control the hydraulic servo system, and dynamically scaling the electrical signal of the hydraulic servo system based on the obtained correction factor α(k).

2. The servo position control method according to claim 1, characterized in that: In S1, the wall thickness deviation Δ w and the pressure force F both have the fuzzy set, the fuzzy set includes three levels of "small S", "medium M" and "large L", and each of the fuzzy sets is specified by a membership function.

3. The servo position control method according to claim 1, characterized in that: In S1, the fuzzy rule is established by a fuzzy rule base, and the inference is performed by a fuzzy inference engine; the two work together to determine the input wall thickness deviation Δ w and the real-time value of the applied pressure F, the fuzzy set FS of the fuzzy value α(k)' of the correction factor α(k) is inferred; wherein for each rule R i : ; Among them, μ Ai (Δ w ), μ Bi (F) and μ Ci (α(k)') are the input Δ w , F and the output α(k)' correspond to the membership function of the fuzzy set; The fuzzy inference engine outputs the fuzzy set FS of the fuzzy value α(k)′ by a weighted average aggregation method according to the activation degree of all the fuzzy rules.

4. The servo position control method according to claim 3, characterized in that: In S1, the fuzzy set FS is defuzzified to obtain the fuzzy value α(k)': ; Among them, μ F (x) represents the membership function of the fuzzy set FS, and a and b represent the domain of the fuzzy set.

5. The servo position control method according to claim 1, characterized in that: In S2, the state space and the action space are realized by the following steps: S200, state space S: including the real-time value of wall thickness deviation d and the real-time value of applied pressure f: ; Action space A: defined as the range of values ​​of the correction factor α(k): A = {α1(k), α2(k),...,α n (k)}; Where D is the range of all values ​​of wall thickness deviation, F is the set of all values ​​of applied pressure; α i (k) is the ith discrete value taken by the correction factor α(k) at the kth moment, and n is the total number of discrete values.

6. The servo position control method according to claim 5, characterized in that: In S2, the reward function is implemented by the following steps: S201, execute the reward factor r as a positive or negative reward mechanism: ; Where ΔE is the change in closing efficiency.

7. The servo position control method according to claim 5, characterized in that: In S2, the reinforcement learning algorithm is a SARSA algorithm; the SARSA algorithm executes the introduction, the action and the observation in S2 through the following three steps respectively: S2020, combined with fuzzy logic control: Based on the ε-greedy strategy, a t and the fuzzy value α(k)′, and the value function Q(s t ,a) The resulting action a t : ; in, is the probability of exploration; the fuzzy value α(k)′ is the action a t A weight is selected; a is a specific value of the correction factor α(k); S2021, perform actions and observe rewards: according to the selected action a t Adjust the correction factor α(k) to perform the selected action a t After that, observe the new reward factor r′ and the new hydraulic servo system efficiency state s t+1 ; S2022, updating the reinforcement learning algorithm: according to the new reward factor r′ and the state s t+1 , update the value function Q(s t ,a): ; Where: η is the learning rate, which controls the step size of the update; γ is the discount factor; a t+1 Is in the new state st+1 The next action selected according to the value function and the ε-greedy strategy; Q(s t ,a)' is the updated value function.

8. The servo position control method according to claim 7, characterized in that: In S2, the output is achieved through the following steps: S203, obtaining a correction factor α(k): 。 9. The servo position control method according to any one of claims 1 to 8, characterized in that: In S3, the discretized PID controller is: ; Where u(k) is the controller output at sampling time k; e(k) is the deviation at sampling time k; e(k-1) is the deviation at sampling time k-1; e(j) represents the deviation value at sampling time j; r(j) is the set value at sampling time j, and y(j) is the actual value at the same sampling time j; ; K p , K i and K d are the gains of the proportional, integral and derivative controllers respectively.

10. A rotary wheel hydraulic servo position control system for a steel cylinder closing machine, characterized in that: The system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory. When the program instructions are executed by the processor, the processor executes the servo position control method as described in any one of claims 1 to 9. After the correction factor α(k) is generated, it is read by a PLC controller and the rotary wheel hydraulic servo system is controlled.