PLC control method and system based on fuzzy control
By combining fuzzy control and convolutional neural network, the efficient control of PLC system in complex industrial processes is achieved, which solves the problem that traditional PLC control methods are difficult to cope with nonlinear and time-varying systems, and improves control accuracy and stability.
Patent Information
- Application Number
- CN202510013555.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing PLC control methods are difficult to effectively deal with the nonlinear and time-varying characteristics of systems in complex industrial processes, especially when system models are difficult to obtain.
The PLC control method based on fuzzy control and convolutional neural network is adopted to process the complexity of nonlinear systems through fuzzy control, and the convolutional neural network is used to automatically learn and optimize fuzzy control parameters to achieve dynamic online adjustment.
It improves the control accuracy and stability of the PLC system, can adaptively handle complex, nonlinear, time-varying control systems, reduces system oscillation, and expands the application range of fuzzy control.
Smart Images

Figure CN119882584A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of PLC control, and more specifically relates to a PLC control method and system based on fuzzy control. Background Art
[0002] In modern industrial automation systems, programmable logic controllers (PLCs) are widely used to monitor and control various industrial processes in real time, making the production process safer, more efficient, and better able to meet various production needs. However, in practical applications, most control systems have complex nonlinear and time-varying characteristics, which will have a great impact on the control strategy of PLCs. Traditional control methods such as PID control require an accurate estimate of the system model, which is very difficult in practical applications because the acquisition of the system model requires a lot of experiments and debugging, and the model of some systems cannot even be obtained. Therefore, how to design a control method that can effectively deal with the nonlinear and time-varying characteristics of the system is a major challenge currently faced.
[0003] Fuzzy control technology is a powerful nonlinear control strategy that combines human cognitive ability and decision-making level. It does not require an accurate mathematical description of the system model, so it performs better than traditional methods in dealing with complex nonlinear and uncertain system control problems. However, the parameter adjustment of fuzzy control usually depends on the experience and knowledge of experts, which greatly limits the scope and effect of its application. Summary of the invention
[0004] The present invention proposes a PLC control method based on fuzzy control and convolutional neural network. The method makes full use of the advantages of fuzzy control in processing nonlinear systems, and at the same time uses the ability of convolutional neural network to automatically learn and optimize fuzzy control parameters, so as to improve the control performance and control effect of the PLC system.
[0005] In order to achieve the above object, the present invention is implemented by adopting the following technical scheme: the method comprises:
[0006] System analysis and modeling: analyzing the requirements and goals of the control system, determining the variables that need to be controlled and the dynamic characteristics of the system, and establishing a mathematical model of the system;
[0007] Fuzzy controller design, determine the input and output variables of the fuzzy controller, and design the corresponding fuzzy sets and membership functions; define the initial fuzzy rule base;
[0008] Construct a convolutional neural network structure and select a multilayer perceptron to adjust the parameters of the fuzzy controller;
[0009] Fuzzy convolutional neural network integration, integrating the fuzzy controller with the convolutional neural network to form a fuzzy convolutional neural network; the convolutional neural network is responsible for online adjustment of the parameters of the fuzzy controller;
[0010] Use historical data or simulation data to train the fuzzy convolutional neural network, using supervised learning methods to optimize the network weights using known input-output pairs;
[0011] Deploy the validated fuzzy convolutional neural network controller into the PLC system;
[0012] In one approach, the system analysis and modeling for linear systems uses differential equations to describe the dynamic behavior:
[0013]
[0014] in:
[0015] T(t) is the output of the system;
[0016] u(t) is the control input;
[0017] d(t) is the interference;
[0018] τ is the system time constant;
[0019] K is the system gain.
[0020] In one embodiment, the system analysis and modeling adopts a state space model for a multiple-input multiple-output (MIMO) system:
[0021]
[0022] y(t)=Cx(t)+Du(t)
[0023] in:
[0024] is the derivative of the state vector, which represents the change of the system state over time;
[0025] A is the state matrix, describing the dynamic characteristics of the system;
[0026] x(t) is the state vector, which contains the internal state information of the system;
[0027] B is the input matrix, describing how the control input affects the system state;
[0028] u(t) is the control input vector, which represents the control effect on the system;
[0029] E is the disturbance matrix, which describes how external disturbance affects the system state;
[0030] d(t) is the interference vector, representing external interference;
[0031] y(t) is the output vector, which represents the observable output of the system;
[0032] C is the output matrix, describing how the system state affects the output;
[0033] D is the direct transfer matrix, describing how the input directly affects the output.
[0034] In one embodiment, the fuzzy controller design includes:
[0035] Input variable selection, the input variables are E error and ΔE error change rate;
[0036] Output variable selection, the output variable is usually the execution signal of the control system, assuming that the output variable is U;
[0037] Design fuzzy sets and membership functions, define fuzzy sets for each input and output variable; including "negative large", "negative small", "zero", "positive small", "positive large";
[0038] The membership function design adopts the triangular membership function, which is defined as follows:
[0039]
[0040] Where (a, b, c) are the three parameters that define the triangle.
[0041] In one embodiment, the fuzzy controller design further includes defining a fuzzy rule base;
[0042] If E is "positive and large" and ΔE is "positive and small", then U is "negative and large";
[0043] If E is "zero", then U is "zero";
[0044] The rules are expressed as:
[0045] IF E is A i ANDΔE is B j THEN U is C ij
[0046] Among them A i ,B j ,C ij are the fuzzy sets of input and output variables respectively.
[0047] In one embodiment, the fuzzy controller design also includes fuzzy reasoning and decision making:
[0048] Fuzzy reasoning, converting the input precise value into a fuzzy value, determining the membership of the fuzzy set to which it belongs through the membership function, and activating the corresponding fuzzy rule according to the input fuzzy value;
[0049] Fuzzy decision making, combining the activated rules, calculates the comprehensive membership of the output fuzzy set;
[0050] Convert the fuzzy output to an exact value using the centroid method:
[0051]
[0052] where μ C (u) is the membership function of the output fuzzy set.
[0053] In one embodiment, the fuzzy convolutional neural network ensemble includes:
[0054] Parameter mapping: The output of the convolutional neural network is used to adjust the parameters of the membership function. For the triangular membership function, the network outputs Δa, Δb, Δc are used to update the parameters:
[0055] a′=a+Δa, b′=b+Δb, c′=c+Δc
[0056] Fuzzy rule weight adjustment: adjust the fuzzy rule weight w i , network output Δw i
[0057] w i′ =w i +Δw i .
[0058] In one embodiment, the training of the fuzzy convolutional neural network includes:
[0059] The loss function evaluates the difference between the network output and the expected output using mean squared error (MSE):
[0060]
[0061] Select the optimization algorithm Adam to update the network weights;
[0062] The back-propagation algorithm is used to calculate the gradient of the loss function and update the network parameters.
[0063] In one solution, the performance of the PLC system is optimized by training a fuzzy convolutional neural network with historical data to avoid system oscillation and over-adjustment.
[0064] In another aspect, a PLC control system based on fuzzy control, the system is applicable to the method described, the system analysis and modeling module is used to analyze the requirements and objectives of the control system, determine the variables to be controlled and the dynamic properties of the system, and establish a mathematical model of the system;
[0065] The fuzzy controller design module is used to determine the input and output variables of the fuzzy controller, design the corresponding fuzzy sets and membership functions, and define the initial fuzzy rule base;
[0066] A convolutional neural network building module is used to select a multilayer perceptron to adjust the parameters of the fuzzy controller; a convolutional neural network and fuzzy controller integration module integrates the fuzzy controller with the convolutional neural network to form a fuzzy convolutional neural network, which is responsible for online adjustment of the parameters of the fuzzy controller;
[0067] The fuzzy convolutional neural network training module uses historical data or simulation data to train the fuzzy convolutional neural network and optimize the network weights; the PLC system deployment module deploys the verified fuzzy convolutional neural network controller into the PLC system for real-time control. Beneficial effects of the present invention:
[0068] Compared with the traditional PLC control method, this method uses convolutional neural network to dynamically adjust the fuzzy control parameters, and handles the complexity, nonlinearity and time-varying nature of the system in an adaptive manner, so that precise control can be achieved under different working conditions, greatly improving the accuracy of the control system.
[0069] Fuzzy control has good stability and reliability, can effectively resist the influence of system parameter changes and external interference, reduce the system's oscillation amplitude and improve system stability.
[0070] Because the basic idea of fuzzy control is fuzzy logic, there is no need for precise mathematical modeling of the system. Therefore, this method can be widely used in control systems of different types and sizes, expanding the application scope of fuzzy control.
[0071] Through historical data training of fuzzy convolutional neural networks, the performance of the PLC system can be optimized according to various actual needs and situations to better meet actual production needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 is a flow chart of the method of the present invention;
[0073] Figure 2 Design a flow chart for the fuzzy controller of the present invention;
[0074] Figure 3 This is the fuzzy convolutional neural network training process of the present invention. DETAILED DESCRIPTION
[0075] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Typical embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in the present invention. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0076] Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used in the present invention in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Typical embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in the present invention. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0077] The general concept of the present invention is:
[0078] The general idea of the present invention is to combine fuzzy control and convolutional neural network to obtain a PLC control method that is accurate and self-adjusting.
[0079] First, through system analysis and modeling, we understand the needs and goals of the PLC system, determine the variables that the control system needs to control and analyze their dynamic characteristics. Based on this information, we build a mathematical model of the system to facilitate subsequent control design.
[0080] Then, design the fuzzy controller, determine its input and output variables, and design the corresponding fuzzy sets and membership functions. In addition, an initial fuzzy rule base needs to be defined. The design of the fuzzy controller is a key step because it directly affects the performance of the control system.
[0081] Next, the parameters of the fuzzy controller are adjusted with the help of convolutional neural networks.
[0082] Afterwards, the fuzzy controller and the convolutional neural network are integrated to form a fuzzy convolutional neural network. The convolutional neural network is responsible for online adjustment of the parameters of the fuzzy controller to enhance its adaptive performance.
[0083] Next, the fuzzy convolutional neural network is trained using historical data or simulation data. The weights of the network are optimized through supervised learning in order to obtain the desired output.
[0084] Finally, after training and verification, the fuzzy convolutional neural network controller is deployed into the PLC system to control the desired action or state.
[0085] Through this concept, combining the characteristics of fuzzy controller model freedom and strong adaptability with the strong ability of convolutional neural network to extract and optimize complex data features, it can effectively improve the performance of existing PLC control systems, improve control accuracy, and help deal with complex systems containing nonlinear and unstable factors.
[0086] The present invention combines fuzzy control and convolutional neural network and deploys them in PLC, realizing the ability to dynamically adjust the parameters of the fuzzy controller online. Compared with the existing technology, it can control the system more accurately and quickly.
[0087] The fuzzy convolutional neural network used in the present invention can automatically learn and optimize fuzzy control rules, avoiding the trouble of manually setting and adjusting rules, and significantly improving adjustment efficiency and field adaptability. By adjusting the parameters of the fuzzy controller online, the present invention can adapt to complex, nonlinear, and time-varying control systems, and its control performance is significantly better than that of traditional fixed-parameter fuzzy controllers.
[0088] By training the fuzzy convolutional neural network, the performance of the PLC system can be optimized, the system oscillation and over-adjustment can be avoided, and the system can be controlled more accurately and stably compared to existing technologies. After the trained and verified fuzzy convolutional neural network controller is deployed in the PLC system, it can calculate and output according to real-time data for the operation of the control system to meet the predetermined control objectives and performance requirements.
[0089] like Figure 1 As shown, a PLC control method based on fuzzy control includes:
[0090] S1. System analysis and modeling: analyze the requirements and objectives of the control system, determine the variables that need to be controlled and the dynamic characteristics of the system, and establish a mathematical model of the system.
[0091] The system analysis and modeling described above uses differential equations to describe the dynamic behavior of linear systems:
[0092]
[0093] in:
[0094] T(t) is the output of the system;
[0095] u(t) is the control input;
[0096] d(t) is the interference;
[0097] τ is the system time constant;
[0098] K is the system gain.
[0099] In one embodiment, the system analysis and modeling adopts a state space model for a multiple-input multiple-output (MIMO) system:
[0100]
[0101] y(t)=Cx(t)+Du(t)
[0102] in:
[0103] is the derivative of the state vector, which represents the change of the system state over time;
[0104] A is the state matrix, describing the dynamic characteristics of the system;
[0105] x(t) is the state vector, which contains the internal state information of the system;
[0106] B is the input matrix, describing how the control input affects the system state;
[0107] u(t) is the control input vector, which represents the control effect on the system;
[0108] E is the disturbance matrix, which describes how external disturbance affects the system state;
[0109] d(t) is the interference vector, representing external interference;
[0110] y(t) is the output vector, which represents the observable output of the system;
[0111] C is the output matrix, describing how the system state affects the output;
[0112] D is the direct transfer matrix, describing how the input directly affects the output.
[0113] S2. Fuzzy controller design: determine the input and output variables of the fuzzy controller and design the corresponding fuzzy sets and membership functions.
[0114] like Figure 2 As shown, the fuzzy controller design includes:
[0115] S201, input variable selection, the input variables are E error and ΔE error change rate;
[0116] S201, output variable selection, the output variable is usually the execution signal of the control system, assuming that the output variable is U;
[0117] S203, design fuzzy sets and membership functions, and define fuzzy sets for each input and output variable; including "negative large" (NB), "negative small" (NS), "zero" (ZE), "positive small" (PS), and "positive large" (PB);
[0118] The membership function design adopts the triangular membership function, which is defined as follows:
[0119]
[0120] Where (a, b, c) are the three parameters that define the triangle.
[0121] S204, defining a fuzzy rule base;
[0122] If E is "positive large" (PB) and ΔE is "positive small" (PS), then U is "negative large" (NB);
[0123] If E is "zero" (ZE), then U is "zero" (ZE);
[0124] The rules are expressed as:
[0125] IF E is A i ANDΔE is B j THEN U is C ij
[0126] Among them A i ,B j ,C ij are the fuzzy sets of input and output variables respectively.
[0127] S205, Fuzzy reasoning and decision making:
[0128] Fuzzy reasoning, converting the input precise value into a fuzzy value, determining the membership of the fuzzy set to which it belongs through the membership function, and activating the corresponding fuzzy rule according to the input fuzzy value;
[0129] Fuzzy decision making, combining the activated rules, calculates the comprehensive membership of the output fuzzy set;
[0130] Convert the fuzzy output to an exact value using the centroid method:
[0131]
[0132] where μ C (u) is the membership function of the output fuzzy set.
[0133] S3. Construct a convolutional neural network structure and select a multilayer perceptron to adjust the parameters of the fuzzy controller. The convolutional neural network is used to adjust the parameters of the fuzzy controller to improve its adaptive ability and control performance.
[0134] Choosing a neural network architecture
[0135] Multilayer Perceptron (MLP) is used. MLP is suitable for approximating nonlinear relationships and can learn complex input-output mappings.
[0136] Input variable selection, system state variables usually select the system state variables as the input of the convolutional neural network. For example, the input of the temperature control system can be the temperature error E and the error change rate ΔE.
[0137] Output variable selection, fuzzy membership function parameters adjust the membership function parameters (such as the vertex position of the triangle membership function) to optimize the performance of the fuzzy controller. Fuzzy rule weight adjustment to enhance the decision-making ability of the controller.
[0138] Neural network structure design
[0139] In the input layer, the number of nodes is equal to the number of input variables. If the input is E and ΔE, the input layer has two nodes.
[0140] The number of nodes in the hidden layer is determined through experiments. The more nodes there are, the stronger the network's expressive power is, but it also increases the computational complexity.
[0141] Activation function: The commonly used activation function of MLP uses the Gaussian function:
[0142]
[0143] Where c is the center and σ is the width.
[0144] The number of nodes in the output layer is equal to the number of parameters that need to be adjusted, such as the number of membership function parameters or rule weights. The output values are directly used to adjust the parameters of the fuzzy controller.
[0145] S4, fuzzy convolutional neural network integration, integrating the fuzzy controller with the convolutional neural network to form a fuzzy convolutional neural network; the convolutional neural network is responsible for online adjustment of the parameters of the fuzzy controller.
[0146] Fuzzy Neural Network (FNN) combines the advantages of fuzzy logic control and neural network, and dynamically adjusts the parameters of the fuzzy controller through the learning ability of neural network.
[0147] Fuzzy controller part
[0148] Input variables: Select the state variables of the system, such as the temperature error E and the error change rate ΔE.
[0149] Fuzzy Sets and Membership Functions: Define fuzzy sets and their membership functions for input and output variables. Use triangular membership functions:
[0150]
[0151] Where a, b, c are the parameters of the triangle.
[0152] Fuzzy rule base: Define fuzzy rules, such as "if E is positive large and ΔE is positive small, then the output is positive medium."
[0153] Neural network part
[0154] Input layer: receives the state variables E and ΔE of the system.
[0155] Hidden layer: used to learn nonlinear mapping, using activation functions (such as ReLU):
[0156] f(x)=max(0,x)
[0157] Output layer: Outputs the adjusted fuzzy controller parameters, such as membership function parameters a, b, c or fuzzy rule weights.
[0158] Fuzzy Neural Network Ensemble
[0159] Parameter mapping, membership function parameter adjustment: The convolutional neural network output is used to adjust the parameters of the membership function. For the triangular membership function, the network output Δa, Δb, Δc is used to update the parameters:
[0160] a′=a+Δa, b′=b+Δb, c′=c+Δc
[0161] Fuzzy rule weight adjustment: adjust the fuzzy rule weight w i , network output Δw i
[0162] w i′ =w i +Δw i .
[0163] like Figure 3 As shown, S5, the fuzzy convolutional neural network is trained using historical data or simulation data, and a supervised learning method is adopted to optimize the weights of the network using known input-output pairs.
[0164] S501, data collection: collect input and output pairs, and output is the desired fuzzy controller parameter adjustment value.
[0165] S502. Define the loss function: Use the mean square error (MSE) to evaluate the difference between the network output and the expected output:
[0166]
[0167] S503: Select an optimization algorithm (such as Adam) to update the network weights.
[0168] S504, back propagation: Use the back propagation algorithm to calculate the gradient of the loss function and update the network parameters.
[0169] Through these steps, the fuzzy neural network can realize dynamic adjustment of the fuzzy controller and improve the system's adaptability and control performance.
[0170] S6. Deploy the verified fuzzy convolutional neural network controller into the PLC system.
[0171] Install the necessary software environment on the hardware device: In the PLC system, you need to install the environment required to run the fuzzy convolutional neural network, such as the Python environment, the corresponding deep learning library, etc.
[0172] Import the converted model into the PLC hardware device. Most deep learning frameworks, such as TensorFlow and PyTorch, support model export and import functions. Through these functions, the trained fuzzy convolutional neural network model can be imported into the PLC system.
[0173] Configure the data interface between the PLC and the field equipment to ensure that the PLC can read the input data from the sensor and correctly send the control signal of the fuzzy convolutional neural network to the actuator.
[0174] Start the PLC system, run the fuzzy convolutional neural network controller according to the real-time input data, calculate the control signal, and then transmit the control signal to the actuator through the PLC to achieve real-time control.
[0175] During the operation of the system, it is necessary to monitor the operating status of the system and collect operating data. If an abnormality occurs, debugging and optimization can be carried out. At the same time, as the data accumulates, the model can also be continuously learned and optimized online to improve the control effect and performance.
[0176] Example:
[0177] The implementation of the present invention is described by taking the temperature of a heating furnace controlled by PLC as an example. Assuming the temperature of the heating furnace is T, it is hoped that the temperature of the heating furnace reaches a predetermined set value Tset by controlling the power P of the heater.
[0178] System Analysis and Modeling: It is assumed that the dynamic behavior of the heating furnace can be described by a first-order linear differential equation:
[0179]
[0180] Among them, τ is the system time constant, K is the system gain, u(t) represents the power input, and d(t) represents other interferences such as ambient temperature.
[0181] Fuzzy controller design: The input variables are selected as temperature error e=Tset-T and the rate of change of temperature error de / dt, and the output variable is the adjusted heater power P. The fuzzy sets of the designed input and output variables are "negative large" (NB), "negative small" (NS), "zero" (ZE), "positive small" (PS), and "positive large" (PB), and the specific power values and temperature error values are mapped to these five fuzzy sets.
[0182] Constructing the convolutional neural network structure: A three-layer multilayer perceptron (MLP) is selected for modeling. The input layer has 2 nodes, which receive the two inputs of the fuzzy controller: temperature error e and the rate of change of temperature error de / dt; the hidden layer has 10 nodes; the output layer has 15 nodes, corresponding to the adjustment values of the three parameters of the fuzzy controller's 5 inputs and 5 output fuzzy sets.
[0183] Fuzzy convolutional neural network ensemble: The parameters of the fuzzy controller are adjusted online through the output of the network. For example, if the outputs of the first three nodes of the network output layer are d1, d2, and d3, then the three parameters of the corresponding fuzzy set "Negative Big" (NB) will be adjusted according to these values:
[0184]
[0185] Similarly, other parameters of the fuzzy controller can be adjusted.
[0186] Training of fuzzy convolutional neural network: supervised learning method is used to optimize the difference between the actual temperature of the heating furnace and the set value as the training loss. A set of historical data is selected for training, which comes from the operation of the heating furnace under different working conditions, including different set temperatures, ambient temperatures, etc. The training uses the gradient descent method, the learning rate is set to 0.01, and the training is repeated for 1000 cycles. After training, the network can reasonably adjust the parameters of the fuzzy controller so that the actual temperature can reach the set value quickly and accurately.
[0187] The trained fuzzy convolutional neural network controller is deployed to the PLC to complete the real-time control of the heating furnace. This step mainly involves writing the corresponding PLC program and combining it with hardware equipment, so that the fuzzy convolutional neural network can directly control the actual heating equipment.
[0188] A PLC control system based on fuzzy control includes: System analysis and modeling module: The main function of this module is to analyze the needs and objectives of the control system, determine the variables that need to be controlled and the dynamic properties of the system, and establish a mathematical model of the system based on this information to provide a basis for subsequent controller design.
[0189] Fuzzy controller design module: This module is responsible for determining the input and output variables of the fuzzy controller, designing the corresponding fuzzy sets and membership functions, and defining the initial fuzzy rule base. This step realizes the basic structure of the fuzzy controller and provides the system with the conditions for implementing fuzzy logic control.
[0190] Convolutional Neural Network Building Block: This block selects appropriate multilayer perceptrons to adjust the parameters of the fuzzy controller to further optimize the control accuracy of the system.
[0191] Convolutional neural network and fuzzy controller integration module: The function of this module is to combine the fuzzy controller and the convolutional neural network into a whole to form a fuzzy convolutional neural network. Since the convolutional neural network has powerful learning and approximation capabilities, this step can make the fuzzy controller have better regulation performance.
[0192] Fuzzy convolutional neural network training module: This module uses historical data or simulation data to train the fuzzy convolutional neural network and improves the performance and accuracy of the controller by optimizing the network weights.
[0193] PLC system deployment module: Finally, the trained fuzzy convolutional neural network controller will be deployed into the PLC system to achieve precise control of the PLC system and improve the stability and reliability of the PLC system.
[0194] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0195] It should be understood that the detailed description of the technical solutions of the present invention by means of the preferred embodiments is illustrative rather than restrictive. A person skilled in the art may modify the technical solutions described in the embodiments, or replace some of the technical features by equivalents, based on reading the specification of the present invention; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A PLC control method based on fuzzy control, characterized in that: The method includes: System analysis and modeling: analyzing the requirements and goals of the control system, determining the variables that need to be controlled and the dynamic characteristics of the system, and establishing a mathematical model of the system; Fuzzy controller design, determine the input and output variables of the fuzzy controller, and design the corresponding fuzzy sets and membership functions; define the initial fuzzy rule base; Construct a convolutional neural network structure and select a multilayer perceptron to adjust the parameters of the fuzzy controller; Fuzzy convolutional neural network integration, integrating the fuzzy controller with the convolutional neural network to form a fuzzy convolutional neural network; the convolutional neural network is responsible for online adjustment of the parameters of the fuzzy controller; Use historical data or simulation data to train the fuzzy convolutional neural network, using supervised learning methods to optimize the network weights using known input-output pairs; Deploy the validated fuzzy convolutional neural network controller into the PLC system.
2. A PLC control method based on fuzzy control according to claim 1, characterized in that: The system analysis and modeling described above uses differential equations to describe the dynamic behavior of linear systems: in: T(t) is the output of the system; u(t) is the control input; d(t) is the interference; τ is the system time constant; K is the system gain.
3. The PLC control method based on fuzzy control according to claim 1, characterized in that: The system analysis and modeling described above adopts a state-space model for a multiple-input multiple-output (MIMO) system: y(t)=Cx(t)+Du(t) in: is the derivative of the state vector, which represents the change of the system state over time; A is the state matrix, describing the dynamic characteristics of the system; x(t) is the state vector, which contains the internal state information of the system; B is the input matrix, describing how the control input affects the system state; u(t) is the control input vector, which represents the control effect on the system; E is the disturbance matrix, which describes how external disturbance affects the system state; d(t) is the interference vector, representing external interference; y(t) is the output vector, which represents the observable output of the system; C is the output matrix, describing how the system state affects the output; D is the direct transfer matrix, describing how the input directly affects the output.
4. The PLC control method based on fuzzy control according to claim 1, characterized in that: The fuzzy controller design includes: Input variable selection, the input variables are E error and ΔE error change rate; Output variable selection, the output variable is usually the execution signal of the control system, assuming that the output variable is U; Design fuzzy sets and membership functions, and define fuzzy sets for each input and output variable; including "negative large", "negative small", "zero", "positive small", "positive large"; The membership function design adopts the triangular membership function, which is defined as follows: Where (a, b, c) are the three parameters that define the triangle.
5. A PLC control method based on fuzzy control according to claim 4, characterized in that: The fuzzy controller design also includes defining a fuzzy rule base; If E is "positive and large" and ΔE is "positive and small", then U is "negative and large"; If E is "zero", then U is "zero"; The rules are expressed as: IF E is A i ANDΔE is B j THEN U is C ij Among them A i ,B j ,C ij are the fuzzy sets of input and output variables respectively.
6. A PLC control method based on fuzzy control according to claim 4, characterized in that: The fuzzy controller design also includes fuzzy reasoning and decision making: Fuzzy reasoning, converting the input precise value into a fuzzy value, determining the membership of the fuzzy set to which it belongs through the membership function, and activating the corresponding fuzzy rule according to the input fuzzy value; Fuzzy decision making, combining the activated rules, calculates the comprehensive membership of the output fuzzy set; Convert the fuzzy output to an exact value using the centroid method: where μ C (u) is the membership function of the output fuzzy set.
7. The PLC control method based on fuzzy control according to claim 1, characterized in that: The fuzzy convolutional neural network ensemble includes: Parameter mapping: The output of the convolutional neural network is used to adjust the parameters of the membership function. For the triangular membership function, the network outputs Δa, Δb, Δc are used to update the parameters: a′=a+Δa, b′=b+Δb, c′=c+Δc Fuzzy rule weight adjustment: adjust the fuzzy rule weight w i , network output Δw i In i′ =in i +Δw i 。 8. The PLC control method based on fuzzy control according to claim 1, characterized in that: The training of the fuzzy convolutional neural network includes: The loss function evaluates the difference between the network output and the expected output using mean squared error: Select the optimization algorithm Adam to update the network weights; The back-propagation algorithm is used to calculate the gradient of the loss function and update the network parameters.
9. The PLC control method based on fuzzy control according to claim 1, characterized in that: Through historical data training of fuzzy convolutional neural network, the performance of PLC system is optimized to avoid system oscillation and over-adjustment.
10. A PLC control system based on fuzzy control, the system being applicable to the method according to any one of claims 1 to 9, characterized in that: System analysis and modeling module, used to analyze the requirements and objectives of the control system, determine the variables that need to be controlled and the dynamic properties of the system, and establish a mathematical model of the system; The fuzzy controller design module is used to determine the input and output variables of the fuzzy controller, design the corresponding fuzzy sets and membership functions, and define the initial fuzzy rule base; A convolutional neural network building module is used to select a multilayer perceptron to adjust the parameters of the fuzzy controller; a convolutional neural network and fuzzy controller integration module integrates the fuzzy controller with the convolutional neural network to form a fuzzy convolutional neural network, which is responsible for online adjustment of the parameters of the fuzzy controller; Fuzzy convolutional neural network training module, which uses historical data or simulation data to train the fuzzy convolutional neural network and optimize the network weights; PLC system deployment module deploys the verified fuzzy convolutional neural network controller into the PLC system for real-time control.
Citation Information
Patent Citations
Fuzzy control method of bench control system, storage medium and equipment
CN113049259A
Electronic plant air conditioner control method for setting PID parameters based on fuzzy algorithm
CN119247753A
Cited By
Fuzzy control-based video enhanced reasoning method, device and equipment and medium
CN120706584A
Control method for improving action precision of oxygen lance
CN120796626A
Laser power nonlinear control method and system based on fuzzy neural network
CN122362907A