PLC-oriented state space model-based optimization control method and system

Through the optimization control method based on the state space model, the problem that the PLC system cannot achieve system control function expansion and advanced control process optimization is solved, and the rapid response and feedback of the PLC system are achieved, which improves the reliability and stability of the system.

CN119596833AActive Publication Date: 2025-03-11SHANGHAI BIDI-TECH CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411763789.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-11
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

The existing PLC software control methods cannot achieve the expansion of system control functions, cannot improve the implementation and optimization of advanced control processes by PLC systems, and there are limitations in the expansion of control capabilities and optimization directions.

Method used

The optimization control method based on the state space model is adopted to quickly build a state space model optimization control system to realize the system closed-loop control. The method includes obtaining environmental monitoring data, defining state space equations, performing matrix operations, calculating control parameters, and real-time calculation of function blocks by the controller to realize the transmission of action instructions of the controlled object.

Benefits of technology

It realizes rapid response and feedback of PLC systems, improves real-time performance of industrial processes and system reliability and stability, reduces system response time and maintenance costs, and enhances the ability to control advanced processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119596833A_ABST
    Figure CN119596833A_ABST
Patent Text Reader

Abstract

The invention relates to the field of PLC state control, in particular to a PLC-oriented state space model-based optimization control method and system, and the method comprises the steps: (I) obtaining environment monitoring data collected by a PLC control cabinet, and defining a state space equation; (II) the PLC divides and generates an offline block, an online block and a function operation block according to the collected environment monitoring condition; (III) constructing a model according to the environmental monitoring data, and writing a function block at the same time to realize discretization of an environmental state space equation; (IV) initializing the parameters of the controller again, turning on the trigger switch, starting the operation of the controller, and realizing the transmission of the action instruction of the controlled object; and (V) if the controlled object feeds the working data back to the controller, a function block is calculated, working environment parameters are changed, the step (I) is repeated, and a system control closed loop of the PLC is realized. The method has the characteristics that the PLC system is more convenient to control, adjust and maintain, and the operability and the maintenance cost of the system are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of PLC state control, and in particular to a state space model-based optimization control method and system for PLC implementation. Background Art

[0002] PLC is mainly used in non-contact sequential control circuit systems for factory automation. It forms a control system by connecting hardware elements such as relays, timers, and counters, or is used in non-contact timing control to change programs. PLC control has the advantages of fast speed, environmental resistance, easy operation, and good economic benefits. It also includes multiple control elements and can realize programmable real-time control combinations. In order to improve the stability and control capability of PLC, PLC control system or model optimization is an important factor, while the existing PLC software control methods or control systems cannot achieve the expansion of system control functions.

[0003] PLC has been widely used in the field of industrial automation. However, the limited computing power and storage capacity of current PLC make it impossible to use the control logic of PLC itself to realize and optimize higher-level control processes. The mechanical and software defects have greatly limited the application of PLC in current advanced manufacturing and advanced process control. The current PLC system design cannot provide optimized control methods for high-dimensional controlled systems, and can usually only provide PID control for low-dimensional controllers. Therefore, there are limitations in further improving the overall performance of the system and the control dimension.

[0004] Patent document with publication number "CN105103059A" discloses a system and method for implementing model predictive control in PLC. The model predictive control framework is implemented as part of the runtime system functional characteristics of the programmable logic controller system. During the operation of the PLC, the optimal control calculation is performed in the MPC function block. The optimal control function is determined by the MPC block in the engineering tool of the PLC using a system dynamic matrix containing measurements from a unit step response test performed by the PLC. However, this method cannot expand the system control function when executing the software control process, cannot improve the implementation and optimization level of the PLC system for advanced control processes, and cannot improve the control logic and model optimization through software writing.

[0005] Therefore, at present, there are problems such as poor ability to expand PLC control capabilities and high-dimensional optimization of the control process, many limitations in the direction of control optimization, and improvement of the overall system performance. Summary of the invention

[0006] In order to solve the technical problems that the existing PLC software control methods or control systems are unable to expand system control functions and are unable to stably control advanced control processes, the present invention provides a control method based on state space model optimization for PLC implementation, which has the characteristics of realizing system closed-loop control by quickly building state space model optimization control.

[0007] The first technical solution of the present invention is a state space model optimization control method for PLC implementation, which is used for controlling an object with a given state space equation model, and comprises the following steps:

[0008] (I) obtaining environmental monitoring data collected by the PLC control cabinet, initializing the controller parameter function according to the offline setting, optimizing the control framework based on the environmental monitoring data and the state space model, defining the state space equation, and determining the equipment startup conditions;

[0009] (II) The PLC is divided into offline blocks, online blocks and function operation blocks according to the collected environmental monitoring conditions. The offline blocks receive offline data, the online blocks output matrix operation function parameter results, and the function operation blocks call various matrix operation function blocks to perform matrix operations to obtain control parameters and output them to the online blocks and feed back offline data to the offline blocks;

[0010] (III) constructing a model based on environmental monitoring data and writing into a function block at the same time, and sending the superposition operation result of the matrix operation function block to the model discretization function block to realize the discretization of the environmental state space equation;

[0011] (IV) After completing the equation discretization of the matrix operation function block, the controller parameters are initialized again, and the control parameters are calculated through the control model data block and the controller parameter data block, and the state quantity and input quantity of the controlled object are input. At the same time, the trigger switch is turned on, and the controller starts to run to realize the transmission of the action command of the controlled object;

[0012] (V) The controlled object feeds back the working data to the controller, which is the calculation function block, changes the working environment parameters, and repeats step (I) to realize the PLC system control closed loop.

[0013] Through the above process, the control object of the space equation model can be selected according to the environmental monitoring data of a given state space through step (I), and the state space model-based optimization control can be quickly established on the PLC platform. The application of the PLC-based state equation predictive controller can make the predictive control technology easier to integrate and adapt to industrial control systems, thereby improving the reliability and stability of the system.

[0014] Through steps (II) and (III), the real-time, stability and controllability of the PLC platform can be optimized so that predictive control can adjust the system state more quickly, achieve faster feedback and control response, improve the real-time performance in the industrial process, reduce the system response time, and increase the selection rate and optimization efficiency of parameter functions and matrix functions; the programmability of the PLC platform and the flexibility of external import of matrix functions make the design, adjustment and maintenance of the controller easier, reducing the operability and maintenance cost of the system.

[0015] Preferably, the model writing function block, model discretization function block, controller parameter initialization function block, control model data block and controller parameter data block are divided into offline blocks, the matrix addition operation function block, matrix multiplication operation function block, matrix exponentiation operation function block, matrix determinant operation function block, matrix inversion operation function block and matrix inversion data block are divided into function operation blocks, and the controller real-time calculation function block is divided into online blocks, and the controller real-time calculation function block is unidirectionally electrically connected to the control model data block and the controller parameter data block.

[0016] Offline blocks, function operation blocks and online blocks are model predictive control engineering tools used for programming programmable logic controllers to achieve model predictive control and predictive adjustment optimization. At the same time, matrix parameter operations are introduced to improve the ability of advanced process control, making up for the problem that PLC system design cannot provide optimized control methods for high-dimensional controlled systems.

[0017] Preferably, the input ends of the model writing function block and the controller parameter initialization function block are connected to an offline setting device, the model discretization function block receives state space equation type data from the module writing function block definition, and the model discretization data block and the controller parameter initialization function block simultaneously receive operation data sent from the function operation module in the PLC state space model optimization control framework.

[0018] By writing function blocks and control parameter initialization function blocks to select matrix functions, the design of corresponding control parameters and matrix control functions can be quickly determined or changed. For example, the type of specific external device and whether the error is periodic or repetitive can be determined, and the corresponding control parameters and matrix control functions can be selected for the device type to prevent the PLC from entering the error mode to execute commands due to incorrect function selection. This improves the control flexibility and stability of the PLC system, and reduces user manual intervention and device change variables that cause program system errors.

[0019] Preferably, the control model data block and the controller parameter data block in the offline block form space state data parameters according to the offline parameters, and send them to the online controller real-time calculation function block to form state control parameters.

[0020] When the offline block recognizes changes in the working environment of the PLC control cabinet, it can respond accordingly by controlling the model data block and the controller parameter data block to avoid damage to the internal structure or internal components of the PLC control cabinet due to environmental changes. At the same time, it confirms whether the working environment of the PLC control cabinet is abnormal based on the real-time calculation function block, and selects the corresponding state control parameters to change the parameter function and correct the working state, thereby reducing internal damage to the PLC control cabinet caused by rapid changes in the working environment.

[0021] Preferably, the model writing function block is used to define the state space equation model, control dimension, state dimension, output dimension and control cycle.

[0022] By defining the state-space equation types in multiple dimensions, predictive control technology can be applied to the PLC platform. By adapting to the characteristics of the PLC platform and predicting the working environment, more accurate, efficient and reliable control of industrial automation can be achieved, thereby generating positive effects in terms of efficiency, resource utilization and environmental protection.

[0023] Preferably, the model discretization function block is used to discretize the state space equation.

[0024] Preferably, the controller parameter initialization function block is used to initialize the optimization time domain, control weight, output weight and feedback law matrix in the control.

[0025] Preferably, the controller real-time calculation function block is used to calculate the control quantity according to a given set value and state feedback of the controlled object, and to perform real-time changes in bidirectional input and output.

[0026] The second technical solution of the present invention is a state space model optimization control system for PLC implementation, comprising the following structure:

[0027] Power module;

[0028] CPU calculation circuit, used as central processing unit for matrix function calculation;

[0029] The offline control module receives the offline settings of the device and writes the model function block to determine the matrix function type, and is electrically connected to the CPU calculation circuit;

[0030] The online control module is connected with the offline control module and the CPU calculation circuit, and feeds back the control function result. A controller real-time calculation function block is provided inside, and the control parameters of the offline control module and the CPU calculation circuit are received through the controller real-time calculation function block, and output to the controlled object.

[0031] Through the combined control of the CPU calculation circuit, offline control module and online control module, the control device applies predictive control technology to the PLC platform. By adapting to the characteristics of the PLC platform, it achieves more accurate, efficient and reliable control of the industrial automation system, thereby bringing positive effects in production efficiency, resource utilization, environmental protection and other aspects.

[0032] Preferably, the offline control module includes the following modules:

[0033] The model is written into the function block, the offline settings are written, the matrix function type and the state space equation are determined, and the discretization function block of the model is electrically connected;

[0034] Model discretization function block, used for discretization of state space equations, receiving parameter equations of CPU calculation circuit;

[0035] The controller parameter initialization function block is used to initialize the optimization time domain, control weight, output weight and feedback law matrix type in the controller, and is connected with the CPU calculation circuit and the offline setting module;

[0036] The control model data block is written with the controller given set value, the controller given set value is sent to the online control module, and the online control module is electrically connected;

[0037] The controller parameter data block writes the state feedback parameters of the controlled object, sends the state feedback parameters of the controlled object to the online control module, and is electrically connected to the online control module.

[0038] The offline control module enables the predictive control device to adjust the controlled target more quickly, achieve faster feedback and control response, improve the real-time performance of the industrial process, and reduce the system response time. At the same time, the PLC's rapid response feedback makes the controller system design, adjustment and maintenance methods simpler, reducing the operation and maintenance costs of the controller system.

[0039] Preferably, the online control module includes the following modules:

[0040] The controller real-time calculation function block is used to calculate the control quantity according to the given set value and the state feedback of the controlled object, and output the control quantity to the controlled object.

[0041] Preferably, the power module comprises: an input rectifier module, the input rectifier module is arranged with a bridge rectifier circuit structure, and is used to convert the input alternating current into direct current, the output end of the input rectifier module is electrically connected to a boost circuit, the output end of the PFC boost circuit is electrically connected to a resonant circuit, the LLC resonant circuit is used to improve the voltage conversion efficiency and reduce the switching loss through the soft switching function, the output end of the LLC resonant circuit is electrically connected to a synchronous rectifier circuit, the SR synchronous rectifier circuit is used to rectify the output of the LLC resonant circuit, and provide the rectified direct current to subsequent loads or battery charging;

[0042] The LLC resonant circuit includes a half-bridge circuit composed of a MOS tube Q3 and a MOS tube Q4, a resonant capacitor C28, an LLC resonant chip U6 and a transformer T1. The source of the MOS tube Q3 is connected to the drain of the MOS tube Q4. The source of the MOS tube Q3 is also connected to the OUT pin of the LLC resonant chip U6 and the primary same-name end of the transformer T1. The drain of the MOS tube Q3 is connected to the capacitor in the PFC boost circuit. The gate of the MOS tube Q3 is connected to the HVG pin of the LLC resonant chip U6. The source of the MOS tube Q4 is grounded. The gate of the MOS tube Q4 is connected to the LVG pin of the LLC resonant chip U6. A resonant inductor is integrated in the transformer T1. The non-same-name end of the transformer T1 is connected in series with the resonant capacitor C28 to the ground to form an LLC current network. A filter circuit is also provided on the non-same-name end of the transformer T1 and is connected to the ISEN pin of the LLC resonant chip U6 for detecting the current in the LLC loop.

[0043] Specifically, the LLC resonant chip U6 is of the EG6599S model. The EG6599S chip controls the MOS tubes Q3 and Q4 in the half-bridge circuit to switch alternately by outputting 180° out-of-phase signals.

[0044] Furthermore, in order to ensure the safe and stable operation of the circuit, the switching duty cycle of the EG6599S chip is configured to be slightly less than 50%, so as to introduce a short dead time (TD) between the complete shutdown of one MOS tube and the opening of the other. During the dead time, both the upper and lower MOS tubes are turned off, thereby avoiding the occurrence of transient short circuits caused by excessively fast switching speeds, ensuring that the converter maintains stable operation throughout the entire continuous working cycle, effectively realizing the application of soft switching technology, and achieving an ideal working state of high frequency, high efficiency and low electromagnetic interference (EMI).

[0045] In addition, by precisely controlling the length of the dead time TD, the power conversion efficiency and reliability can be further optimized.

[0046] In this solution, by using LLC resonant circuit, the power supply can maintain high conversion efficiency in a wide input voltage range, reduce electromagnetic radiation, and reduce interference to the surrounding environment. At the same time, the surge protection circuit and EMI filter circuit at the input end effectively suppress external interference, ensure the stability and reliability of the power supply, and together form a complete overload and short-circuit protection mechanism to ensure that the power supply can quickly cut off the circuit under abnormal conditions to prevent equipment damage and safety hazards.

[0047] Furthermore, the PFC boost circuit not only increases the input voltage, but also improves the current waveform on the grid side through the power factor correction (PFC) technology, making the entire power system more stable and reliable. The use of the synchronous rectification circuit (SR) improves the overall efficiency and stability of the power supply.

[0048] Preferably, an overvoltage protection circuit is connected in parallel to the gate of the MOS transistor Q4 and the gate of the MOS transistor Q3.

[0049] In this solution, by connecting an overvoltage protection circuit in parallel to the gates of the MOS tube Q4 and the MOS tube Q3, voltage fluctuations are effectively controlled and circuit failures caused by voltage abnormalities are reduced, thereby improving the reliability of the entire system. That is, when the input voltage exceeds the preset threshold, the overvoltage protection circuit will automatically start to prevent excessive voltage from damaging the MOS tube or other sensitive components.

[0050] Preferably, the LLC resonant circuit also includes an optocoupler U3, the emitter of which is grounded, the collector of which is connected to the RFMIN pin of the LLC resonant chip U6 for controlling the output power of the secondary voltage signal, and the positive and negative electrodes of the optocoupler U3 are connected to the SR synchronous rectification circuit.

[0051] In this solution, the optocoupler U3 can adjust the working state of the LLC resonant chip U6 according to the feedback signal, thereby achieving precise control of the output power of the secondary voltage signal and improving the conversion efficiency of the entire power module. At the same time, under different load conditions, the optocoupler can adjust the output power in real time to ensure that the system always operates at the optimal efficiency point. It also provides electrical isolation, effectively reducing electromagnetic interference (EMI), making the feedback between the primary and secondary sides of the transformer T1 safer and more reliable, and avoiding interference and damage that may be caused by direct connection.

[0052] Furthermore, a jumper JP2 is connected between the collector of the optical coupler U3 and the RFMIN pin of the LLC resonant chip U6.

[0053] In this solution, jumper JP2 allows users or technicians to easily disconnect or connect the connection between the optocoupler U3 and the LLC resonant chip U6 when needed, thereby adjusting the system's operating mode according to different application scenarios and quickly switching different configurations through the jumper, making it easier for engineers to troubleshoot and optimize performance.

[0054] Preferably, the PFC boost circuit includes a boost inductor L2, a freewheeling diode D4, a MOS tube Q1 and a PFC chip U1, the primary coil of the boost inductor L2 is connected between the input rectifier module and the diode D4, the secondary coil of the boost inductor L2 is connected to the ZCD pin of the PFC chip U1 to detect the demagnetization effect, the drain of the MOS tube Q1 is connected between the L2 inductor and the diode D4, the gate of the MOS tube Q1 is connected to the drive pin GD of the PFC chip U1, the source of the MOS tube Q1 is connected in series with the sampling resistor R23 to be grounded, and the CS pin of the PFC chip U1 is connected between the sampling resistor R23 and the MOS tube Q1.

[0055] The PFC boost circuit can convert low-voltage AC power into a higher and more stable DC voltage, and at the same time improve the power efficiency of the grid through power factor correction technology, thereby reducing energy waste. The diode D4 is a freewheeling diode.

[0056] In this solution, boost is achieved through boost inductor L2. When MOS tube Q1 is turned on, it is equivalent to the inductor being connected to the ground. At this time, energy is stored in the inductor. When MOS tube Q1 is turned off, the inductor energy and power flow out through diode D4 at the same time to achieve boost. PFC chip U1 controls the gate voltage of MOS tube Q1 through GD pin to change the MOS tube switch, thereby further achieving power factor correction and voltage regulation.

[0057] Furthermore, the connection between the sampling resistor R23 and the MOS tube Q1 also plays the role of current detection. When an abnormal current is detected, the PFC chip U1 can respond quickly and cut off the drive signal of the MOS tube Q1, thereby protecting the circuit from damage. At the same time, the PFC boost circuit is not only suitable for traditional fields such as universal power adapters and open power supplies, but can also be applied to emerging fields such as new energy vehicle charging piles and industrial automation equipment, with high versatility and flexibility.

[0058] Preferably, the SR synchronous rectification circuit includes a MOS tube Q11, a MOS tube Q12 and a synchronous rectification chip U5. The secondary winding of the transformer T1 is set in a center tap style. The center tap end of the secondary winding is connected to the power supply output end. The two output ends of the secondary winding are respectively connected to the drains of the MOS tube Q11 and the MOS tube Q12, and are respectively connected to the DVS1 and DVS2 pins of the synchronous rectification chip U5. The sources of the MOS tube Q11 and the MOS tube Q12 are both grounded to form a complete current loop. The gate of the MOS tube Q11 is connected to the GD2 pin of the synchronous rectification chip U5, and the gate of the MOS tube Q12 is connected to the GD1 pin of the synchronous rectification chip U5.

[0059] Furthermore, the secondary synchronous rectification mainly follows the conduction of the secondary winding of the transformer. When the body diode of the MOS tube begins to conduct, the corresponding synchronous rectification MOS tube is turned on, and then it is turned off when the current flowing through it is close to zero, and the corresponding MOS of the other winding is turned on again to maintain the output, so it is necessary to detect the voltage of the drain pins of the two MOS tubes to realize the alternating conduction of the two MOS.

[0060] In this solution, synchronous rectification technology is used to replace the traditional Schottky diode with MOS tube, which significantly reduces the voltage drop (V_drop) during conduction, thereby reducing power consumption and heat generation. According to the voltage changes of the two MOS tube drain pins detected, the conduction and shutdown of the MOS tube are accurately controlled to ensure that the two MOS tubes are alternately turned on to avoid the risk of short circuit caused by simultaneous conduction. At the same time, through the setting of the center tap, the current flows alternately between the two MOS tubes, optimizing the current path and further improving the conversion efficiency.

[0061] Preferably, the input rectifier module comprises: a connector J1, an input end of the connector J1 is connected to a surge protection circuit, the surge protection circuit is connected to an EMI filter circuit, the EMI filter circuit is connected to a rectifier circuit, and the rectifier circuit is connected to a PFC boost circuit.

[0062] The surge protection circuit includes: a power fuse F1, and the power fuse F1 is connected to a metal oxide varistor MOV1 and a gas discharge tube GDT1.

[0063] In this solution, the EMI filter circuit is used to smooth out the noise in the mains power supply from entering the system and causing unnecessary problems, suppress ripples to reduce voltage and current jitter, and prevent the noise generated by the switching power supply from returning to the mains power supply. At the same time, the power fuse F1 connected to the input end of the power supply absorbs or suppresses energy such as lightning surges to protect subsequent circuits and prevent sudden energy from damaging the power supply or load equipment. The rectifier circuit connected after the EMI filter circuit converts AC power into DC output.

[0064] Furthermore, by using the LLC resonant circuit, the power supply can maintain high conversion efficiency over a wide input voltage range. The soft switching function of the LLC resonant circuit reduces switching losses and further improves overall efficiency. The surge protection circuit and EMI filter circuit at the power input effectively suppress external interference and ensure the stability and reliability of the power supply. At the same time, the design of the LLC resonant circuit also helps to reduce electromagnetic radiation and reduce interference to the surrounding environment.

[0065] In addition, the input voltage is increased by adding a PFC boost circuit, and the current waveform on the grid side is improved by applying power factor correction (PFC) technology, making the entire power supply system more stable and reliable.

[0066] The present invention has the following beneficial effects:

[0067] (1) Through the control method step (I), the control object of the space equation model is selected for the environmental monitoring data of a given state space, and the state space model-based optimization control is quickly established on the PLC platform. The application of the state equation predictive controller based on the PLC can make the predictive control technology easier to integrate and adapt to industrial control systems, thereby improving the reliability and stability of the system; through the steps (II) and (III), the real-time, stability and controllability of the PLC platform can be optimized so that the predictive control can adjust the system state more quickly, achieve faster feedback and control response, improve the real-time performance of the industrial process, reduce the system response time, and increase the selection rate and optimization efficiency of parameter functions and matrix functions; the programmability of the PLC platform and the flexibility of external import of matrix functions make the design, adjustment and maintenance of the controller easier, thereby reducing the operability and maintenance cost of the system;

[0068] (2) Offline blocks, function operation blocks and online blocks are model predictive control engineering tools used for programming programmable logic controllers to implement model predictive control and predictive adjustment optimization. At the same time, matrix parameter operations are introduced to improve the ability of advanced process control, making up for the problem that PLC system design cannot provide optimized control methods for high-dimensional controlled systems;

[0069] (3) By writing function blocks and control parameter initialization function blocks to select matrix functions, the design of corresponding control parameters and matrix control functions can be quickly determined or changed. For example, the type of a specific external device and whether the error is periodic or repetitive can be determined, and the corresponding control parameters and matrix control functions can be selected for the device type to prevent the PLC from entering an error mode to execute commands due to incorrect function selection. This improves the control flexibility and stability of the PLC system and reduces the manual intervention of users and the occurrence of errors in the program system caused by device change variables.

[0070] (4) When the offline block recognizes that the working environment of the PLC control cabinet has changed, it can respond accordingly by controlling the model data block and the controller parameter data block to prevent the internal structure or internal components of the PLC control cabinet from being damaged due to environmental changes. At the same time, it confirms whether the working environment of the PLC control cabinet is abnormal based on the real-time calculation function block, and selects the corresponding state control parameters to change the parameter function and correct the working state, thereby reducing the internal damage of the PLC control cabinet caused by rapid changes in the working environment;

[0071] (5) By defining the state-space equation types in multiple dimensions, predictive control technology can be applied to the PLC platform. By adapting to the characteristics of the PLC platform and predicting the working environment, more accurate, efficient and reliable control of industrial automation can be achieved, thereby generating positive effects in terms of efficiency, resource utilization and environmental protection.

[0072] (6) By using the LLC resonant circuit, the power supply can maintain a high conversion efficiency within a wide input voltage range, reduce electromagnetic radiation, and reduce interference to the surrounding environment. At the same time, the surge protection circuit and EMI filter circuit at the input end effectively suppress external interference, ensure the stability and reliability of the power supply, and together form a complete overload and short-circuit protection mechanism, ensuring that the power supply can quickly cut off the circuit under abnormal conditions to prevent equipment damage and safety hazards.

[0073] (7) The EMI filter circuit can be used to smooth out the noise in the mains that enters the system and causes unnecessary problems, suppress ripples to reduce voltage and current jitter, and prevent the noise generated by the switching power supply from returning to the mains. At the same time, the power fuse F1 connected to the input end of the power supply absorbs or suppresses energy such as lightning surges to protect subsequent circuits and prevent sudden energy from damaging the power supply or load equipment. The rectifier circuit connected after the EMI filter circuit can also be used to convert AC power into DC output.

[0074] (8) The optocoupler U3 can adjust the working state of the LLC resonant chip U6 according to the feedback signal, thereby achieving precise control of the output power of the secondary voltage signal and improving the conversion efficiency of the entire power module. At the same time, under different load conditions, the optocoupler can adjust the output power in real time to ensure that the system always operates at the optimal efficiency point. It also provides electrical isolation, effectively reducing electromagnetic interference (EMI), making the feedback between the primary and secondary sides of the transformer T1 safer and more reliable, and avoiding interference and damage that may be caused by direct connection. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 It is a schematic diagram of the framework of the method of the present invention;

[0076] Figure 2 It is a schematic diagram of control state function parameters of the present invention;

[0077] Figure 3 It is a schematic diagram of the control state function result target value control of the present invention;

[0078] Figure 4 It is a discretization principle diagram of the ladder diagram system model of the method of the present invention;

[0079] Figure 5 It is a principle diagram of initializing parameters of a ladder diagram controller of the method program of the present invention;

[0080] Figure 6 It is a principle diagram of the controlled object selection of the program ladder diagram of the method of the present invention;

[0081] Figure 7 It is a principle diagram of a real-time controller of a program ladder diagram of the method of the present invention;

[0082] Figure 8 It is the principle diagram of the closed-loop control system of the ladder diagram of the method of the present invention;

[0083] Fig. 9 is a system block diagram of the power module of the present invention;

[0084] Fig.10 It is a MOS tube connection structure diagram of the LLC circuit of the present invention;

[0085] Fig.11 It is a connection structure diagram of an optical coupler of LLC circuit of the present invention;

[0086] Fig.12 This is a MOS tube connection structure diagram of the SR synchronization circuit of the present invention;

[0087] Fig.13 It is a power connection structure diagram of the SR synchronization circuit of the present invention;

[0088] Fig.14 It is a circuit structure diagram of the PFC boost circuit of the present invention;

[0089] Fig.15 This is a circuit diagram of the input rectifier module of the present invention. DETAILED DESCRIPTION

[0090] The present invention is further described below in conjunction with the accompanying drawings and embodiments, but they are not intended to limit the present invention.

[0091] Embodiment 1

[0092] like Figure 1The schematic diagram of the framework of the state space model optimization control method for PLC implementation is shown, which is used for the control object of a given state space equation model, including the following steps:

[0093] (I) obtaining environmental monitoring data collected by the PLC control cabinet, initializing the controller parameter function according to the offline setting, optimizing the control framework based on the environmental monitoring data and the state space model, defining the state space equation, and determining the equipment startup conditions;

[0094] (II) PLC generates offline blocks, online blocks and function operation blocks according to the collected environmental monitoring conditions. The offline blocks receive offline data, the online blocks output matrix operation function parameter results, and the function operation blocks call various matrix operation function blocks to perform matrix operations to obtain control parameters and output them to the online blocks and feed back offline data to the offline blocks;

[0095] (III) constructing a model based on environmental monitoring data and writing into a function block at the same time, and sending the superposition operation result of the matrix operation function block to the model discretization function block to realize the discretization of the environmental state space equation;

[0096] (IV) After completing the equation discretization of the matrix operation function block, the controller parameters are initialized again, and the control parameters are calculated through the control model data block and the controller parameter data block, and the state quantity and input quantity of the controlled object are input. At the same time, the trigger switch is turned on, and the controller starts to run to realize the transmission of the action command of the controlled object;

[0097] (V) The controlled object feeds back the working data to the controller, which is the calculation function block, changes the working environment parameters, and repeats step (I) to realize the PLC system control closed loop.

[0098] Through the above process, the control object of the space equation model can be selected according to the environmental monitoring data of a given state space through step (I), and the state space model-based optimization control can be quickly established on the PLC platform. The application of the PLC-based state equation predictive controller can make the predictive control technology easier to integrate and adapt to industrial control systems, thereby improving the reliability and stability of the system.

[0099] Through steps (II) and (III), the real-time, stability and controllability of the PLC platform can be optimized so that predictive control can adjust the system state more quickly, achieve faster feedback and control response, improve the real-time performance in the industrial process, reduce the system response time, and increase the selection rate and optimization efficiency of parameter functions and matrix functions; the programmability of the PLC platform and the flexibility of external import of matrix functions make the design, adjustment and maintenance of the controller easier, reducing the operability and maintenance cost of the system.

[0100] like Figure 1 The model writing function block, model discretization function block, controller parameter initialization function block, control model data block and controller parameter data block shown are divided into offline blocks, the matrix addition operation function block, matrix multiplication operation function block, matrix exponentiation operation function block, matrix determinant operation function block, matrix inversion operation function block and matrix inversion data block are divided into function operation blocks, and the controller real-time calculation function block is divided into online blocks. The controller real-time calculation function block is unidirectionally electrically connected to the control model data block and the controller parameter data block.

[0101] Offline blocks, function operation blocks and online blocks are model predictive control engineering tools used for programming programmable logic controllers to achieve model predictive control and predictive adjustment optimization. At the same time, matrix parameter operations are introduced to improve the ability of advanced process control, making up for the problem that PLC system design cannot provide optimized control methods for high-dimensional controlled systems.

[0102] The input ends of the model writing function block and the controller parameter initialization function block are connected to the offline setting device, the model discretization function block receives the state space equation type data defined by the module writing function block, and the model discretization data block and the controller parameter initialization function block simultaneously receive the operation data sent by the function operation module in the PLC state space model optimization control framework.

[0103] By writing function blocks and control parameter initialization function blocks to select matrix functions, the design of corresponding control parameters and matrix control functions can be quickly determined or changed. For example, the type of specific external device and whether the error is periodic or repetitive can be determined, and the corresponding control parameters and matrix control functions can be selected for the device type to prevent the PLC from entering the error mode to execute commands due to incorrect function selection. This improves the control flexibility and stability of the PLC system, and reduces user manual intervention and device change variables that cause program system errors.

[0104] The control model data block and the controller parameter data block in the offline block form the space state data parameters according to the offline parameters, and send them to the online controller real-time calculation function block to form the state control parameters.

[0105] When the offline block recognizes changes in the working environment of the PLC control cabinet, it can respond accordingly by controlling the model data block and the controller parameter data block to avoid damage to the internal structure or internal components of the PLC control cabinet due to environmental changes. At the same time, it confirms whether the working environment of the PLC control cabinet is abnormal based on the real-time calculation function block, and selects the corresponding state control parameters to change the parameter function and correct the working state, thereby reducing internal damage to the PLC control cabinet caused by rapid changes in the working environment.

[0106] The model write function block is used to define the model matrix of the state space equations Sampling period t.

[0107] By defining the state-space equation types in multiple dimensions, predictive control technology can be applied to the PLC platform. By adapting to the characteristics of the PLC platform and predicting the working environment, more accurate, efficient and reliable control of industrial automation can be achieved, thereby generating positive effects in terms of efficiency, resource utilization and environmental protection.

[0108] like Figure 4 As shown, the model discretization function block is used to discretize the state space equation. Specifically, the continuous model matrices A and B are converted into discrete matrices.

[0109] like Figure 5 As shown, the controller parameter initialization function block is used to initialize the optimization time domain, control weight, output weight and feedback law matrix in the control.

[0110] like Figure 6 As shown, the controller real-time calculation function block is used to calculate the control quantity according to the given set value and the state feedback of the controlled object, and to perform real-time changes in bidirectional input and output.

[0111] The matrix addition function block inputs two two-dimensional arrays and an integer n, and outputs a two-dimensional data. Its function is to add the corresponding parts of the elements in the input two-dimensional data X and Y that are within the range of n, and finally outputs a two-dimensional array Z. The expression is, Z[0:n,0:n]=X[0:n,0:n]+Y[0:n,0:n]

[0112] like Figure 7 As shown in the figure, the matrix multiplication function block inputs two two-dimensional arrays and an integer n, and outputs a two-dimensional data. Its function is to multiply the input two-dimensional data X and Y to obtain the final two-dimensional array Z. The expression is,

[0113]

[0114] The matrix exponentiation function block takes as input a two-dimensional array, integer m and integer n, and outputs a two-dimensional data. Its function is to perform n-times exponential operation on the input two-dimensional data to obtain the final two-dimensional array Z. The expression is,

[0115]

[0116] The matrix determinant operation function block takes as input a two-dimensional data X and an integer n, and outputs the value of the two-dimensional data determinant. Its function is to find the determinant x of the input two-dimensional data. The determinant x is,

[0117]

[0118] The matrix determinant operation function block inputs a two-dimensional data X and an integer n, and outputs the value of the two-dimensional data determinant. Its function is to calculate the determinant x of the input two-dimensional data.

[0119]

[0120] The matrix inversion function block takes as input a two-dimensional matrix X and outputs the inverse matrix Y of the two-dimensional data.

[0121] adj(X) is the adjoint matrix of X, det(X) is the determinant value

[0122] Matrix inversion data block, by storing the corresponding data in the matrix inversion function block, including det(X) and adj(X)

[0123] The controller parameter initialization function block is used to construct the predictive control feedback rate, and the expression formula is:

[0124] Feedback=inv(G'*Q*G+R)*G'*Q*F

[0125] like Figure 8 As shown, the schematic diagrams of each module of the ladder diagram program of the present invention, the present invention can quickly build a state-space model-based optimization control on the PLC platform for the control object of a given state-space equation model to achieve system closed-loop control; since PLC is widely used in industrial environments, the application of the state equation predictive controller based on PLC can make the predictive control technology easier to integrate and adapt to industrial control systems, and improve the reliability and stability of the system; and the real-time nature of the PLC platform enables the predictive control to adjust the system state more quickly, achieve rapid feedback and control response, improve the real-time nature of the industrial process, and reduce the system response time; the programmability and flexibility of the PLC platform make the design, adjustment and maintenance of the controller easier, and reduce the operation and maintenance costs of the system.

[0126] This predictive controller applies predictive control technology to the PLC platform. By adapting to the characteristics of the PLC platform, it can achieve more accurate, efficient and reliable control of industrial automation systems.

[0127] Embodiment 2

[0128] The state space model-based optimization control system for PLC implementation includes the following structures:

[0129] Power module;

[0130] CPU calculation circuit, used as central processing unit for matrix function calculation;

[0131] The offline control module receives the offline settings of the device and writes the model function block to determine the matrix function type, and is electrically connected to the CPU calculation circuit;

[0132] The online control module is connected with the offline control module and the CPU calculation circuit, and feeds back the control function result. A controller real-time calculation function block is provided inside, and the control parameters of the offline control module and the CPU calculation circuit are received through the controller real-time calculation function block, and output to the controlled object.

[0133] Through the combined control of the CPU calculation circuit, offline control module and online control module, the control device applies predictive control technology to the PLC platform. By adapting to the characteristics of the PLC platform, it achieves more accurate, efficient and reliable control of the industrial automation system, thereby bringing positive effects in production efficiency, resource utilization, environmental protection and other aspects.

[0134] The offline control module includes the following modules:

[0135] The model is written into the function block, the offline settings are written, the matrix function type and the state space equation are determined, and the discretization function block of the model is electrically connected;

[0136] Model discretization function block, used for discretization of state space equations, receiving parameter equations of CPU calculation circuit;

[0137] The controller parameter initialization function block is used to initialize the optimization time domain, control weight, output weight and feedback law matrix type in the controller, and is connected with the CPU calculation circuit and the offline setting module;

[0138] The control model data block is written with the controller given set value, the controller given set value is sent to the online control module, and the online control module is electrically connected;

[0139] The controller parameter data block writes the state feedback parameters of the controlled object, sends the state feedback parameters of the controlled object to the online control module, and is electrically connected to the online control module.

[0140] The offline control module enables the predictive control device to adjust the controlled target more quickly, achieve faster feedback and control response, improve the real-time performance of the industrial process, and reduce the system response time. At the same time, the PLC's rapid response feedback makes the controller system design, adjustment and maintenance methods simpler, reducing the operation and maintenance costs of the controller system.

[0141] The online control module includes the following modules:

[0142] The controller real-time calculation function block is used to calculate the control quantity according to the given set value and the state feedback of the controlled object, and output the control quantity to the controlled object.

[0143] In this embodiment, the real-time calculation function block of the controller with data exchange function is electrically connected to the CPU calculation circuit, that is, the online control module is directly built into the PLC control device, and the data exchange function between devices is directly added to the PLC control device, so that the PLC is compatible with various data exchange devices. Control parameters are directly exchanged through method program blocks and data blocks, and the traditional external data switch can be eliminated to complete the data exchange between PLC controllers and PLCs.

[0144] like Fig. 9 As shown, the power module includes an input rectifier module, which is configured with a bridge rectifier circuit structure and is used to convert input AC power into DC power. The output end of the input rectifier module is electrically connected to a boost circuit, the output end of the PFC boost circuit is electrically connected to a resonant circuit, the LLC resonant circuit is used to improve voltage conversion efficiency and reduce switching losses through a soft switching function, the output end of the LLC resonant circuit is electrically connected to a synchronous rectifier circuit, and the SR synchronous rectifier circuit is used to rectify the output of the LLC resonant circuit and provide the rectified DC power to subsequent loads or battery charging;

[0145] like Fig.10 As shown, the LLC resonant circuit includes a half-bridge circuit composed of a MOS tube Q3 and a MOS tube Q4, a resonant capacitor C28, an LLC resonant chip U6 and a transformer T1. The source of the MOS tube Q3 is connected to the drain of the MOS tube Q4. The source of the MOS tube Q3 is also connected to the OUT pin of the LLC resonant chip U6 and the primary same-name end of the transformer T1. The drain of the MOS tube Q3 is connected to the capacitor in the PFC boost circuit. The gate of the MOS tube Q3 is connected to the HVG pin of the LLC resonant chip U6. The source of the MOS tube Q4 is grounded. The gate of the MOS tube Q4 is connected to the LVG pin of the LLC resonant chip U6. The transformer T1 is integrated with a resonant inductor. The non-same-name end of the transformer T1 is connected in series with the resonant capacitor C28 to the ground to form an LLC current network. A filter circuit is also provided on the non-same-name end of the transformer T1 and is connected to the ISEN pin of the LLC resonant chip U6 for detecting the current in the LLC loop.

[0146] like Fig.14As shown, the PFC boost circuit includes a boost inductor L2, a freewheeling diode D4, a MOS tube Q1 and a PFC chip U1. The primary coil of the boost inductor L2 is connected between the input rectifier module and the diode D4, the secondary coil of the boost inductor L2 is connected to the ZCD pin of the PFC chip U1 to detect the demagnetization effect, the drain of the MOS tube Q1 is connected between the L2 inductor and the diode D4, the gate of the MOS tube Q1 is connected to the drive pin GD of the PFC chip U1, the source of the MOS tube Q1 is connected in series with the sampling resistor R23 to be grounded, and the CS pin of the PFC chip U1 is connected between the sampling resistor R23 and the MOS tube Q1.

[0147] like Fig.15 As shown, the input rectifier module includes: a connector J1, the input end of the connector J1 is connected to a surge protection circuit, the surge protection circuit is connected to an EMI filter circuit, the EMI filter circuit is connected to a rectifier circuit, and the rectifier circuit is connected to a PFC boost circuit.

[0148] The surge protection circuit includes: a power fuse F1 , and the power fuse F1 is connected to a metal oxide varistor MOV1 and a gas discharge tube GDT1 .

[0149] An overvoltage protection circuit is connected in parallel to the gate of the MOS tube Q4 and the gate of the MOS tube Q3.

[0150] like Fig.11 As shown, the LLC resonant circuit also includes an optocoupler U3, the emitter of which is grounded, and the collector of which is connected to the RFMIN pin of the LLC resonant chip U6 for controlling the output power of the secondary voltage signal, and the positive and negative electrodes of the optocoupler U3 are connected to the SR synchronous rectification circuit.

[0151] A jumper JP2 is connected between the collector of the optocoupler U3 and the RFMIN pin of the LLC resonant chip U6.

[0152] like Fig.12 and Fig.13 As shown, the SR synchronous rectification circuit includes a MOS tube Q11, a MOS tube Q12 and a synchronous rectification chip U5. The secondary winding of the transformer T1 is set in a center tap style. The center tap end of the secondary winding is connected to the power output end. The two output ends of the secondary winding are respectively connected to the drains of the MOS tube Q11 and the MOS tube Q12, and are respectively connected to the DVS1 and DVS2 pins of the synchronous rectification chip U5. The sources of the MOS tube Q11 and the MOS tube Q12 are both grounded to form a complete current loop. The gate of the MOS tube Q11 is connected to the GD2 pin of the synchronous rectification chip U5, and the gate of the MOS tube Q12 is connected to the GD1 pin of the synchronous rectification chip U5.

[0153] Experimental example:

[0154] A ship system control process, its state space equation is as follows:

[0155]

[0156] B = [0.215 0] T

[0157] C=[0 1]

[0158] The period t=0.1s is adopted and the optimized time domain is N=5.

[0159] The two state quantities x of the system are the heading angular velocity and the heading angle, the input u is the rudder angle of the ship, and the output y is the heading angle. The initial state quantity and input quantity are both 0, and the target heading angle output is 0.1745 (radians). Figure 2 shown.

[0160] Data is input into the parameter function. After matrix operation, the trigger switch is turned on and the controller starts to run. The control input u makes the state quantity 2, that is, the heading angle, move toward the target value. The specific results are as follows: Figure 3 shown.

Claims

1. The state space model optimization control method for PLC implementation is characterized by: The control object for a given state space equation model comprises the following steps: (I) obtaining environmental monitoring data collected by the PLC control cabinet, initializing the controller parameter function according to the offline setting, optimizing the control framework based on the environmental monitoring data and the state space model, defining the state space equation, and determining the equipment startup conditions; (II) The PLC is divided into offline blocks, online blocks and function operation blocks according to the collected environmental monitoring conditions. The offline blocks receive offline data, the online blocks output matrix operation function parameter results, and the function operation blocks call various matrix operation function blocks to perform matrix operations to obtain control parameters and output them to the online blocks and feed back offline data to the offline blocks; (III) constructing a model based on environmental monitoring data and writing into a function block at the same time, and sending the superposition operation result of the matrix operation function block to the model discretization function block to realize the discretization of the environmental state space equation; (IV) After completing the equation discretization of the matrix operation function block, the controller parameters are initialized again, and the control parameters are calculated through the control model data block and the controller parameter data block, and the state quantity and input quantity of the controlled object are input. At the same time, the trigger switch is turned on, and the controller starts to run to realize the transmission of the action command of the controlled object; (V) The controlled object feeds back the working data to the controller, which is the calculation function block, changes the working environment parameters, and repeats step (I) to realize the PLC system control closed loop.

2. The state space model-based optimization control method for PLC implementation according to claim 1 is characterized in that: The state space model optimization control framework includes a matrix addition operation function block, a matrix determinant operation function block, a matrix multiplication operation function block, a matrix exponentiation operation function block, a matrix inverse operation function block, a model writing function block, a model discretization function block, a controller parameter initialization function block, a controller real-time calculation function block, a matrix inversion data controller parameter data block and a control model data block.

3. The state space model-based optimization control method for PLC implementation according to claim 1 or 2 is characterized in that: The model writing function block, model discretization function block, controller parameter initialization function block, control model data block and controller parameter data block are divided into offline blocks, the matrix addition operation function block, matrix multiplication operation function block, matrix exponentiation operation function block, matrix determinant operation function block, matrix inversion operation function block and matrix inversion data block are divided into function operation blocks, and the controller real-time calculation function block is divided into online blocks, and the controller real-time calculation function block is unidirectionally electrically connected to the control model data block and the controller parameter data block.

4. The state space model optimization control method for PLC implementation according to claim 1 is characterized in that: The input ends of the model writing function block and the controller parameter initialization function block are connected to the offline setting device, the model discretization function block receives the state space equation type data from the module writing function block definition, and the model discretization data block and the controller parameter initialization function block simultaneously receive the operation data sent from the function operation module in the PLC state space model optimization control framework.

5. The state space model optimization control method for PLC implementation according to claim 1 is characterized in that: The control model data block and the controller parameter data block in the offline block form space state data parameters according to the offline parameters, and send them to the online controller real-time calculation function block to form state control parameters.

6. The state space model-based optimization control method for PLC implementation according to claim 2 is characterized in that: The model writing function block is used to define the state space equation model, control dimension, state dimension, output dimension and control cycle; The model discretization function block is used to discretize the state space equation; The controller parameter initialization function block is used to initialize the optimization time domain, control weight, output weight and feedback law matrix in the control; The controller real-time calculation function block is used to calculate the control quantity according to the given set value and the state feedback of the controlled object, and to perform real-time change of bidirectional input and output.

7. The state space model-based optimization control system for PLC implementation is characterized by: Includes the following structure, Power module; CPU calculation circuit, used as central processing unit for matrix function calculation; The offline control module receives the offline settings of the device and writes the model function block to determine the matrix function type, and is electrically connected to the CPU calculation circuit; The online control module is connected with the offline control module and the CPU calculation circuit, and feeds back the control function result. A controller real-time calculation function block is provided inside, and the control parameters of the offline control module and the CPU calculation circuit are received through the controller real-time calculation function block, and output to the controlled object.

8. The state space model-based optimization control system for PLC implementation according to claim 7 is characterized in that: The offline control module includes the following modules: The model is written into the function block, the offline settings are written, the matrix function type and the state space equation are determined, and the discretization function block of the model is electrically connected; Model discretization function block, used for discretization of state space equations, receiving parameter equations of CPU calculation circuit; The controller parameter initialization function block is used to initialize the optimization time domain, control weight, output weight and feedback law matrix type in the controller, and is connected with the CPU calculation circuit and the offline setting module; The control model data block is written with the controller given set value, the controller given set value is sent to the online control module, and the online control module is electrically connected; The controller parameter data block writes the state feedback parameters of the controlled object, sends the state feedback parameters of the controlled object to the online control module, and is electrically connected to the online control module.

9. The state space model-based optimization control system for PLC implementation according to claim 7 is characterized in that: The online control module includes the following modules: The controller real-time calculation function block is used to calculate the control quantity according to the given set value and the state feedback of the controlled object, and output the control quantity to the controlled object.

10. The state space model-based optimization control system for PLC implementation according to claim 7 is characterized in that: The power module includes an input rectifier module, the input rectifier module is configured with a bridge rectifier circuit structure, and is used to convert input alternating current into direct current. The output end of the input rectifier module is electrically connected to a PFC boost circuit, and the output end of the PFC boost circuit is electrically connected to a resonant circuit. The LLC resonant circuit is used to improve voltage conversion efficiency and reduce switching losses through a soft switching function. The output end of the LLC resonant circuit is electrically connected to a synchronous rectifier circuit SR, and the synchronous rectifier circuit SR is used to rectify the output of the LLC resonant circuit and provide the rectified direct current to a subsequent load or battery charging. The LLC resonant circuit includes a half-bridge circuit composed of a MOS tube Q3 and a MOS tube Q4, a resonant capacitor C28, an LLC resonant chip U6 and a transformer T1. The source of the MOS tube Q3 is connected to the drain of the MOS tube Q4. The source of the MOS tube Q3 is also connected to the OUT pin of the LLC resonant chip U6 and the primary same-name end of the transformer T1. The drain of the MOS tube Q3 is connected to the capacitor in the PFC boost circuit. The gate of the MOS tube Q3 is connected to the HVG pin of the LLC resonant chip U6. The source of the MOS tube Q4 is grounded. The gate of the MOS tube Q4 is connected to the LVG pin of the LLC resonant chip U6. A resonant inductor is integrated in the transformer T1. The non-same-name end of the transformer T1 is connected in series with the resonant capacitor C28 to the ground to form an LLC current network. A filter circuit is also provided on the non-same-name end of the transformer T1 and is connected to the ISEN pin of the LLC resonant chip U6 for detecting the current in the LLC loop.

Citation Information

Patent Citations

  • System and method for implementing model predictive control in PLC

    CN105103059A

  • Compensation-based aero-engine multi-loop switching control method

    CN104314693A

  • Image visual servo control system based on data driving and control method thereof

    CN111203880A

  • Automatic control virtual simulation manufacturing platform

    CN114706353A

  • PLC-based automatic control decision optimization method and system

    CN116203891A