Air compressor control system, control method and air compressor
By using radial basis function network and particle swarm optimization algorithm in the air compressor control system, and real-time adjustments are made in combination with fuzzy control method, the problems of insufficient accuracy and poor response of traditional PID control are solved, and higher control accuracy and anti-interference ability are achieved.
Patent Information
- Application Number
- CN202510439657.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-06-06
AI Technical Summary
The existing air compressors adopt traditional PID control to have problems such as insufficient control accuracy, poor dynamic response and poor anti-interference ability.
The PID control parameters are optimized using radial basis function network and particle swarm optimization algorithm, and the fuzzy control method is used to adjust the optimized PID control parameters in real time. The air pressure parameters are obtained through the data acquisition module, the error parameters are calculated, the PID parameters are optimized, and the motor output is adjusted to achieve accurate control of the air compressor.
It improves the control accuracy of the air compressor, speeds up the dynamic response speed, enhances the anti-interference ability, and ensures the stability of the gas source.
Smart Images

Figure CN120100699A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of air compressor control, and in particular to an air compressor control system, a control method and an air compressor. Background Art
[0002] As a compressed gas power equipment widely used in the industrial field, the core function of air compressors is to compress air to a high pressure state to drive pneumatic tools, spray systems, automated production lines, etc. As the requirements for energy efficiency and equipment stability in industrial sites are increasing, air compressors need to adapt to complex and changing operating environments, including interference factors such as temperature fluctuations, humidity changes, and load mutations.
[0003] Traditional control technology mostly uses the PID (Proportional Integral Derivative) algorithm with fixed parameters. Although it can maintain basic operation, it has the problem of dynamic response lag. That is, when the environmental parameters fluctuate violently, the PID regulator is difficult to quickly adjust the speed and exhaust pressure of the compressor, resulting in frequent overshoot or undershoot of the system, affecting the stability of the gas source. Summary of the invention
[0004] The embodiments of the present invention provide an air compressor control system, a control method and an air compressor, which solve the technical problems of insufficient control accuracy, poor dynamic response and poor anti-interference ability existing in the air compressor using traditional PID control in the prior art.
[0005] An embodiment of the present invention provides an air compressor control system, which includes a data acquisition module, a control module and a power module;
[0006] The data acquisition module is electrically connected to the control module, and is used to obtain the air pressure parameters of the target air compressor at each set time interval, wherein the air pressure parameters include the target tracking pressure value and the current actual pressure value of the target air compressor;
[0007] The control module optimizes the PID control parameters based on the air pressure parameters using a radial basis function network and a particle swarm optimization algorithm, adjusts the optimized PID control parameters in real time using a fuzzy control method, determines the PID output using the adjusted PID control parameters, and controls the action of the power module based on the PID output;
[0008] The power module is used to drive the target air compressor to operate under the control of the control module.
[0009] Further, the control module includes an error calculation unit, a first optimization unit, a second optimization unit, a parameter adjustment unit and a motor control unit;
[0010] The error calculation unit calculates an air pressure error parameter based on the air pressure parameter, wherein the air pressure error parameter includes an error value, an error change rate, and a change rate of the error change rate between the target tracking pressure value and the current actual pressure value;
[0011] The first optimization unit determines the incremental value of the PID control parameter based on the air pressure error parameter using the radial basis function network, and predicts the air pressure information at the next moment;
[0012] The parameter adjustment unit adjusts the incremental value of the PID control parameter in real time based on the fuzzy control method;
[0013] The second optimization unit uses the predicted air pressure information at the next moment as a fitness function parameter, and performs global optimization on the PID control parameters based on the particle swarm optimization algorithm;
[0014] The motor control unit uses the adjusted PID output to control the action of the power module.
[0015] Furthermore, the data acquisition module includes a timer, a pressure sensor, and a temperature and humidity sensor;
[0016] The timer is used to set the set time;
[0017] The pressure sensor is used to obtain the current actual pressure value of the target air compressor at each set time interval;
[0018] The temperature and humidity sensor is used to obtain the current ambient temperature and humidity of the target air compressor in real time.
[0019] Furthermore, the power module includes a motor driver and a Hall encoder motor;
[0020] The motor driver and the Hall encoder motor are both electrically connected to the control module, and the motor driver is electrically connected to the Hall encoder motor;
[0021] The motor driver is used to drive the Hall encoder motor to work;
[0022] The Hall encoder motor is used to drive the target air compressor to operate.
[0023] Furthermore, the air compressor control system also includes a wireless communication module;
[0024] The wireless communication module is electrically connected to the control module;
[0025] The wireless communication module is used to realize the communication connection between the control module and the cloud.
[0026] Furthermore, the air compressor control system also includes a power supply module;
[0027] The power supply module is electrically connected to the control module, the power module and the wireless communication module respectively, and is used for providing electric energy.
[0028] Furthermore, the power module includes a power supply unit, a first step-down unit, and a second step-down unit;
[0029] The power supply unit is used to output a set voltage for use by the power module;
[0030] The first voltage reduction unit is used to reduce the set voltage to a voltage of 5V;
[0031] The second voltage reduction unit is used to reduce the voltage of 5V to a voltage of 3.3V for use by the control module.
[0032] Furthermore, the air compressor control system also includes a display module;
[0033] The display module is electrically connected to the control module and is used to display various status parameters of the air compressor control system.
[0034] The embodiment of the present invention further provides an air compressor control method, the control method comprising:
[0035] The air pressure parameters of the target air compressor are obtained through the data acquisition module;
[0036] Calculating air pressure error parameters based on the air pressure parameters and optimizing PID control parameters using radial basis function network and particle swarm optimization algorithm;
[0037] Use fuzzy control method to adjust the optimized PID control parameters in real time;
[0038] The PID output is determined by using the adjusted PID control parameters, and the action of the power module is controlled based on the PID output, so that the power module drives the target air compressor to act.
[0039] An embodiment of the present invention further provides an air compressor, which includes the air compressor control system described in any of the above embodiments.
[0040] The embodiment of the present invention discloses an air compressor control system, a control method and an air compressor, wherein the control system includes a data acquisition module, a control module and a power module; the data acquisition module is electrically connected to the control module, and is used to obtain the air pressure parameters of the target air compressor at each set time interval, wherein the air pressure parameters include the target tracking pressure value and the current actual pressure value of the target air compressor; the control module optimizes the PID control parameters based on the air pressure parameters using a radial basis function network and a particle swarm optimization algorithm, uses a fuzzy control method to adjust the optimized PID control parameters in real time, uses the adjusted PID control parameters to determine the PID output, and controls the action of the power module based on the PID output; the power module is used to drive the target air compressor to act under the control of the control module. The present invention optimizes the PID control parameters by using a radial basis function network and a particle swarm optimization algorithm, and uses a fuzzy control method to adjust the optimized PID control parameters in real time, thereby solving the technical problems of insufficient control accuracy, poor dynamic response and poor anti-interference ability of the air compressor using traditional PID control in the prior art, and achieves the technical effects of improving the system control accuracy, accelerating the system dynamic response speed and strengthening the system anti-interference ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a structural diagram of an air compressor control system provided by an embodiment of the present invention;
[0042] Figure 2 is a structural diagram of an RBF neural network provided by an embodiment of the present invention;
[0043] Figure 3 is a system structure diagram of a fuzzy PID controller provided by an embodiment of the present invention;
[0044] Figure 4 It is a principle diagram of a fuzzy PID controller based on PSO-RBF provided by an embodiment of the present invention;
[0045] Figure 5 is a response curve diagram provided by an embodiment of the present invention;
[0046] Figure 6 It is a structural diagram of another air compressor control system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0048] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present invention are used to distinguish different objects, rather than to limit a specific order. The following embodiments of the present invention can be implemented separately, or in combination with each other, and the embodiments of the present invention do not impose specific limitations on this.
[0049] Figure 1 It is a structural diagram of an air compressor control system provided by an embodiment of the present invention.
[0050] like Figure 1 As shown, the air compressor control system includes a data acquisition module 10 , a control module 20 and a power module 30 .
[0051] The data acquisition module 10 is electrically connected to the control module 20 and is used to obtain the air pressure parameters of the target air compressor 40 at set intervals, wherein the air pressure parameters include the target tracking pressure value and the current actual pressure value of the target air compressor 40 .
[0052] The control module 20 optimizes the PID control parameters based on the air pressure parameters using a radial basis function network and a particle swarm optimization algorithm, uses a fuzzy control method to adjust the optimized PID control parameters in real time, uses the adjusted PID control parameters to determine the PID output, and controls the action of the power module 30 based on the PID output.
[0053] The power module 30 is used to drive the target air compressor 40 to operate under the control of the control module 20 .
[0054] Specifically, the data acquisition module 10 is responsible for feeding back the environmental parameters of the target air compressor 40 to the user, and displaying them on the display screen of the system or in the cloud.
[0055] The control module 20 can use a single-chip microcomputer of model STM32F103C8T6. Specifically, STM32F103C8T6 is a 32-bit ARMCortex-M3 core microcontroller single-chip microcomputer launched by STMicroelectronics. STM32F103C8T6 integrates the ARM Cortex-M3 core and has the characteristics of high performance, low power consumption and high code density. The core supports 32-bit instruction sets and has a rich debugging and development tool chain. The clock frequency of the single-chip microcomputer can reach 72MHz, which can provide high-speed processing capabilities. It has 64KB of Flash memory and 20KB of SRAM (Static Random Access Memory), which can meet the needs of various applications.
[0056] The STM32F103C8T6 provides a variety of peripherals and interfaces, including multiple general-purpose timers, multiple serial communication interfaces, and multiple analog input and output channels. These peripherals provide flexible and diverse interface functions, enabling them to adapt to different application requirements. It also has low-power modes that can flexibly run at different power consumption levels. It also supports a variety of power management techniques, such as standby mode, sleep mode, and backup mode to maximize battery life. STMicroelectronics provides a complete development tool and ecosystem for the STM32 series. Developers can use the STM32Cube software suite, including the CubeMX configuration tool and RTOS (Real Time Operate System, real-time operating system), to support rapid code generation and project development.
[0057] The control module 20 optimizes the PID control parameters based on the air pressure parameters using a radial basis function network (RBF) and a particle swarm optimization algorithm, uses a fuzzy control method to adjust the optimized PID control parameters in real time, uses the adjusted PID control parameters to determine the PID output, and controls the action of the power module 30 based on the PID output.
[0058] Among them, the essence of RBF neural network is a nonlinear system. Due to its powerful nonlinear mapping and self-learning ability, it can effectively optimize PID parameters and improve the adaptability of the control system to complex environments, thereby making up for the deficiency of simply using PID algorithm to control the target air compressor in the traditional air compressor control system, thereby improving the overall control performance of the system. Specifically, the RBF network is mainly composed of three parts: input layer, hidden layer and output layer. The input layer is used to receive external input signals, does not perform any calculations, and only serves as an interface for data input; the hidden layer is used to perform nonlinear transformation on the input signal, which is the core part of the neural network and is responsible for learning the complex mapping relationship between input and output. The hidden layer can have one or more layers, and the number of layers and neurons depends on the specific problem; the output layer is used to output the processing results of the network, which usually corresponds to the specific goals of the problem (such as classification, regression, etc.).
[0059] Theoretically, a feedforward network with a single hidden layer can map all continuous functions. Therefore, the RBF neural network in the embodiment of the present invention adopts a three-layer structure of 1 input layer, 1 hidden layer, and 1 output layer. The network performance is affected to a certain extent by the number of nodes in the hidden layer, and the number of nodes is not the larger the better. On the one hand, the neural network requires a certain number of nodes to store all the rules in the training samples; on the other hand, too many nodes will increase the training time and reduce the efficiency and generalization ability of the network. Therefore, in order to ensure the control accuracy and combine the characteristics of the controlled object, the number of nodes in the hidden layer is designed to be 6 through simulation and experimental analysis.
[0060] In the embodiment of the present invention, the number of nodes in the input layer of the RBF neural network is designed to be 3, which are respectively the input, output and deviation of the system; the number of nodes in a hidden layer is 6; the number of nodes in the output layer is 3, which are respectively used to output the three parameter increments K for adjusting the PID controller. P , K I , K D Therefore, the structure of the RBF neural network is 3-6-3 type, such as Figure 2 As shown, Figure 2 : is a structural diagram of the RBF neural network provided by an embodiment of the present invention. Among them, the input layer receives system state information, such as the error e between the target tracking pressure value and the current actual pressure value. The hidden layer nodes are generally composed of Gaussian basis functions, and the expression of Gaussian basis functions is:
[0061]
[0062] Among them, φ i (x) represents the output result of the i-th hidden layer node, c i represents the center vector of the Gaussian basis function corresponding to the i-th hidden layer node, σ i Represents the parameter of the basis width of the i-th hidden layer node, x represents the input sample, including x of different dimensions 1 、x 2 、x 3 The hidden layer performs nonlinear transformation, transforming the input data X (the error between the target tracking pressure value and the current actual pressure value) into φ through weighted and activated function calculation. i (x). The output layer pairs φ i (x) performs linear transformation and outputs new PID control parameters y k The expression of the output layer is:
[0063]
[0064] y k Represents the output of the neural network; ω ik is the weight between the hidden layer and the output layer; p represents the number of nodes in the output layer, here p = 3.
[0065] Through two different linear transformations, not only can the running speed of the overall neural network be improved, but also its nonlinear mapping ability can be improved. In short, the basic idea of applying RBF neural network to PID parameter optimization is to use the powerful learning and approximation ability of RBF neural network to identify the dynamic characteristics of the system online, and adjust the PID control parameters in real time according to the identification results to achieve better control effect.
[0066] Fuzzy control is introduced to improve the traditional PID control, which has the problems of difficult parameter adjustment, poor adaptability, slow response speed and weak anti-interference ability. Adaptive fuzzy PID control is a nonlinear control with high stability, strong robustness and does not require an accurate mathematical model. Its working principle is to use the air pressure error and error deviation rate detected in real time during system operation, and use the quantization factor to calculate the corresponding fuzzy value to match the set fuzzy rule table, and input the proportional coefficient, integral coefficient and differential coefficient obtained by inference into the PID controller for online adjustment, so as to achieve the optimization of system control.
[0067] The design of fuzzy controller is divided into the following steps.
[0068] (1) Determine the fuzzy controller structure.
[0069] Figure 3 : is a system structure diagram of a fuzzy PID controller provided by an embodiment of the present invention, such as Figure 3 As shown in the figure, it mainly consists of two parts: a PID controller with variable parameters and a fuzzy controller. First, the three parameters of the PID controller are adjusted online through the fuzzy controller, and then the input control signal of the system is calculated by the PID controller. The specific steps are to send the pressure error e and the pressure error deviation rate ec of the controlled object into the fuzzy controller as input information, and after fuzzification, fuzzy operation, and defuzzification, the correction value △K of the three parameters of the PID controller, namely, proportional, integral, and differential, is obtained. p , △K i , △K d , and then the online adjustment control of the motor is realized through the corrected three parameters.
[0070] (2) Define the domain and fuzzy distribution of input and output quantities.
[0071] After a comprehensive analysis of the characteristics of the air compressor control system, seven fuzzy subsets are uniformly used to describe the dynamic relationship between the air pressure deviation, the deviation change rate and the control quantity, namely: "Negative Large (NB)", "Negative Middle (NM)", "Negative Small (NS)", "Zero (ZO)", "Positive Small (PS)", "Positive Middle (PM)" and "Positive Large (PB)". By adjusting the input quantization factor and the output proportional factor, the actual value range of each variable can be obtained.
[0072] To facilitate the design of membership function, these five languages are converted into the following seven fuzzy variables, namely {NB, NM, NS, ZO, PS, PM, PB}, which are respectively negative large, negative medium, negative small, zero, positive small, positive medium, and positive large. By adjusting the input quantization factor and the output scale factor, the actual value range of each variable can be obtained.
[0073] (3) Define the membership function of input and output quantities.
[0074] The membership function is the core component of the fuzzy set (F set), which fully describes the characteristics of the fuzzy set. When selecting an F set, it is necessary to define the membership function based on the actual experience and needs of each element in the domain. In this paper, the membership function of the input e and ec is a combination of Gaussian and triangular distribution. When the error and error deviation rate are large or small, the Gaussian membership function is used to obtain the maximum control amount. In the intermediate stage, in order to obtain a more accurate control amount, a triangular membership function with higher sensitivity is selected. The output quantity selects the Gaussian membership function, which has the advantages of smoothness, symmetry, and no zero point. According to the membership function, the corresponding membership can be obtained, and then combined with the fuzzy control model, the fuzzy control rule table can be obtained through fuzzy reasoning. The corrected PID parameters can be obtained by looking up the table, and the fuzzy PID control can be realized by inputting the parameters in the controller. The fuzzy reasoning method selects the widely used maximum-minimum fuzzy reasoning method, and the defuzzification method selects the centroid method.
[0075] (4) Fuzzy control rules and decision-making methods.
[0076] In order to accurately formulate the fuzzy control strategy, the two key factors of air pressure deviation and deviation change rate are comprehensively considered. First, based on the basic principle of PID control, a series of corresponding fuzzy control rules are designed. Fuzzy rules are the key to the design of fuzzy PID controller and directly determine the performance of the control system.
[0077] The following formula is used in the fuzzy rule to adjust the PID parameters:
[0078] K p =K p0 +△K p ; K i =K i0 +△K i ; K d =K d0 +△K d ;
[0079] For example, in order to make the system have better stability, accuracy and faster response speed, the fuzzy rule should be set as follows: when both e and ec are large, a larger proportional parameter K should be selected. p , smaller differential parameter K i , in order to ensure good tracking performance, the integral effect should be limited to avoid overshoot; when ec takes an intermediate value, a smaller proportional parameter K should be selected p , suitable differential parameter K d , in order to reduce the overshoot of the system; when ec is small, a larger proportional parameter K should be selected p and the integration parameter Ki , to ensure the stability of the system; at the same time, to avoid system oscillation, when ec is large, the differential parameter K d A small value should be taken.
[0080] Then, the fuzzy relationship corresponding to each rule was calculated, and △K was obtained through reasoning and defuzzification. p , △K i and △K d The fuzzy control table is shown in Table 1 below (here △K p For example). Similarly, we can also get △K i and △K d Finally, the three fuzzy control tables are stored in the single chip microcomputer, and the control quantity is adjusted in real time through the setting calculation of PID parameters, thus realizing the precise automatic control of the air pressure of the air compressor.
[0081] Table 1. △K p Fuzzy Control Table
[0082]
[0083] The basic idea of the Particle Swarm Optimization (PSO) algorithm is to find the optimal solution through collaboration and information sharing among individuals in the group. The PSO algorithm continuously updates through the speed update formula and the position update formula, and stores the individual optimal solution and the global optimal solution of each iteration. All particles adjust their speed and position according to the current individual extreme value they find and the current global optimal solution shared by the entire particle swarm, so as to obtain the overall global optimal solution.
[0084] In summary, in order to solve the problems of slow response speed, weak anti-interference ability and large overshoot of traditional PID controller, it is proposed to use PSO to tune the parameters of PID controller. By setting the air pressure to the three parameters K of PID p , K i and K d The optimization is carried out, and the air pressure at the next moment is predicted through the RBF neural network. The advance air pressure information is used as the fitness function parameter of PSO to adjust the PID parameters in advance, thereby shortening the response time. At the same time, fuzzy reasoning is used to adjust the PID parameters in real time during the control process to enhance the anti-interference ability of the control system. Figure 4 It is a principle diagram of a fuzzy PID controller based on PSO-RBF provided by an embodiment of the present invention.
[0085] like Figure 4As shown in the figure, x is the target tracking pressure value; u is the PID controller output; y is the actual output pressure; e is the error between the target tracking pressure value and the current actual pressure value. The parameters of the fuzzy PID controller of PSO-RBF are set as follows: △K p =8, △K i =1.5, △K d =0.4. In the simulation, the learning rate of the RBF neural network is 0.1, the inertia coefficient α=0.01, the initial value of the weighting coefficient is a random value, and the number of neural network sample training times is 1000. The control target is the tracking of the step signal. The simulation results show the step signal output response curves of the system under the two control modes, as shown in Figure 2. Figure 5 As shown, Figure 5 It is a response curve diagram provided by an embodiment of the present invention.
[0086] like Figure 5 As shown in the figure, curve 1 is the expected output of the control system, curve 2 is the traditional PID control output, and curve 3 is the fuzzy PID control output response curve of the PSO-RBF provided by the embodiment of the present invention. By analyzing the step response curves 1, 2, and 3 in the figure, it can be seen that for the traditional PID controller, the y in the overshoot calculation formula 2 (t p )=0,y 2 (∞)=ys=7.9,transition time ts_2=1.692(s),steady-state error ess=8-7.9=0.1。For the fuzzy PID controller using PSO-RBF, y in the overshoot calculation formula 3 (t p )=9.821,y 3 (∞)=ys=7.9, transition time ts_3=0.158(s), steady-state error ess=8-7.9=0.1.
[0087] The air compressor intelligent control processing system using the fuzzy PID controller of PSO-RBF has no overshoot, that is, σ=0 / 7.9=0, and the overshoot of the traditional PID controller is σ=(9.821-7.9) / 7.9=24.3%. It can be seen that the air compressor control system using the fuzzy PID controller of PSO-RBF has a significantly reduced system overshoot compared with the air compressor control system using the traditional PID controller. In addition, the transition time has also been further shortened. Compared with the traditional PID controller, the transition time of the fuzzy PID controller of PSO-RBF is shortened from 1.692s to 0.158s. In terms of steady-state error, both the fuzzy PID controller of PSO-RBF and the traditional PID controller maintain a small steady-state error of 0.1.
[0088] Therefore, in the embodiment of the present invention, after the air compressor control system adopts the PSO-RBF fuzzy PID controller, the system has no overshoot, the transition time is greatly shortened, and there is no oscillation, which ensures the real-time and stability of the air compressor intelligent control processing system.
[0089] The present invention optimizes PID control parameters by adopting radial basis function network and particle swarm optimization algorithm, and uses fuzzy control method to adjust the optimized PID control parameters in real time, thereby solving the technical problems of insufficient control accuracy, poor dynamic response and poor anti-interference ability of air compressors using traditional PID control in the prior art, and achieving the technical effects of improving system control accuracy, accelerating system dynamic response speed and strengthening system anti-interference ability.
[0090] Figure 6 It is a structural diagram of another air compressor control system provided by an embodiment of the present invention.
[0091] Alternatively, if Figure 6 As shown, the control module 20 includes an error calculation unit 21 , a first optimization unit 22 , a second optimization unit 23 , a parameter adjustment unit 24 and a motor control unit 25 .
[0092] The error calculation unit 21 calculates the air pressure error parameter based on the air pressure parameter, wherein the air pressure error parameter includes the error value between the target tracking pressure value and the current actual pressure value, the error change rate, and the change rate of the error change rate.
[0093] The first optimization unit 22 determines the incremental value of the PID control parameter based on the air pressure error parameter using a radial basis function network, and predicts the air pressure information at the next moment.
[0094] The parameter adjustment unit 24 adjusts the incremental value of the PID control parameter in real time based on the fuzzy control method.
[0095] The second optimization unit 23 uses the predicted air pressure information at the next moment as fitness function parameters, and performs global optimization on the PID control parameters based on the particle swarm optimization algorithm.
[0096] The motor control unit 25 controls the operation of the power module 30 using the adjusted PID output.
[0097] Specifically, the error calculation unit 21 calculates the target tracking pressure value P based on the target tracking pressure value P obtained by the data acquisition module 10. target And the current actual pressure value P actual Calculate the pressure error parameter, where the error value e = P target -P actual, error change rate ec=e(t)-e(t-1), error change rate ecc=ec(t)-ec(t-1). Input e, ec, ecc into the radial basis function network in the first optimization unit, and output the incremental value △K of the PID control parameter p , △K i and △K d . And update the PWM duty cycle output to: pwm = K p △e(t)+K i e(t)+K d △ 2 e(t); where e(t) is the error e, e(t) = P target -P actual ; △e(t) is the error change rate, △e(t)=e(t)-e(t-1); △ 2 e(t) is the rate of change of the error rate, △ 2 e(t)=△e(t)-△e(t-1).
[0098] The parameter adjustment unit 24 obtains and stores △K in advance through reasoning and defuzzification processing. p , △K i and △K d The fuzzy control table outputs △K in the first optimization unit 21 p , △K i and △K d After that, the parameter adjustment unit adjusts the parameters according to the pre-stored fuzzy control table, and adjusts the control quantity in real time through the setting calculation of PID parameters, thereby realizing accurate automatic control of the air pressure of the air compressor.
[0099] The second optimization unit 23 first initializes the particle swarm (randomly generates PID parameter combinations); second, evaluates the objective function J=0.4σ+0.3ess+0.3ts (σ is the overshoot, ess is the steady-state error, and ts is the steady-state time); third, updates the individual optimum (pBest) and the global optimum (gBest); fourth, dynamically adjusts the inertia weight and acceleration factor; fifth, iterates until convergence or the maximum number of times is reached; finally, updates the PID parameter K p , K i and K d Finally, the motor control unit 25 uses the optimal PID output to control the power module 30 to operate.
[0100] Alternatively, if Figure 6 As shown, the data acquisition module 10 includes a timer 11, a pressure sensor 12 and a temperature and humidity sensor 13;
[0101] The timer 11 is used to set a set time; the pressure sensor 12 is used to obtain the current actual pressure value of the target air compressor 40 at each set time interval; the temperature and humidity sensor 13 is used to obtain the current ambient temperature value and the current ambient humidity value of the target air compressor 40 in real time.
[0102] Specifically, the timer 11 can select TIM3, and use TIM3 to set the encoder interval setting time in advance, such as the target tracking pressure value measured at an interval of 20ms, recorded as P target The timer is used to interrupt every 20ms to read the current actual pressure value P actual .
[0103] The pressure sensor 12 can choose BMP280, and the temperature and humidity sensor 13 can choose AHT20. BMP280 is a high-precision air pressure and temperature sensor, which is usually used for meteorological observation, flight control, and atmospheric pressure and altitude measurement of outdoor equipment. The sensor uses piezoresistive technology to measure air pressure, and has temperature detection capability, which can provide accurate temperature compensation to enhance the accuracy of air pressure measurement. AHT20 is a temperature and humidity sensor with calibrated digital signal output, which is commonly used in various applications that require environmental temperature and humidity data monitoring. It integrates a capacitive humidity sensor and a temperature sensor, and can directly output digital relative humidity and temperature values through a simple serial interface. BMP280 and AHT20 sensors are widely used, providing key data support from weather forecasting to intelligent building management to agricultural and industrial process control. Integrating the two into the same data acquisition module 10 makes the module more concise and highly programmable.
[0104] Alternatively, if Figure 6 As shown, the power module 30 includes a motor driver 31 and a Hall encoding motor 32; the motor driver 31 and the Hall encoding motor 32 are both electrically connected to the control module 20, and the motor driver 31 is electrically connected to the Hall encoding motor 32; the motor driver 31 is used to drive the Hall encoding motor 32 to work; the Hall encoding motor 32 is used to drive the target air compressor 40 to operate.
[0105] Specifically, the motor driver 31 controls the speed and torque of the motor by controlling the current or voltage. The L298 motor driver can be selected. The motor driver is an integrated circuit for controlling the speed and direction of the motor. The power supply voltage is 2V to 10V. It can drive two DC motors or a stepper motor, and can realize the functions of forward and reverse rotation and speed regulation. Each current can reach 1.5A continuous current, and the peak current can reach 2.5A. It has thermal protection and can automatically recover. The motor driver 31 converts electrical energy into mechanical energy in the system, thereby promoting the operation of the equipment. It is not only responsible for the effective conversion of energy, but also involves multiple aspects such as control, regulation, and energy feedback, which plays an important role in improving the overall performance and efficiency of the system.
[0106] The Hall encoder motor 32 can choose MG310, which is a motor with a Hall encoder that can provide accurate position and speed feedback. The MG310 motor outputs position information through a built-in Hall encoder. The Hall encoder usually uses the Hall effect principle to determine the position and speed of the motor shaft by detecting changes in the magnetic field. This type of encoder can provide higher accuracy and stability. It is often used in applications that require precise control, such as robots, automation equipment, precision instruments, etc., because they can provide accurate motion feedback, allowing the control system to perform precise motion control and adjustment. Compared with photoelectric encoders, Hall encoders have improved stability and anti-interference capabilities. The MG310 Hall encoder motor is a high-performance motor suitable for occasions requiring precise motion control. Through correct programming and use, precise management and control of motor motion can be achieved.
[0107] Alternatively, if Figure 6 As shown, the air compressor control system also includes a wireless communication module 50; the wireless communication module 50 is electrically connected to the control module 20; the wireless communication module 50 is used to realize the communication connection between the control module 20 and the cloud.
[0108] Specifically, the wireless communication module 50 can select ESP-01S, which is a Wi-Fi module based on the ESP8266 chip, which is widely used in the Internet of Things and embedded applications. It supports the 802.11b / g / nWi-Fi protocol, enabling the device to connect to a wireless network. The module also has a built-in Tensilica L106 micro MCU that can handle the logic and network operations of the module. At the same time, it includes a high-speed cache memory, ADC (analog-to-digital converter), UART (universal asynchronous receiver / transmitter), GPIO (general purpose input and output port), PWM (pulse width modulation), etc. ESP-01S is a powerful and widely used Wi-Fi module, especially suitable for Internet of Things projects and applications that require remote control.
[0109] The wireless communication module 50 converts the serial port into a wireless signal that complies with the WiFi wireless network communication standard. This allows traditional hardware devices to directly connect to the Internet through WiFi by embedding the WiFi module, thereby realizing wireless intelligent Internet of Things applications. This module greatly expands the functions and application scenarios of the device by providing flexible wireless connection and high-speed data transmission capabilities.
[0110] The cloud can be used as a host computer to process and monitor the data uploaded by the air compressor control system. Its functions include:
[0111] (1) Real-time monitoring and remote management: By uploading system data to the cloud, users can access the data through the network anytime and anywhere, realizing real-time monitoring and remote management of the system. This is very useful for remote equipment monitoring, fault diagnosis, and remote operation.
[0112] (2) Data analysis and mining: After uploading system data to the cloud, you can use the various data analysis and mining tools provided by the cloud to analyze the data, thereby discovering patterns, trends, and anomalies in the data and providing support for business decision-making.
[0113] (3) Fault prediction and preventive maintenance: By analyzing system data, abnormal conditions in system operation can be discovered, thereby predicting possible faults and taking corresponding preventive measures to reduce losses and downtime caused by faults.
[0114] (4) Resource optimization and energy conservation and emission reduction: By analyzing system data, we can understand the efficiency and energy consumption of system operation, thereby optimizing resource allocation, improving energy utilization efficiency, and reducing energy consumption and emissions.
[0115] Alternatively, if Figure 6 As shown, the air compressor control system further includes a power module 60; the power module 60 is electrically connected to the control module 20, the power module 30, and the wireless communication module 50 respectively, for providing electrical energy.
[0116] Optionally, the power supply module 60 includes a power supply unit, a first step-down unit, and a second step-down unit; the power supply unit is used to output a set voltage for use by the power module 30; the first step-down unit is used to reduce the set voltage to a voltage of 5V; the second step-down unit is used to reduce the voltage of 5V to a voltage of 3.3V for use by the control module 20.
[0117] Specifically, the power supply unit may select two 4V batteries to form an 8V power supply, or other power supply devices may be selected.
[0118] The first step-down unit can be selected as TPS5450, which is a step-down switching regulator belonging to the TPS5410 ~ TPS5450 series, among which TPS5450 is an 8V-5V step-down module. This series of regulators is suitable for a wide input voltage range, from 5.5V to 36V, and can provide an output current of 1A to 5A. Such characteristics make it very suitable for electronic systems that require different input power supplies and power requirements. As a switching regulator, TPS5450 has the characteristics of high efficiency and compact size, which is very critical for applications with limited space and low power consumption. In addition, it may also have good thermal performance and electromagnetic compatibility. Switching regulators regulate voltage through high-speed switching and use inductors and capacitors to smooth the output voltage. Compared with traditional linear regulators, switching regulators usually have advantages in efficiency, especially when the difference between input and output voltages is large. In general, TPS5450 is a high-efficiency and adaptable power management device that is very suitable for a variety of consumer electronic products that require stable power.
[0119] The second step-down unit can be TLV1117, which is a low dropout (LDO) linear regulator. It is part of the popular TLV1117 series of regulators and is particularly suitable for applications that require ultra-low quiescent current. It can be used as the 5V-3.3V step-down module required by the embodiment of the present invention. The TLV1117 device has extremely low power consumption, which can be as low as 500 times compared to the traditional 1117 regulator. The step-down module is a high-performance, low-power, and stable linear regulator, which is particularly suitable for electronic applications that require ultra-low quiescent current and low voltage drop characteristics.
[0120] Optionally, the air compressor control system further includes a display module; the display module is electrically connected to the control module, and is used to display various status parameters of the air compressor control system.
[0121] Specifically, the display module plays a key role in information display and user interaction in the system, converting information such as the air pressure inside the system into visually recognizable images or text, allowing users to intuitively understand system status, data content and other information.
[0122] In an embodiment of the present invention, a thin film transistor liquid crystal display (TFT-LCD) can be used. The TFT-LCD display screen is composed of a liquid crystal layer, a thin film transistor, a backlight, and a color filter. The liquid crystal layer is composed of a liquid crystal material sandwiched between two parallel glass plates. The arrangement of liquid crystal molecules is controlled by an electric field, which can change the propagation path of light and realize the switching of pixels. The thin film transistor (TFT) acts as a switch for the pixel, controlling the flow of current to the liquid crystal layer, thereby controlling the brightness and color of the pixel. The backlight is used to illuminate the liquid crystal layer to display an image. Common backlight sources include cold cathode fluorescent lamps (CCFL) and LEDs. The color filter is used to adjust the white light emitted by the backlight to produce different colors.
[0123] TFT-LCD has high resolution and clarity, which can achieve high-resolution image display, as well as high pixel density, providing clear and sharp images. At the same time, compared with traditional CRT displays, TFT-LCD has lower power consumption because it does not require a large number of electron beams to scan the screen. TFT-LCD usually has a wide viewing angle, and users can watch the screen from different angles without color distortion or brightness loss.
[0124] Optionally, the air compressor control system further includes an indication module; the indication module is electrically connected to the control module and is used to indicate the working state of the air compressor control system.
[0125] Specifically, the indication module includes an indicator light and a buzzer. The indicator light provides a visual signal to help the user understand whether the system is working properly or whether there are any abnormal conditions that need attention. The embodiment of the present invention uses a passive buzzer, which can be controlled by controlling the high and low levels of the IO port after power is supplied, and it provides an auditory signal or warning by emitting a sound.
[0126] When the air compressor control system switches to different working modes by key or cloud control, different LED indicators will light up according to different working modes. If this mode reaches the alarm state, the buzzer will sound to remind the user. This module provides users with status information, which is easy to understand and observe.
[0127] The control effect of the air compressor control system provided by the embodiment of the present invention is verified by a specific embodiment below.
[0128] For example, to verify the control effect of the air compressor control system, all modules used by the air compressor control system must be initialized first, that is, the system is connected to the cloud via WIFI. The main loop in the control module determines the current mode of the air compressor control system, and performs different processing controls according to the different requirements of users in different modes, continuously displays various parameters on the LCD screen and uploads them to the cloud, so that online remote monitoring can be carried out.
[0129] Specifically, the air compressor control system has three different working modes, namely manual control mode, intelligent control mode and self-check mode. There are corresponding target tracking pressure values in the three modes. If the air pressure tracking effect has not been completed at this moment and is being gradually adjusted, it is in a working state, the blue light is on, and the buzzer is off; if the target tracking pressure value has been reached at this moment, that is, the air pressure is stable within a certain error, it is in a stable state, the green light is on, and the buzzer is off; if the air pressure value exceeds the threshold, it is in an alarm state, the red light is on, and the buzzer is on. If it is not adjusted in time in the alarm state, the motor will automatically shut down and report the reason through the screen. In the main loop, the configuration of the entire system is completed by continuously obtaining information, mode judgment, equipment operation, and feedback adjustment.
[0130] Among them, the manual control mode can manually select the target tracking pressure value through the control buttons KEY1 and KEY2 of the air compressor control system, and press KEY3 to confirm. The pressure required by the user is selected through manual experience. Table 2 shows the test results of the manual control mode.
[0131] Table.2 Test results of manual control mode
[0132]
[0133] According to the test results, after the user confirms the target tracking pressure value, the system starts working quickly. In about 2 seconds, the system gradually tracks the air pressure to the expected air pressure and remains stable within the error range of the expected air pressure. It can be seen that the system is highly stable and can quickly meet user needs.
[0134] In the intelligent control mode, the required air pressure can be intelligently determined based on the user's general expectations and environmental factors such as the temperature and humidity of the environment, while constantly obtaining the latest data and changing the user's indicators. The method of controlling air pressure is similar to that of the manual control mode. The test results are shown in Table 3.
[0135] Table.3 Intelligent control mode test results
[0136] Temperature(℃) Humidity (RH) Target tracking pressure value (Pa) 21.6 45.2 94702.6 23.5 47.1 96385.4 25.5 43.6 99135.4 26.3 51.9 101386.2 29.1 53.5 97810.7 31.4 49.2 115578.9
[0137] According to the test results, it can be found that different temperature and humidity combinations are not simply proportional or inversely proportional to the corresponding target tracking pressure value, but the expected air pressure is changed by the user's usage habits and preferences. After determining the target tracking pressure value, the system starts working.
[0138] In the self-check mode, when unexpected conditions or certain interference occur, or when one or more indicators exceed or fall below the threshold, whether it is too high or too low, it may cause irreversible damage to the system. Therefore, the self-check mode can first put the system into a shutdown state, and briefly turn on the LED light and buzzer to remind the user after the parameters return to normal, and test various functions, and finally operate normally. The test results are shown in Table 4, where 1 in the indicator module represents on and 2 represents off.
[0139] Table.4 Self-test mode test results
[0140] Time(s) Temperature(℃) Humidity (RH) Real-time air pressure (Pa) Indicator module 0 32.7 64.2 85702.6 0 1 31.1 59.1 88462.3 0 2 30.8 53.7 94187.1 0 3 28.5 48.5 97836.5 1 4 27.6 46.4 98307.4 0 5 28.2 46.2 98645.9 0
[0141] The self-check function is an essential part of the system. It can correct unexpected errors in a timely manner and improve the overall effectiveness and completeness of the system.
[0142] The embodiment of the present invention further provides an air compressor control method, which specifically includes the following steps:
[0143] The air pressure parameters of the target air compressor are obtained through the data acquisition module; the air pressure error parameters are calculated based on the air pressure parameters, and the PID control parameters are optimized using the radial basis function network and the particle swarm optimization algorithm; the optimized PID control parameters are adjusted in real time using the fuzzy control method; the PID output is determined using the adjusted PID control parameters, and the power module action is controlled based on the PID output, so that the power module drives the target air compressor to act.
[0144] The air compressor control system provided in the embodiment of the present invention has the same technical features as the air compressor control method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0145] An embodiment of the present invention further provides an air compressor, which includes the air compressor control system in any of the above embodiments.
[0146] The air compressor provided in the embodiment of the present invention includes the air compressor control system in the above embodiment. Therefore, the air compressor provided in the embodiment of the present invention also has the beneficial effects described in the above embodiment, which will not be repeated here.
[0147] In the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0148] Finally, it should be noted that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. An air compressor control system, characterized in that: The air compressor control system includes a data acquisition module, a control module and a power module; The data acquisition module is electrically connected to the control module, and is used to obtain the air pressure parameters of the target air compressor at each set time interval, wherein the air pressure parameters include the target tracking pressure value and the current actual pressure value of the target air compressor; The control module optimizes the PID control parameters based on the air pressure parameters using a radial basis function network and a particle swarm optimization algorithm, adjusts the optimized PID control parameters in real time using a fuzzy control method, determines the PID output using the adjusted PID control parameters, and controls the action of the power module based on the PID output; The power module is used to drive the target air compressor to operate under the control of the control module.
2. The air compressor control system according to claim 1, characterized in that: The control module includes an error calculation unit, a first optimization unit, a second optimization unit, a parameter adjustment unit and a motor control unit; The error calculation unit calculates an air pressure error parameter based on the air pressure parameter, wherein the air pressure error parameter includes an error value, an error change rate, and a change rate of the error change rate between the target tracking pressure value and the current actual pressure value; The first optimization unit determines the incremental value of the PID control parameter based on the air pressure error parameter using the radial basis function network, and predicts the air pressure information at the next moment; The parameter adjustment unit adjusts the incremental value of the PID control parameter in real time based on the fuzzy control method; The second optimization unit uses the predicted air pressure information at the next moment as a fitness function parameter, and performs global optimization on the PID control parameters based on the particle swarm optimization algorithm; The motor control unit uses the adjusted PID output to control the action of the power module.
3. The air compressor control system according to claim 1, characterized in that: The data acquisition module includes a timer, a pressure sensor and a temperature and humidity sensor; The timer is used to set the set time; The pressure sensor is used to obtain the current actual pressure value of the target air compressor at each set time interval; The temperature and humidity sensor is used to obtain the current ambient temperature and humidity of the target air compressor in real time.
4. The air compressor control system according to claim 1, characterized in that: The power module includes a motor driver and a Hall encoder motor; The motor driver and the Hall encoder motor are both electrically connected to the control module, and the motor driver is electrically connected to the Hall encoder motor; The motor driver is used to drive the Hall encoder motor to work; The Hall encoder motor is used to drive the target air compressor to operate.
5. The air compressor control system according to claim 1, characterized in that: The air compressor control system also includes a wireless communication module; The wireless communication module is electrically connected to the control module; The wireless communication module is used to realize the communication connection between the control module and the cloud.
6. The air compressor control system according to claim 5, characterized in that: The air compressor control system also includes a power module; The power supply module is electrically connected to the control module, the power module and the wireless communication module respectively, and is used for providing electric energy.
7. The air compressor control system according to claim 6, characterized in that: The power supply module includes a power supply unit, a first step-down unit, and a second step-down unit; The power supply unit is used to output a set voltage for use by the power module; The first voltage reduction unit is used to reduce the set voltage to a voltage of 5V; The second voltage reduction unit is used to reduce the voltage of 5V to a voltage of 3.3V for use by the control module.
8. The air compressor control system according to claim 1, characterized in that: The air compressor control system also includes a display module; The display module is electrically connected to the control module and is used to display various status parameters of the air compressor control system.
9. An air compressor control method, characterized in that: The control method comprises: The air pressure parameters of the target air compressor are obtained through the data acquisition module; Calculating air pressure error parameters based on the air pressure parameters and optimizing PID control parameters using radial basis function network and particle swarm optimization algorithm; Use fuzzy control method to adjust the optimized PID control parameters in real time; The PID output is determined by using the adjusted PID control parameters, and the action of the power module is controlled based on the PID output, so that the power module drives the target air compressor to act.
10. An air compressor, characterized in that: The air compressor comprises the air compressor control system according to any one of claims 1 to 8.
Citation Information
Cited By
Method for intelligently adjusting and controlling power of screw air compressor
CN120402370A