Exponential closed-loop control method
Technical Field
The invention relates to the technical field of automatic control, in particular to an exponential closed-loop control method.
Background
The automatic control technology almost permeates various application fields of national economy and various aspects of social life, and is widely applied to various fields such as industrial and agricultural production, transportation, aerospace, household appliances and the like. In order to realize various complex control tasks, firstly, controlled objects and control devices are connected in a certain mode to form an organic whole, namely an automatic control system. In an automatic control system, the output quantity of a controlled object, i.e. a controlled quantity, is a physical quantity which needs to be strictly controlled, and can be required to be kept at a certain constant value, such as temperature, flow, liquid level, or pressure; the control device is a general mechanism for exerting control action on a controlled object, and can control the controlled object by adopting different principles and modes, but the most basic one is an automatic control technology based on closed-loop control.
Referring to fig. 1, a classical closed-loop control system is shown, in which an output quantity is directly or indirectly fed back to an input end to form a closed loop, and a system for realizing automatic control is called a closed-loop control system. The automatic control system is an automatic control system which is a closed loop formed by a signal forward path and a feedback path and is also called as a feedback control system. The traditional closed-loop control system generally comprises a comparator, a controller, an actuator, a controlled object and a feedback link, wherein a PID (proportion-integral-derivative) controller (proportional-integral-derivative) controller is selected in the general industrial automatic control, but the PID controller has the problems of parameter adjustment trouble, oscillation, overshoot and the like, and the system performance analysis and design are troublesome.
Disclosure of Invention
Aiming at the problems, the invention provides an exponential closed-loop control method, aiming at effectively solving the problems of complex parameter adjustment, poor self-adaptive capacity, serious overshoot and the like in the conventional closed-loop control.
The invention adopts the following technical scheme:
an exponential type closed-loop control method, comprising the steps of:
s1, collecting variable data, including: a given quantity Sp, a feedback quantity Pv, an output quantity c, an error e, an exponential cycle a and an exponential coefficient b;
s2, assigning initial values to the exponential cycle a, the exponential coefficient b and the error e to complete system initialization, and assigning values to the given quantity Sp;
s3, calculating by using an exponential operator according to the variable data to obtain a process quantity m; the exponential operator obtains a process quantity m through the following calculation formula:
m=1/(1+exp(a-b*i))
the exponential period a in the formula is a time constant and is dimensionless; the exponential coefficient b is an acceleration coefficient and is dimensionless;
and S4, sending the process quantity m to different actuators for control according to different physical characteristics of different controlled objects, and outputting an output quantity c to control the controlled object until the closed-loop control operation is finished when the absolute value of the deviation i is less than or equal to the error e.
Preferably, the exponent operator is one of a 32-bit DSP or MCU with an embedded hardware multiplier.
Preferably, the deviation i is a difference between the given amount Sp and the feedback amount Pv.
The invention has the beneficial effects that:
1. the invention adopts the index arithmetic unit to replace a PID controller in the traditional closed-loop control system, can effectively reduce the phenomenon of step-out (overshoot) or locked rotor of the actuating mechanism, and has high control precision.
2. The exponential arithmetic unit outputs an exponential acceleration curve and has the characteristics of optimal time and simple operation.
3. The exponential acceleration curve conforms to the characteristic that the moment of the actuating mechanism increases along with the increase of the speed, the effective moment of the actuating mechanism is fully utilized, and meanwhile, the mechanical impact can be weakened (the larger the deviation is, the larger the speed is, and the smaller the deviation is, the smaller the speed is).
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings of the embodiments will be briefly described below, and it is apparent that the drawings in the following description only relate to some embodiments of the present invention and are not limiting on the present invention.
FIG. 1 is a schematic diagram of a classical closed-loop control system;
FIG. 2 is a schematic diagram of a closed loop control system of the present invention;
fig. 3 is a schematic diagram of the output position and speed curves (a is 5, and b is 0.5) of the present invention;
fig. 4 is a schematic diagram of the output position and speed curves (a is 10, and b is 0.5) of the present invention;
fig. 5 is a schematic diagram of the output position and speed curves (a is 2.5, and b is 0.5) of the present invention;
fig. 6 is a schematic diagram of the output position and speed curves (a is 5, b is 2) of the present invention;
fig. 7 is a schematic diagram of the output position and speed curves (a is 5, and b is 0.2) of the present invention;
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the drawings of the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the invention without any inventive step, are within the scope of protection of the invention.
Unless otherwise defined, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The use of the word "comprising" or "comprises", and the like, in this disclosure is intended to mean that the elements or items listed before that word, include the elements or items listed after that word, and their equivalents, without excluding other elements or items. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
The invention is further illustrated with reference to the following figures and examples.
As shown in fig. 1 to 7, an exponential type closed-loop control method includes the following steps:
s1, collecting variable data, including: a given quantity Sp, a feedback quantity Pv, an output quantity c, an error e, an exponential cycle a and an exponential coefficient b; the above parameters are selected according to different control targets, and the units in this embodiment are dimensionless.
TABLE 1 parameter table of exponential arithmetic unit
S2, initializing the exponent period a, the exponent coefficient b, and the error e to complete system initialization, where a is 5, b is 0.5, and e is 0.1, as shown in table 1;
in order to meet the control target requirement, a given quantity Sp is assigned, as shown in Table 1, the given quantity Sp is 30, and a deviation i is obtained through the difference between the given quantity Sp and a feedback quantity Pv; in an automatic control system, a process of returning an output quantity to an input end through a detection device (a sensor or the like) and comparing the output quantity with an input quantity is a feedback process. The actuating mechanism can be an electrically controlled valve body, a speed-adjustable motor, a heating device and the like; the sensor corresponds to the control amount, and may be a pressure sensor, a flow sensor, a speed sensor, a position sensor, a temperature sensor, or the like.
S3, sending the deviation i into an index arithmetic unit according to the variable data, and calculating by using the index arithmetic unit to obtain a process quantity m; the exponential operator obtains a process quantity m through the following calculation formula:
m=1/(1+exp(a-b*i))
the exponential period a in the formula is a time constant and is dimensionless; as shown in fig. 3 to 5, the larger the exponential cycle a (b is constant), the shorter the speed adjustment cycle (speed curve, t becomes smaller when t is 6, t is 4, and t is 7, respectively), otherwise, the longer the adjustment cycle is; the smaller the maximum value of the position curve (the smaller the value of the feedback amount Pv), and vice versa. The exponential coefficient b is an acceleration coefficient and is dimensionless; as shown in fig. 3, fig. 6 and fig. 7, the larger the index coefficient b is, the longer the speed adjustment period is (the speed curve, t becomes smaller when t is 6, t is 8 and t is 2, respectively), and conversely, the shorter the adjustment period is; the maximum value of the position curve (the larger the value of the feedback amount Pv) is, and vice versa.
The exponent arithmetic unit is a 32-bit DSP or MCU with a built-in hardware multiplier, and the model selected in the embodiment is an MCU of XMC4800 of England flying. The actuator adopts a Gold Due series low-voltage integrated servo motor of Israel Ermo. The sensor employs ACS712ELCTR-30A-T of the Current sensor Allegro corporation.
And S4, sending the process quantity m to different actuators for control according to different physical characteristics of different controlled objects, outputting an output quantity c to control the controlled object, converting the operation condition of the controlled object into a feedback quantity Pv after being collected by a sensor, and ending the operation of closed-loop control until the absolute value of the deviation i is less than or equal to the error e.
As shown in fig. 3 to 7, the position curve in the graph is a feedback quantity Pv parameter output curve, the speed curve is an output quantity c parameter curve, and the speed (output quantity c) change is larger when the deviation (feedback quantity Pv) change is larger, and the speed change is smaller when the deviation change is smaller (when the actuator is closer to the controlled object), which indicates that the response speed of the actuator is higher and the overshoot is smaller in the closed-loop control system, thereby ensuring the stable operation of the actuator.
Although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.