State space model-based optimization control method and system for plc implementation

By constructing a state-space model on the PLC platform to optimize the control method, the problem of the inability of PLC systems to expand control functions is solved, achieving efficient and reliable industrial control and improving the real-time performance and stability of the system.

CN119596833BActive Publication Date: 2025-11-11SHANGHAI BIDI-TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing PLC software control methods or control systems cannot expand the system control functions or improve the optimization of advanced control processes, resulting in limitations in PLC's ability to improve high-dimensional control and overall system performance.

Method used

An optimization control method based on a state-space model is adopted. By acquiring environmental monitoring data from the PLC control cabinet, the system is divided into offline and online blocks. Matrix operations and discretization are performed to construct state-space equations and achieve closed-loop control of the system.

Benefits of technology

It improves the reliability and stability of the PLC system, optimizes real-time performance and control response speed, reduces system operation and maintenance costs, and enhances the ability to control advanced processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119596833B_ABST
    Figure CN119596833B_ABST
Patent Text Reader

Abstract

This invention relates to the field of PLC state control, and particularly to a state-space model-based optimization control method and system for PLC implementation. The method includes the following steps: (I) acquiring environmental monitoring data collected by the PLC control cabinet and defining state-space equations; (II) the PLC dividing the collected environmental monitoring data into offline blocks, online blocks, and function operation blocks; (III) constructing a model based on the environmental monitoring data and simultaneously writing it into the function blocks to discretize the environmental state-space equations; (IV) re-initializing the controller parameters, turning on the trigger switch, and starting the controller to transmit action commands to the controlled object; (V) the controlled object feeding back its working data to the controller's real-time calculation function blocks to change the working environment parameters, repeating step (I) to achieve a closed-loop control system for the PLC. This invention simplifies the control, adjustment, and maintenance of the PLC system, reducing system operability and maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This 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 Technology

[0002] PLCs are mainly used in non-contact sequential control circuit systems for factory automation. They are used to form control systems by connecting hardware elements such as relays, timers, and counters, or in non-contact timing control systems with modified programs. PLC control has advantages such as high speed, environmental resistance, ease of operation, and good economic benefits. It includes multiple control elements and can realize programmable real-time control combinations. To improve the stability and control capabilities of PLCs, optimization of the PLC control system or model is an important factor. However, existing PLC software control methods or control systems cannot expand the system control functions.

[0003] PLCs have been widely used in industrial automation. However, the limited computing and storage capabilities of current PLCs prevent the implementation and optimization of higher-level control processes using the control logic built into the PLC. This mechanical and software deficiency greatly limits the application of PLCs in advanced manufacturing and advanced process control. 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 system performance and control dimensions.

[0004] Patent document with publication number "CN105103059A" discloses a system and method for implementing model predictive control in a PLC. The model predictive control framework is implemented as part of the runtime system functional characteristics of the programmable logic controller system. During PLC runtime, optimal control calculations are performed in the MPC function block. The optimal control function is determined by the MPC block in the PLC's engineering tools using a system dynamic matrix containing measurements from unit step response tests performed by the PLC. However, this method cannot extend the system control function during the execution of software control processes, cannot improve the PLC system's implementation and optimization of advanced control processes, and cannot improve control logic and model optimization through software writing.

[0005] Therefore, current improvements to PLC control capabilities and high-dimensional optimization of the control process suffer from limitations in capability expansion, control optimization direction, and overall system performance enhancement. Summary of the Invention

[0006] To address the technical problems of existing PLC software control methods or control systems, such as the inability to expand system control functions and the inability to stably control advanced control processes, this invention provides a control method based on state-space model optimization for PLC implementation. This method features the ability to quickly build a state-space model-based optimization control system and achieve closed-loop system control.

[0007] The first technical solution of the present invention is a state-space model-based optimization control method for PLC implementation, used for a controlled object with a given state-space equation model, comprising the following steps:

[0008] (I) Obtain environmental monitoring data collected by the PLC control cabinet, initialize controller parameter functions according to offline settings, optimize the control framework based on environmental monitoring data and state space model, define state space equations, and determine equipment start-up conditions;

[0009] (II) The PLC is divided into offline blocks, online blocks and function operation blocks according to the collected environmental monitoring data. The offline blocks receive offline data, the online blocks output the 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) Construct a model based on environmental monitoring data and write it into the function block, and send the superposition operation result of the matrix operation function block into the model discretization function block to realize the discretization of the environmental state space equation;

[0011] (IV) After discretizing the equations 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. The state quantity and input quantity of the controlled object are input, and the trigger switch is turned on. The controller starts to run and realizes 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 a calculation function block to change the working environment parameters. Step (I) is repeated to realize the closed loop of PLC system control.

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

[0014] Steps (II) and (III) optimize the real-time performance, stability, and controllability of the PLC platform, enabling predictive control to adjust the system state more quickly, achieve faster feedback and control response, improve real-time performance in industrial processes, reduce 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 matrix function import make the design, adjustment, and maintenance of the controller simpler, reducing the operability and maintenance costs 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; 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 tuning optimization. They also import matrix parameter operations to improve the ability to perform advanced process control, thus compensating for the problem that PLC system design cannot provide optimized control methods for high-dimensional controlled systems.

[0017] Preferably, the input terminals 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 defined by the module writing function block, and the model discretization data block and the controller parameter initialization function block simultaneously receive computation data sent by the function computation module in the PLC state space model optimization control framework.

[0018] By writing function blocks and control parameter initialization function blocks for matrix function selection, the design of corresponding control parameters and matrix control functions can be quickly determined or changed. For example, it can determine the type of a specific external device and whether the error occurs periodically or repeatedly, and select the corresponding control parameters and matrix control functions for that device type. This prevents the PLC from entering an error mode and executing commands due to incorrect function selection, thereby improving the control flexibility and stability of the PLC system and reducing errors in the program system caused by user manual intervention and changes in device variables.

[0019] Preferably, the control model data block and controller parameter data block in the offline block form spatial state data parameters based on 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 detects changes in the working environment of the PLC control cabinet, it can react accordingly through the control model data block and the controller parameter data block to prevent damage to the internal structure or internal components of the PLC control cabinet due to environmental changes. At the same time, it can confirm whether the working environment of the PLC control cabinet is abnormal based on the real-time calculation function block, and select the corresponding status control parameters to change the parameter function and correct the working status, thereby reducing internal damage to the PLC control cabinet caused by rapid changes in the working environment.

[0021] Preferably, the model is written into a function block to define the state-space equation model, control dimension, state dimension, output dimension, and control period.

[0022] By defining state-space equation types in multiple dimensions, predictive control technology can be applied to PLC platforms. By adapting to the characteristics of PLC platforms and predicting the working environment, more precise, efficient, and reliable control of industrial automation can be achieved, resulting in 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 equations.

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

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

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

[0027] Power module;

[0028] The CPU computing circuit acts as the central processing unit for matrix function operations;

[0029] The offline control module receives offline settings from the device and writes them into the model function block to determine the matrix function type; it is electrically connected to the CPU calculation circuit.

[0030] The online control module connects to the offline control module and the CPU computing circuit, providing feedback on the control function results. It also includes a real-time controller calculation function block, which receives control parameters from the offline control module and the CPU computing circuit and outputs them to the controlled object.

[0031] By combining CPU computing circuits, offline control modules, and online control modules, this control device applies predictive control technology to the PLC platform. By adapting to the characteristics of the PLC platform, it achieves more precise, efficient, and reliable control of industrial automation systems, thereby bringing positive effects in terms of production efficiency, resource utilization, and environmental protection.

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

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

[0034] The model discretization function block is used for discretizing the state-space equations and receives the parametric equations from the CPU calculation circuit.

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

[0036] The control model data block is written with the controller's setpoint and sent to the online control module, which is electrically connected to the online control module.

[0037] The controller parameter data block is used to write the controlled object status feedback parameters, which are then sent to the online control module and electrically connected to it.

[0038] Offline control modules enable predictive control devices to adjust to the controlled target more quickly, achieving faster feedback and control response, improving real-time performance in industrial processes, and reducing system response time. At the same time, the rapid response feedback of PLCs makes the design, adjustment, and maintenance of controller systems simpler, reducing the operation and maintenance costs of controller systems.

[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 based on 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 supply module includes: an input rectifier module, which adopts a bridge rectifier circuit structure to convert the input AC power into DC power; the output terminal of the input rectifier module is electrically connected to a boost circuit; the output terminal 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 soft switching function; the output terminal 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 DC power to the subsequent load or battery charging.

[0042] The LLC resonant circuit includes a half-bridge circuit composed of MOSFETs Q3 and Q4, a resonant capacitor C28, an LLC resonant chip U6, and a transformer T1. The source of MOSFET Q3 is connected to the drain of MOSFET Q4. The source of MOSFET Q3 is also connected to the OUT pin of the LLC resonant chip U6 and the primary winding of transformer T1. The drain of MOSFET Q3 is connected to the capacitor in the PFC boost circuit. The gate of MOSFET Q3 is connected to the HVG pin of the LLC resonant chip U6. The source of MOSFET Q4 is grounded, and the gate of MOSFET Q4 is connected to the LVG pin of the LLC resonant chip U6. The transformer T1 integrates a resonant inductor. The non-non ...

[0043] Specifically, the LLC resonant chip U6 is the EG6599S model. The EG6599S chip controls the alternating switching of MOSFETs Q3 and Q4 in the half-bridge circuit by outputting a 180° out-of-phase signal.

[0044] Furthermore, 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% to introduce a brief dead time (TD) between the complete turn-off of one MOSFET and the imminent turn-on of the other. During this dead time, both the upper and lower MOSFETs are turned off, thereby avoiding transient short circuits caused by excessively fast switching speeds. This ensures that the converter maintains stable operation throughout the entire continuous operating cycle, effectively realizing the application of soft-switching technology, and ultimately achieving the ideal operating state of high frequency, high efficiency, and low electromagnetic interference (EMI).

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

[0046] In this solution, by using an LLC resonant circuit, the power supply can maintain high conversion efficiency over a wide input voltage range, reducing electromagnetic radiation and minimizing interference with the surrounding environment. Simultaneously, the surge protection circuit and EMI filter circuit at the input effectively suppress external interference, ensuring the stability and reliability of the power supply. Together, they form a comprehensive overload and short-circuit protection mechanism, ensuring that the power supply can quickly disconnect the circuit under abnormal conditions, preventing 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 power factor correction (PFC) technology, making the entire power supply system more stable and reliable. The use of a synchronous rectifier (SR) circuit further enhances the overall efficiency and stability of the power supply.

[0048] Preferably, overvoltage protection circuits are connected in parallel on the gates of both MOSFET Q4 and MOSFET Q3.

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

[0050] Preferably, the LLC resonant circuit further 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. The positive and negative terminals of the optocoupler U3 are connected to the SR synchronous rectification circuit.

[0051] In this solution, optocoupler U3 can adjust the operating state of LLC resonant chip U6 based on feedback signals, thereby achieving precise control of the secondary voltage signal output power and improving the conversion efficiency of the entire power module. Simultaneously, under different load conditions, the optocoupler can adjust the output power in real time, ensuring the system always operates at its optimal efficiency point. Furthermore, it provides electrical isolation, effectively reducing electromagnetic interference (EMI), making the feedback between the primary and secondary sides of transformer T1 safer and more reliable, avoiding interference and damage that may result from direct connection.

[0052] Furthermore, a jumper JP2 is connected between the collector of the optocoupler 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 optocoupler U3 and LLC resonant chip U6 when needed, thereby adjusting the system's operating mode according to different application scenarios and quickly switching between different configurations through the jumper, facilitating engineers to troubleshoot and optimize performance.

[0054] Preferably, the PFC boost circuit includes a boost inductor L2, a freewheeling diode D4, a MOSFET 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 demagnetizing effect. The drain of the MOSFET Q1 is connected between the L2 inductor and the diode D4. The gate of the MOSFET Q1 is connected to the drive pin GD of the PFC chip U1. The source of the MOSFET Q1 is connected to ground via a series-parallel sampling resistor R23. The CS pin of the PFC chip U1 is connected between the sampling resistor R23 and the MOSFET Q1.

[0055] The PFC boost circuit converts low-voltage AC power into higher and more stable DC power, while improving grid-side energy utilization efficiency and reducing energy waste through power factor correction technology. Diode D4 is a freewheeling diode.

[0056] In this scheme, the boost voltage is achieved through the boost inductor L2. When the MOSFET Q1 is turned on, it is equivalent to the inductor being connected to ground, and energy is stored in the inductor. When the MOSFET Q1 is turned off, the energy in the inductor and the power supply flow out through the diode D4 to achieve the boost voltage. The PFC chip U1 controls the gate voltage of the MOSFET Q1 through the GD pin to change the MOSFET switching, thereby further realizing power factor correction and voltage regulation.

[0057] Furthermore, the connection between the sampling resistor R23 and the MOSFET Q1 also serves as a current detection mechanism. When an abnormal current is detected, the PFC chip U1 can quickly respond by cutting off the drive signal of the MOSFET Q1, thereby protecting the circuit from damage. At the same time, this PFC boost circuit is not only suitable for traditional fields such as general power adapters and open-type power supplies, but also for emerging fields such as new energy vehicle charging piles and industrial automation equipment, demonstrating high versatility and flexibility.

[0058] Preferably, the SR synchronous rectification circuit includes MOSFETs Q11 and Q12 and a synchronous rectification chip U5. The secondary winding of the transformer T1 is configured with a center tap, and the center tap of the secondary winding is connected to the power output terminal. The two output terminals of the secondary winding are respectively connected to the drains of MOSFETs Q11 and Q12, and respectively connected to the DVS1 and DVS2 pins of the synchronous rectification chip U5. The sources of MOSFETs Q11 and Q12 are both grounded, forming a complete current loop. The gate of MOSFET Q11 is connected to the GD2 pin of the synchronous rectification chip U5, and the gate of MOSFET 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 MOSFET starts to conduct, the corresponding synchronous rectification MOSFET conducts. Then, when the current flowing through it approaches zero, it is turned off, and the corresponding MOSFET of the other winding conducts again to maintain the output. Therefore, it is necessary to detect the voltage of the drain pins of the two MOSFETs to realize the alternating conduction of the two MOSFETs.

[0060] This solution employs synchronous rectification technology, using MOSFETs instead of traditional Schottky diodes to significantly reduce the voltage drop (V_drop) during conduction, thereby reducing power consumption and heat generation. Furthermore, based on the detected voltage changes at the drain pins of the two MOSFETs, the system precisely controls their on / off states, ensuring alternating conduction and avoiding the short-circuit risk caused by simultaneous conduction. Simultaneously, the center tap design allows current to flow alternately between the two MOSFETs, optimizing the current path and further improving conversion efficiency.

[0061] Preferably, the input rectifier module includes: a connector J1, the input end of which 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, which is connected to a metal oxide varistor MOV1 and a gas discharge tube GDT1.

[0063] In this solution, an EMI filter circuit is used to smooth out noise from the mains power supply that could cause unnecessary problems, suppress ripple to reduce voltage and current fluctuations, and prevent noise generated by the switching power supply from returning to the mains power. Simultaneously, a power fuse F1 connected to the power input absorbs or suppresses energy from lightning surges to protect downstream circuits and prevent damage to the power supply or load equipment from sudden energy surges. Finally, a rectifier circuit connected after the EMI filter circuit converts the AC power into DC power for output.

[0064] Furthermore, by using an 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, further improving overall efficiency. Meanwhile, the surge protection circuit and EMI filter circuit at the power input effectively suppress external interference, ensuring the stability and reliability of the power supply. At the same time, the design of the LLC resonant circuit also helps reduce electromagnetic radiation and minimize 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) By using control method step (I), a spatial equation model of the control object is selected based on the environmental monitoring data of the given state space. The state space model-based optimization control is quickly built on the PLC platform. The application of the state equation predictive controller based on PLC makes predictive control technology easier to integrate and adapt to industrial control systems, improving the reliability and stability of the system. Through steps (II) and (III), the real-time performance, stability and controllability of the PLC platform are optimized, enabling predictive control to adjust the system state more quickly, achieve faster feedback and control response, improve the real-time performance in industrial processes, reduce system response time, and improve the selection rate and optimization efficiency of parameter functions and matrix functions. The programmability of the PLC platform and the flexibility of external matrix function import make the design, adjustment and maintenance of the controller simpler, 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 realize model predictive control and predictive tuning optimization. At the same time, the import of matrix parameter operation improves the ability to control advanced processes and makes up for the problem that PLC system design cannot provide optimization 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, it can be determined whether the type of a specific external device and the occurrence of errors are periodic or repetitive, and 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 can improve the control flexibility and stability of the PLC system and reduce errors caused by user manual intervention and changes in device variables.

[0070] (4) When the offline block detects changes in the working environment of the PLC control cabinet, it can react accordingly through the control 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 can confirm whether the working environment of the PLC control cabinet is abnormal according to the real-time calculation function block, and select the corresponding status control parameters to change the parameter function and correct the working status, thereby reducing the damage to the PLC control cabinet caused by rapid changes in the working environment.

[0071] (5) By defining the state space equation type 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 benefits, resource utilization and environmental protection.

[0072] (6) By using an LLC resonant circuit, the power supply can maintain high conversion efficiency over a wide input voltage range, reduce electromagnetic radiation, and minimize 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, ensuring the stability and reliability of the power supply. Together, they form a complete overload and short-circuit protection mechanism, ensuring that the power supply can quickly disconnect the circuit under abnormal conditions, preventing equipment damage and safety hazards.

[0073] (7) The EMI filter circuit smooths out noise from the mains power supply, preventing it from entering the system and causing unnecessary problems. It also suppresses ripple, reduces voltage and current fluctuations, and prevents noise generated by the switching power supply from returning to the mains power. Simultaneously, the power fuse F1, connected to the power input, absorbs or suppresses energy from lightning surges to protect downstream circuits and prevent sudden energy from damaging the power supply or load equipment. Finally, the rectifier circuit connected after the EMI filter circuit converts AC power to DC power output.

[0074] (8) Optocoupler U3 can adjust the operating state of LLC resonant chip U6 according to the feedback signal, thereby achieving precise control of the secondary voltage signal output power and improving the conversion efficiency of the entire power module. Simultaneously, under different load conditions, the optocoupler can adjust the output power in real time to ensure the system always operates at its optimal efficiency point. It also provides electrical isolation, effectively reducing electromagnetic interference (EMI), making the feedback between the primary and secondary sides of transformer T1 safer and more reliable, avoiding interference and damage that may result from direct connection. Attached Figure Description

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

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

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

[0078] Figure 4 This is a schematic diagram illustrating the discretization principle of the ladder diagram system model of the method of this invention;

[0079] Figure 5 This is the schematic diagram of the ladder diagram controller parameter initialization principle of the method of this invention;

[0080] Figure 6 This is a ladder diagram illustrating the principle of controlled object selection in the method of this invention.

[0081] Figure 7 This is a schematic diagram of the ladder diagram real-time controller for the method of this invention;

[0082] Figure 8 This is a schematic diagram of the ladder diagram closed-loop control system of the method of this invention;

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

[0084] Figure 10 This is a diagram showing the MOS transistor connection structure of the LLC circuit of the present invention;

[0085] Figure 11 This is a diagram showing the optocoupler connection structure of the LLC circuit of the present invention;

[0086] Figure 12 This is a diagram showing the MOS transistor connection structure of the SR synchronization circuit of the present invention;

[0087] Figure 13 This is a power connection diagram of the SR synchronization circuit of the present invention;

[0088] Figure 14 This is a circuit diagram of the PFC boost circuit of the present invention;

[0089] Figure 15 This is a circuit diagram of the input rectifier module of the present invention. Detailed Implementation

[0090] The present invention will be further described below with reference to the accompanying drawings and embodiments, but this should not be construed as limiting the present invention.

[0091] Example 1

[0092] like Figure 1The diagram shows a schematic of a state-space model-based optimization control method for PLC implementation. This method is used to control a given state-space equation model of an object and includes the following steps:

[0093] (I) Obtain environmental monitoring data collected by the PLC control cabinet, initialize controller parameter functions according to offline settings, optimize the control framework based on environmental monitoring data and state space model, define state space equations, and determine equipment start-up conditions;

[0094] (II) The PLC divides the collected environmental monitoring data into offline blocks, online blocks and function operation blocks. The offline blocks receive offline data, the online blocks output the 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) Construct a model based on environmental monitoring data and write it into the function block, and send the superposition operation result of the matrix operation function block into the model discretization function block to realize the discretization of the environmental state space equation;

[0096] (IV) After discretizing the equations 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. The state quantity and input quantity of the controlled object are input, and the trigger switch is turned on. The controller starts to run and realizes 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 a calculation function block to change the working environment parameters. Step (I) is repeated to realize the closed loop of PLC system control.

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

[0099] Steps (II) and (III) optimize the real-time performance, stability, and controllability of the PLC platform, enabling predictive control to adjust the system state more quickly, achieve faster feedback and control response, improve real-time performance in industrial processes, reduce 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 matrix function import make the design, adjustment, and maintenance of the controller simpler, reducing the operability and maintenance costs 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 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. 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 tuning optimization. They also import matrix parameter operations to improve the ability to perform advanced process control, thus compensating for the problem that PLC system design cannot provide optimized control methods for high-dimensional controlled systems.

[0102] The input terminals 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 state space equation type data defined by the module writing function block. The model discretization data block and the controller parameter initialization function block simultaneously receive calculation data sent by the function calculation module in the PLC state space model optimization control framework.

[0103] By writing function blocks and control parameter initialization function blocks for matrix function selection, the design of corresponding control parameters and matrix control functions can be quickly determined or changed. For example, it can determine the type of a specific external device and whether the error occurs periodically or repeatedly, and select the corresponding control parameters and matrix control functions for that device type. This prevents the PLC from entering an error mode and executing commands due to incorrect function selection, thereby improving the control flexibility and stability of the PLC system and reducing errors in the program system caused by user manual intervention and changes in device variables.

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

[0105] When the offline block detects changes in the working environment of the PLC control cabinet, it can react accordingly through the control model data block and the controller parameter data block to prevent damage to the internal structure or internal components of the PLC control cabinet due to environmental changes. At the same time, it can confirm whether the working environment of the PLC control cabinet is abnormal based on the real-time calculation function block, and select the corresponding status control parameters to change the parameter function and correct the working status, thereby reducing internal damage to the PLC control cabinet caused by rapid changes in the working environment.

[0106] The model is written into a function block to define the model matrix for the state-space equations. Sampling period t.

[0107] By defining state-space equation types in multiple dimensions, predictive control technology can be applied to PLC platforms. By adapting to the characteristics of PLC platforms and predicting the working environment, more precise, efficient, and reliable control of industrial automation can be achieved, resulting in 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 equations. Specifically, it converts the continuous model matrices A and B into discrete matrices.

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

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

[0111] The matrix addition function takes two two-dimensional arrays and an integer n as input and outputs a two-dimensional data set. Its function is to add the corresponding elements within the range n of the input two-dimensional data X and Y, finally outputting 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, the matrix multiplication function block takes two two-dimensional arrays and an integer n as input 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 a two-dimensional array, an integer m, and an integer n as input, and outputs a two-dimensional array. Its function is to perform an nth-fold power operation on the input two-dimensional array to obtain the final two-dimensional array Z. The expression is:

[0115]

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

[0117]

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

[0119]

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

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

[0122] The matrix inversion data block stores the corresponding data from 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, expressed by the following formula:

[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 this invention are shown. This invention can quickly build state-space model-based optimized control on a PLC platform for a control object with a given state-space equation model, realizing closed-loop control of the system. Since PLCs are widely used in industrial environments, the application of this PLC-based state equation predictive controller makes predictive control technology easier to integrate and adapt to industrial control systems, improving the reliability and stability of the system. Moreover, the real-time performance of the PLC platform enables predictive control to adjust the system state more quickly, achieving rapid feedback and control response, improving the real-time performance of industrial processes, and reducing system response time. The programmability and flexibility of the PLC platform make the design, adjustment, and maintenance of the controller simpler, reducing the operation and maintenance costs of the system.

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

[0127] Example 2

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

[0129] Power module;

[0130] The CPU computing circuit acts as the central processing unit for matrix function operations;

[0131] The offline control module receives offline settings from the device and writes them into the model function block to determine the matrix function type; it is electrically connected to the CPU calculation circuit.

[0132] The online control module connects to the offline control module and the CPU computing circuit, providing feedback on the control function results. It also includes a real-time controller calculation function block, which receives control parameters from the offline control module and the CPU computing circuit and outputs them to the controlled object.

[0133] By combining CPU computing circuits, offline control modules, and online control modules, this control device applies predictive control technology to the PLC platform. By adapting to the characteristics of the PLC platform, it achieves more precise, efficient, and reliable control of industrial automation systems, thereby bringing positive effects in terms of production efficiency, resource utilization, and environmental protection.

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

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

[0136] The model discretization function block is used for discretizing the state-space equations and receives the parametric equations from the CPU calculation circuit.

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

[0138] The control model data block is written with the controller's setpoint and sent to the online control module, which is electrically connected to the online control module.

[0139] The controller parameter data block is used to write the controlled object status feedback parameters, which are then sent to the online control module and electrically connected to it.

[0140] Offline control modules enable predictive control devices to adjust to the controlled target more quickly, achieving faster feedback and control response, improving real-time performance in industrial processes, and reducing system response time. At the same time, the rapid response feedback of PLCs makes the design, adjustment, and maintenance of controller systems simpler, reducing the operation and maintenance costs of controller systems.

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

[0142] The controller real-time calculation function block is used to calculate the control quantity based on 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, making the PLC compatible with various data exchange devices. Control parameters are directly exchanged through method program blocks and data blocks, which can eliminate the need for traditional external data exchange to complete the data exchange between the PLC controller and the PLC.

[0144] like Figure 9 As shown, the power module includes an input rectifier module, which adopts a bridge rectifier circuit structure to convert the input AC power into DC power. The output terminal of the input rectifier module is electrically connected to a boost circuit. The output terminal 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 soft switching function. The output terminal 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 DC power to the subsequent load or battery charging.

[0145] like Figure 10 As shown, the LLC resonant circuit includes a half-bridge circuit composed of MOSFETs Q3 and Q4, a resonant capacitor C28, an LLC resonant chip U6, and a transformer T1. The source of MOSFET Q3 is connected to the drain of MOSFET Q4. The source of MOSFET Q3 is also connected to the OUT pin of the LLC resonant chip U6 and the primary winding of transformer T1. The drain of MOSFET Q3 is connected to the capacitor in the PFC boost circuit. The gate of MOSFET Q3 is connected to the HVG pin of the LLC resonant chip U6. The source of MOSFET Q4 is grounded, and the gate of MOSFET Q4 is connected to the LVG pin of the LLC resonant chip U6. The transformer T1 integrates a resonant inductor. The non-non ...

[0146] like Figure 14As shown, the PFC boost circuit includes a boost inductor L2, a freewheeling diode D4, a MOSFET 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 demagnetizing effect. The drain of the MOSFET Q1 is connected between the L2 inductor and the diode D4. The gate of the MOSFET Q1 is connected to the drive pin GD of the PFC chip U1. The source of the MOSFET Q1 is connected to ground in series and parallel with the sampling resistor R23. The CS pin of the PFC chip U1 is connected between the sampling resistor R23 and the MOSFET Q1.

[0147] like Figure 15 As shown, the input rectifier module includes: connector J1, the input terminal of 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, which is connected to a metal oxide varistor MOV1 and a gas discharge tube GDT1.

[0149] Both the gate of MOSFET Q4 and the gate of MOSFET Q3 are connected in parallel with overvoltage protection circuits.

[0150] like Figure 11 As shown, the LLC resonant circuit also includes an optocoupler U3. The emitter of the optocoupler U3 is grounded, and the collector of the optocoupler U3 is connected to the RFMIN pin of the LLC resonant chip U6 to control the output power of the secondary voltage signal. The positive and negative terminals of the optocoupler U3 are connected to the SR synchronous rectifier circuit.

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

[0152] like Figure 12 and Figure 13 As shown, the SR synchronous rectification circuit includes MOSFETs Q11 and Q12, and a synchronous rectification chip U5. The secondary winding of transformer T1 is set with a center tap, and the center tap of the secondary winding is connected to the power output terminal. The two output terminals of the secondary winding are connected to the drains of MOSFETs Q11 and Q12, respectively, and are connected to the DVS1 and DVS2 pins of the synchronous rectification chip U5, respectively. The sources of MOSFETs Q11 and Q12 are both grounded, forming a complete current loop. The gate of MOSFET Q11 is connected to the GD2 pin of the synchronous rectification chip U5, and the gate of MOSFET Q12 is connected to the GD1 pin of the synchronous rectification chip U5.

[0153] Experimental example:

[0154] The state-space equations of a ship system control process are shown below.

[0155]

[0156] B = [0.215 0] T

[0157] C = [0 1]

[0158] Using a period of t = 0.1s, the optimized time domain is N = 5.

[0159] The system has two state variables, x and y, representing the angular velocity and angular angle, respectively. The input u is the ship's rudder angle, and the output y is the angular angle. Initially, both the state variables and inputs are 0. The target angular angle output is 0.1745 radians. Specifically... Figure 2 As shown.

[0160] After the data input parameter function performs matrix operations, the trigger switch is turned on, and the controller starts running. The control input quantity u controls the state quantity 2, i.e., the heading angle, to control the target value. The specific results are as follows: Figure 3 As shown.

Claims

1. A state-space model-based optimization control method for PLC implementation, characterized by: For a control object based on a given state-space equation model, the following steps are included. (I) Obtain environmental monitoring data collected by the PLC control cabinet, initialize controller parameter functions according to offline settings, optimize the control framework based on environmental monitoring data and state space model, define state space equations, and determine equipment start-up conditions; (II) The PLC is divided into offline blocks, online blocks and function operation blocks according to the collected environmental monitoring data. The offline blocks receive offline data, the online blocks output the matrix operation function calculation 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) Construct a model based on environmental monitoring data and write it into the function block, and send the superposition operation result of the matrix operation function block into the model discretization function block to realize the discretization of the environmental state space equation; (IV) After discretizing the equations 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. The state quantity and input quantity of the controlled object are input, and the trigger switch is turned on. The controller starts to run and realizes the transmission of the action command of the controlled object. (V) The controlled object feeds back the working data to the controller's real-time calculation function block, changes the working environment parameters, repeats step (I), and realizes the PLC's system control closed loop; The state-space model optimization control framework includes a matrix addition function block, a matrix determinant operation function block, a matrix multiplication function block, a matrix exponentiation operation function block, a matrix inversion 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 block, a controller parameter data block, and a control model data block. 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. 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. The input terminals 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 state space equation type data defined by the module writing function block. The model discretization function block and the controller parameter initialization function block simultaneously receive computation data sent by the function computation module in the PLC state space model optimization control framework.

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

3. The state-space model-based optimization control method for PLC implementation according to claim 1, characterized in that: The model is written into a function block to define the state-space equation model, control dimension, state dimension, output dimension, and control period. The model discretization function block is used to discretize the state-space equations; The controller parameter initialization function block is used to initialize the optimization time domain, control weights, output weights, and feedback law matrices in the controller; The controller's real-time calculation function block is used to calculate the control quantity based on the given set value and the state feedback of the controlled object, and to perform real-time bidirectional input and output.

4. A state-space model-based optimization control system for PLC implementation, implemented based on the method described in claim 1, characterized in that: Includes the following structure, Power module; The CPU computing circuit acts as the central processing unit for matrix function operations; The offline control module receives offline settings from the device, writes them into the model function block, and determines the matrix function type; it is electrically connected to the CPU calculation circuit. The online control module connects to the offline control module and the CPU computing circuit, providing feedback on the control function results. It also includes a real-time controller calculation function block, which receives control parameters from the offline control module and the CPU computing circuit and outputs them to the controlled object.

5. The state-space model-based optimization control system for PLC implementation according to claim 4, characterized in that: The offline control module includes the following modules. The model is written into the function block, offline settings are written, the matrix function type and state space equation are determined, and it is electrically connected to the model discretization function block; The model discretization function block is used for discretizing the state-space equations and receives the parametric equations from the CPU calculation circuit. The controller parameter initialization function block is used to initialize the optimization time domain, control weights, output weights, and feedback law matrix types in the controller, and is connected to the CPU calculation circuit and offline setting module; The control model data block is written with the controller's setpoint and sent to the online control module, which is electrically connected to the online control module. The controller parameter data block is used to write the controlled object status feedback parameters, which are then sent to the online control module and electrically connected to it.

6. The state-space model-based optimization control system for PLC implementation according to claim 4, 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 based on the given set value and the state feedback of the controlled object, and output the control quantity to the controlled object.

7. The state-space model-based optimization control system for PLC implementation according to claim 4, characterized in that: The power supply module includes an input rectifier module, which adopts a bridge rectifier circuit structure to convert the input AC power into DC power. The output of the input rectifier module is electrically connected to a PFC boost circuit, and the output of the PFC boost circuit is electrically connected to an LLC resonant circuit. The LLC resonant circuit is used to improve voltage conversion efficiency and reduce switching losses through soft switching. The output of the LLC resonant circuit is electrically connected to a synchronous rectifier circuit SR, which rectifies the output of the LLC resonant circuit and provides the rectified DC power to subsequent loads or battery charging. The LLC resonant circuit includes a half-bridge circuit composed of MOSFETs Q3 and Q4, a resonant capacitor C28, an LLC resonant chip U6, and a transformer T1. The source of MOSFET Q3 is connected to the drain of MOSFET Q4. The source of MOSFET Q3 is also connected to the OUT pin of LLC resonant chip U6 and the primary winding of transformer T1. The drain of MOSFET Q3 is connected to the capacitor in the PFC boost circuit. The gate of MOSFET Q3 is connected to the HVG pin of LLC resonant chip U6. The source of MOSFET Q4 is grounded. The gate of MOSFET Q4 is connected to the LVG pin of LLC resonant chip U6. Transformer T1 integrates a resonant inductor. The non-resonant terminal of transformer T1 is connected in series with resonant capacitor C28 to ground to form an LLC current network. A filter circuit is also provided on the non-resonant terminal of transformer T1 and connected to the ISEN pin of LLC resonant chip U6 for detecting the current in the LLC circuit.

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