CN112564559A - Stepping motor driver based on fuzzy PID current loop control - Google Patents
Stepping motor driver based on fuzzy PID current loop control Download PDFInfo
- Publication number
- CN112564559A CN112564559A CN202011380588.XA CN202011380588A CN112564559A CN 112564559 A CN112564559 A CN 112564559A CN 202011380588 A CN202011380588 A CN 202011380588A CN 112564559 A CN112564559 A CN 112564559A
- Authority
- CN
- China
- Prior art keywords
- fuzzy
- deviation
- control
- pid
- change rate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000013139 quantization Methods 0.000 claims abstract description 11
- 238000000034 method Methods 0.000 claims description 15
- 238000005070 sampling Methods 0.000 claims description 8
- 230000000694 effects Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000013178 mathematical model Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000009699 differential effect Effects 0.000 description 1
- 230000010355 oscillation Effects 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P8/00—Arrangements for controlling dynamo-electric motors rotating step by step
- H02P8/12—Control or stabilisation of current
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B11/00—Automatic controllers
- G05B11/01—Automatic controllers electric
- G05B11/36—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
- G05B11/42—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential for obtaining a characteristic which is both proportional and time-dependent, e.g. P. I., P. I. D.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Power Engineering (AREA)
- Feedback Control In General (AREA)
Abstract
The invention discloses a stepping motor driver based on fuzzy PID current loop control, which comprises the following control steps: s1: determining input variables and output variables of the fuzzy controller and the variation range of the input variables; wherein the input variables include a deviation E, a deviation change rate EC; s2: determining the quantization grade, quantization factor and scale factor of the fuzzy control through setting; s3: and (3) obtaining a fuzzy control table: respectively obtaining a fuzzy control table of a proportional coefficient Kp, an integral time constant Ki and a differential time constant Kd according to the input value and the output value; s4: calculating a fuzzy control output value; s5: calculating a fuzzy PID control output value: substituting the deviation E and the deviation change rate EC into a fuzzy control table to obtain fuzzy PID parameters Kp ', Ki' and Kd ', and substituting Kp', Ki 'and Kd' into a PID algorithm to calculate a fuzzy PID control output value.
Description
Technical Field
The invention relates to the field of motor drivers, in particular to a stepping motor driver based on fuzzy PID current loop control.
Background
The traditional PID control is based on an accurate mathematical model, can not effectively deal with uncertain information of a system, and cannot achieve a better control result by using unchanging PID parameters. The fuzzy control does not need an accurate mathematical model of an object, and is insensitive to system change, good in robustness and strong in anti-interference performance. But the steady state accuracy is not good due to its ambiguity.
Disclosure of Invention
The invention aims to provide a stepping motor driver based on fuzzy PID current loop control.
In order to achieve the purpose of the invention, the technical scheme adopted by the invention is as follows: a stepping motor driver based on fuzzy PID current loop control comprises the following control steps:
s1: determining input variables and output variables of the fuzzy controller and the variation range of the input variables;
wherein the input variables include a deviation E, a deviation change rate EC;
s2: determining the quantization grade, quantization factor and scale factor of the fuzzy control through setting;
s3: and (3) obtaining a fuzzy control table: respectively obtaining a fuzzy control table of a proportional coefficient Kp, an integral time constant Ki and a differential time constant Kd according to the input value and the output value;
s4: calculating a fuzzy PID control output value: substituting the deviation E and the deviation change rate EC into a fuzzy control table to obtain fuzzy PID parameters Kp ', Ki' and Kd ', and substituting Kp', Ki 'and Kd' into a PID algorithm to calculate a fuzzy PID control output value:
kp is a proportional coefficient, Ki is an integral coefficient, Kd is a differential coefficient, E (k) and E (k-1) are deviation signals at the k-th time and the k-1-th time respectively, k is a sampling serial number, and T is sampling time.
Preferably, the step S2 includes the following setting substeps:
s21: determining a fuzzy subset of deviation E and deviation change rate EC through the membership degree;
s22: introducing discourse domains corresponding to fuzzy subsets of deviation E and deviation change rate EC;
s23: a quantization function is derived.
The beneficial effects of the invention are concentrated and expressed as follows: the invention can effectively solve the problems of nonlinearity, interference and the like of a current control system of the stepping motor, and can realize automatic parameter change along with the change of the environment so as to achieve better control effect. And secondly, the driver runs stably, the current waveform is stable, the driver is accurately positioned, and various production costs are effectively saved.
Drawings
FIG. 1 is a control flow diagram of the present invention;
FIG. 2 is a block diagram of the control system of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood by those skilled in the art, the present invention will be further described in detail with reference to the accompanying drawings and specific embodiments.
As shown in fig. 1 and 2, a stepper motor driver based on fuzzy PID current loop control comprises the following control steps:
s1: determining input variables and output variables of the fuzzy controller and the variation range of the input variables;
the input variables comprise deviation E, deviation change rate EC, input current and subdivision number of the motor, and proportion, integral and differential of motor setting; the input current and the subdivision number are determined by a dial switch, namely the dial switch can be used for adjusting the input current value of the driver; the proportion, the integral and the derivative are changed based on a set value from a determined basic value;
s2: determining the quantization grade, quantization factor and scale factor of the fuzzy control through setting;
specifically, step S2 includes the following tuning substeps:
s21: determining fuzzy subsets of deviation E and deviation change rate EC according to the membership degree, wherein the fuzzy subsets of deviation E and deviation change rate EC are { NB, NM, NS, ZO, PS, PM, PB }, wherein negative large [ NB ], negative middle [ NM ], negative small [ NS ], zero [ ZO ], positive small [ PS ], positive middle [ PM ] and positive large [ PB ];
the degree of membership is a value between 0 and 1, the degree of membership having the following relationship:
1. when a certain element u belongs to the set A, the element membership degree is 1;
2. when a certain element u does not belong to the set A, the membership degree of the element is 0;
3. when a certain element u belongs to the set A in part and does not belong to the set A in part, the membership degree of the element u to the A is a certain number in an open interval (0, 1);
s22: introducing a domain corresponding to the fuzzy subset of the deviation E and the deviation change rate EC, wherein the domain range is composed of the resistance and the inductance of various types of motors, and the domain is defined as follows in the embodiment: -6, -5, -4, -3, -2, -1, 0,1, 2, 3, 4, 5, 6 };
s23: and (3) obtaining a quantitative function of the deviation E and the deviation change rate EC: in FIG. 2, the measured signal of the current has a range of ranges, denoted as Vmax and Vmin, so the range of the deviation E is from Vmin-Vmax to Vmax-Vmin, and the incremental range of the deviation is twice as large:
the deviation E quantization function is then:
the quantitative function of the rate of change of deviation EC is:
e and EC can be quantified according to equation (1) and equation (2).
In the formula (3), Kp is a proportional coefficient, Ki is an integral coefficient, Kd is a differential coefficient, E (k) and E (k-1) are deviation signals at the k-th time and the k-1-th time respectively, k is a sampling serial number, and T is sampling time;
s3: and (3) obtaining a fuzzy control table: respectively obtaining a fuzzy control table of a proportional coefficient Kp, an integral time constant Ki and a differential time constant Kd according to the input value and the output value;
in a PID controller, the value of Kp is selected depending on the response speed of the system. Increasing Kp can improve the response speed and reduce the steady-state deviation; however, an excessive value of Kp may cause a large overshoot, and even decreasing Kp to make the system unstable may reduce overshoot and improve stability, but an insufficient value of Kp may slow down the response speed and prolong the adjustment time. Therefore, the initial adjustment stage should properly take a larger Kp value to improve the response speed, and in the middle adjustment stage, the Kp value should take a smaller value to ensure that the system has smaller overshoot and a certain response speed is ensured; and the Kp value is adjusted to a larger value at the later stage of the adjusting process to reduce the static difference and improve the control precision. The fuzzy control table defining Kp in this embodiment is therefore as follows:
kp fuzzy control table
In the system control, the integral control is mainly used for eliminating the steady-state deviation of the system. For some reasons (e.g., saturation non-linearity, etc.), the integration process may produce integral saturation early in the tuning process, thereby causing a large overshoot of the tuning process.
Therefore, in the early stage of the adjusting process, in order to prevent integral saturation, the integral effect should be weaker, and even zero can be taken;
in the middle stage of regulation, in order to avoid affecting stability, the integral action is moderate;
finally, at the end of the process, the integration should be enhanced to reduce the adjustment dead band.
From the above analysis, therefore, the Ki fuzzy control table is defined as follows in this embodiment:
ki fuzzy control table
The adjustment of the differential link is mainly introduced aiming at the process of large inertia, and the coefficient of the differential link has the function of changing the dynamic characteristic of the system. The differential link coefficient of the system can reflect the trend of signal change, and an effective early correction signal can be introduced into the system before the change of a deviation signal is too large, so that the response speed is accelerated, the adjustment time is shortened, the oscillation is eliminated, and finally the dynamic performance of the system is changed.
Therefore, the choice of Kd values has a large influence on the regulation dynamics. The Kd value is too large, the braking in the adjusting process is advanced, and the adjusting time is too long; with too small a Kd value, the braking will lag behind during the adjustment process, resulting in increased overshoot. According to the experience of the actual process, the differential action is increased at the initial stage of regulation, so that the overshoot is reduced or even avoided;
in the middle stage, the Kd value should be small and should be kept constant, since the regulation characteristic is sensitive to the change of the Kd value;
then, in the later stages of the regulation, the Kd value should be reduced to reduce the braking effect of the controlled process and thus compensate for the prolonged period of the regulation process caused by the larger Kd value in the early stages of the regulation process.
From the above analysis, the Kd fuzzy control table is thus defined in this embodiment as follows:
kd fuzzy control table
S4: calculating a fuzzy PID control output value: substituting the deviation E and the deviation change rate EC into a fuzzy control table to obtain fuzzy PID parameters Kp ', Ki' and Kd ', and substituting Kp', Ki 'and Kd' into a PID algorithm to calculate a fuzzy PID control output value;
such as: set the current to CsetThe current collected by AD is CtureThe current deviation is E (t) ═ Cset-CtureDeviation rate of change EC(t)=E(t)-E(t-1)(ii) a The current deviation E (t) and the deviation change rate EC(t)Taking Kp, Ki and Kd as output quantities, taking current value collected in real time as comparison quantity, and taking current deviation E (t) and deviation change rate EC(t)Substituting into fuzzy control table to obtain fuzzy PID parameter Kp', Ki', Kd ', and substituting Kp', Ki ', Kd' into PID algorithm to calculate fuzzy PID control output value:
kp is a proportional coefficient, Ki is an integral coefficient, Kd is a differential coefficient, E (k) and E (k-1) are deviation signals at the k-th time and the k-1-th time respectively, k is a sampling serial number, and T is sampling time.
The invention can effectively solve the problems of nonlinearity, interference and the like of a current control system of the stepping motor, and can realize automatic parameter change along with the change of the environment so as to achieve better control effect. And secondly, the driver runs stably, the current waveform is stable, the driver is accurately positioned, and various production costs are effectively saved.
It should be noted that, for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the order of acts described, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and elements referred to are not necessarily required in this application.
Claims (2)
1. The utility model provides a step motor driver based on fuzzy PID current loop control which characterized in that: the method comprises the following control steps:
s1: determining input variables and output variables of the fuzzy controller and the variation range of the input variables;
wherein the input variables include a deviation E, a deviation change rate EC;
s2: determining the quantization grade, quantization factor and scale factor of the fuzzy control through setting;
s3: and (3) obtaining a fuzzy control table: respectively obtaining a fuzzy control table of a proportional coefficient Kp, an integral time constant Ki and a differential time constant Kd according to the input value and the output value;
s4: calculating a fuzzy PID control output value: substituting the deviation E and the deviation change rate EC into a fuzzy control table to obtain fuzzy PID parameters Kp ', Ki' and Kd ', and substituting Kp', Ki 'and Kd' into a PID algorithm to calculate a fuzzy PID control output value:
kp is a proportional coefficient, Ki is an integral coefficient, Kd is a differential coefficient, E (k) and E (k-1) are deviation signals at the k-th time and the k-1-th time respectively, k is a sampling serial number, and T is sampling time.
2. The driver of the stepping motor based on the fuzzy PID current loop control as claimed in claim 1, wherein: the step S2 includes the following tuning sub-steps:
s21: determining a fuzzy subset of deviation E and deviation change rate EC through the membership degree;
s22: introducing discourse domains corresponding to fuzzy subsets of deviation E and deviation change rate EC;
s23: a quantization function is derived.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011380588.XA CN112564559A (en) | 2020-11-30 | 2020-11-30 | Stepping motor driver based on fuzzy PID current loop control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011380588.XA CN112564559A (en) | 2020-11-30 | 2020-11-30 | Stepping motor driver based on fuzzy PID current loop control |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112564559A true CN112564559A (en) | 2021-03-26 |
Family
ID=75046767
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011380588.XA Pending CN112564559A (en) | 2020-11-30 | 2020-11-30 | Stepping motor driver based on fuzzy PID current loop control |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112564559A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113625548A (en) * | 2021-08-11 | 2021-11-09 | 西安科技大学 | Meta-action unit rotating speed control method based on simulated annealing algorithm and fuzzy PID |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105673540A (en) * | 2014-11-19 | 2016-06-15 | 中兴通讯股份有限公司 | Rotating speed adjustment method and device for fan and rotating speed adjustment system for fan |
CN108681238A (en) * | 2018-05-10 | 2018-10-19 | 中国石油集团渤海钻探工程有限公司 | One kind is with brill downhole electrical motor group speed self-adjusting control method |
CN110418464A (en) * | 2019-07-26 | 2019-11-05 | 深圳依炮尔科技有限公司 | A kind of control method and system of LED emergency lighting control device |
CN110824908A (en) * | 2019-11-30 | 2020-02-21 | 华南理工大学 | Self-adjusting fuzzy Smith-PID temperature control system and method |
CN111258213A (en) * | 2020-03-09 | 2020-06-09 | 深圳市锐同技术有限公司 | Fuzzy self-tuning PID-based temperature control method |
CN111722527A (en) * | 2020-07-07 | 2020-09-29 | 电子科技大学 | Universal configurable digital control chip based on fuzzy self-adaptive PID |
CN111934585A (en) * | 2020-06-23 | 2020-11-13 | 同济大学 | Permanent magnet synchronous motor servo control system based on fuzzy PI control |
-
2020
- 2020-11-30 CN CN202011380588.XA patent/CN112564559A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105673540A (en) * | 2014-11-19 | 2016-06-15 | 中兴通讯股份有限公司 | Rotating speed adjustment method and device for fan and rotating speed adjustment system for fan |
CN108681238A (en) * | 2018-05-10 | 2018-10-19 | 中国石油集团渤海钻探工程有限公司 | One kind is with brill downhole electrical motor group speed self-adjusting control method |
CN110418464A (en) * | 2019-07-26 | 2019-11-05 | 深圳依炮尔科技有限公司 | A kind of control method and system of LED emergency lighting control device |
CN110824908A (en) * | 2019-11-30 | 2020-02-21 | 华南理工大学 | Self-adjusting fuzzy Smith-PID temperature control system and method |
CN111258213A (en) * | 2020-03-09 | 2020-06-09 | 深圳市锐同技术有限公司 | Fuzzy self-tuning PID-based temperature control method |
CN111934585A (en) * | 2020-06-23 | 2020-11-13 | 同济大学 | Permanent magnet synchronous motor servo control system based on fuzzy PI control |
CN111722527A (en) * | 2020-07-07 | 2020-09-29 | 电子科技大学 | Universal configurable digital control chip based on fuzzy self-adaptive PID |
Non-Patent Citations (2)
Title |
---|
刘海明: "基于模糊PID的禽蛋抓取测控系统步进电机的研究", 《湖北农业科学》, vol. 50, no. 21, 30 November 2011 (2011-11-30), pages 4474 - 4475 * |
李杨: "《助力型人体下肢外骨骼仿真与试验》", 30 April 2019, 江苏大学出版社, pages: 133 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113625548A (en) * | 2021-08-11 | 2021-11-09 | 西安科技大学 | Meta-action unit rotating speed control method based on simulated annealing algorithm and fuzzy PID |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4578747A (en) | Selective parametric self-calibrating control system | |
CN108489015B (en) | Air conditioning system temperature control method based on pole allocation and Pade approximation | |
CN107894716A (en) | Temprature control method | |
CN111766777A (en) | PID controller and PID control method | |
CN104570729A (en) | Improved smith predicting controller | |
CN104122795A (en) | Novel extremal function index based intelligent self-turning PID (Proportion Integration Differentiation) indoor temperature control algorithm | |
CN103713519B (en) | Proportional amplifier pid parameter self-adjusting control and proportional amplifier, proportional solenoid | |
JP3144612B2 (en) | PID control method by fuzzy inference | |
CN112564559A (en) | Stepping motor driver based on fuzzy PID current loop control | |
JP3959131B2 (en) | Automotive valve control device | |
CN108363292B (en) | Thermal power generating unit AGC control method and device based on fuzzy control strategy | |
CN108762085A (en) | A kind of quick point-to-point motion control method of robust | |
CN116442223A (en) | Nonlinear dynamic controller design method for track tracking of manipulator system | |
CN114070165B (en) | Motor driving method, system, device and medium | |
US4545008A (en) | Method and automatic control apparatus for controlling a technological process | |
CN116125785A (en) | Method for controlling movement of workpiece table of photoetching machine | |
JP2019530103A (en) | Control device with adjustable control behavior | |
CN113110034A (en) | DCS-based fuzzy PID control system for induced draft fan | |
CN114710252A (en) | Filtering method and system for precise clock synchronization | |
JPH06222806A (en) | Method and apparatus for digital modulation | |
CN117313535B (en) | Indium phosphide monocrystal production temperature control method based on fuzzy control | |
CN110542412B (en) | Self-adaptive dynamic and static closed-loop control method for nuclear magnetic resonance gyroscope | |
CN116679551B (en) | Automatic control method of winding machine based on encoder feedback winding displacement shaft speed | |
CN108733091A (en) | A kind of number valve flow control system and its method for optimally controlling | |
CN112671297B (en) | Rotor position zero offset online correction method suitable for memory motor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |