A kind of fuzzy hysteretic loop current control system and method for permanent magnet synchronous motor
Technical field
The invention belongs to electric system and control technology fields, and in particular to a kind of fuzzy hysteresis current of permanent magnet synchronous motor
Control system and method.
Background technique
Permanent magnet synchronous motor (PMSM) is the synchronous motor that synchronous rotary magnetic field is generated by permanent magnet excitation, has itself
The features such as overload current that power efficiency is high and power factor is high, fever is small, allows is big, high reliablity, compared to traditional
Electric excitation synchronous motor, permanent magnet synchronous motor have again loss less, high-efficient, power savings clear advantage so that permanent magnetism is same
Step motor is quickly applied and is developed in multiple fields.
More and more domestic and foreign scholars optimize the control algolithm of permanent magnet synchronous motor.Under conventional situation, permanent magnetism
Synchronous machine drives control uses vector controlled, and system response is general, and the response speed and stable state accuracy of current follow-up control are not
It is ideal.
Summary of the invention
In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is that providing a kind of permanent-magnet synchronous
Motor obscures hysteretic loop current control system and method, enhancing system response, improve current of electric tracing control response speed and
Stable state accuracy.
The invention adopts the following technical scheme:
A kind of fuzzy hysteretic loop current control system of permanent magnet synchronous motor, including DC power supply, fuzzy logic controller, Park
Unit, PI controller, hystersis controller, differentiation element, current sense are generated with Clarke conversion module, hystersis controller, PWM
Device, Hall sensor, position and revolving speed generate unit, inverter, speed regulator, current regulator;DC power supply and inversion
Each bridge arm of device is connected;Speed regulator and fuzzy logic controller, differentiation element, position and revolving speed generate unit and PI
Controller is connected, and PI controller is connected with Park and Clarke conversion module, Park and Clarke conversion module and current regulation
Device, position and revolving speed generate unit and are connected, and current regulator is connected with current sensor and hystersis controller, after hystersis controller
With PWM generate unit be connected, while after fuzzy logic controller with PWM generate unit be also connected, PWM generation unit after with inversion
Device is connected, and inverter is connected directly with motor, and position and revolving speed generate unit and be connected with Hall sensor, Hall sensor and electricity
Flow sensor is connected to the motor.
Optionally, inverter generates the switch state for the pwm signal control power switch tube that unit generates according to PWM, produces
Raw different circuit topological structure, a kind of operating mode of the corresponding double permanent magnet synchronous motors of every kind of topological structure, every kind of Working mould
Working condition represented by formula can drive one of permanent magnet synchronous motor to run alone;
Given speed is inputted according to need of work, after the feedback speed comparison of feedback loop, by pi regulator, output
Q axis reference current, while EC is input in fuzzy logic controller after velocity error E and velocity error derivation, output signal G is arrived
PWM is generated in unit;
Then setting d axis reference current is 0, q axis reference current and d axis reference current through Park and Clarke converting unit
Three-phase reference current is obtained, three-phase reference current passes through current comparing module with the three-phase current of feedback loop respectively, generates three
Phase current error is input in hystersis controller, output signal kjUnit is generated to PWM, is correspondingly arranged CRR value with signal G, is produced
Six road pwm signals of raw corresponding duty ratio, six road pwm signals of generation are input in inverter, are controlled in inverter respectively
Six power switch tubes, to control permanent magnet synchronous motor M1 normal operation.
Optionally, the three-phase current that current sensor will test is sent to current regulating module;Hall sensor will test
To hall signal be sent to position and revolving speed and generate unit, position and revolving speed generate unit and speed and angle are sent to speed respectively
Adjuster and Park and Clarke conversion module;
The output quantity G of fuzzy logic controller is input to PWM and generates unit, the CCR value difference that setting two is differed in size
Corresponding CCR value is arranged as modulating wave according to the output of three hystersis controllers in two kinds of outputs of corresponding hystersis controller, if
Setting triangular wave is carrier wave, and carrier wave and modulating wave copped wave generate PWM wave, and the different output of hystersis controller generates different duties respectively
The PWM waveform of ratio after the signal all the way of hystersis controller output is input to PWM generation unit, generates the PWM letter of two-way complementation
Number, PWM generates the raw corresponding six road pwm signal of unit common property, is input to inverter.
A kind of permanent magnet synchronous motor obscures method for controlling hysteresis loop current, using as claimed any one in claims 1 to 3
Permanent magnet synchronous motor obscures hysteretic loop current control system, and velocity error and error change amount is defeated as fuzzy logic controller
Enter, output quantity G is matched with hystersis controller output signal, and control PWM generates six road pwm signals of corresponding duty ratio, is controlled inverse
Become six power switch tubes of device, controls motor operation.
Specifically, the following steps are included:
S1, system is initialized, Hall sensor and current sensor acquire three-phase permanent magnet synchronous motor M1 respectively
Hall signal and three-phase current signal, hall signal is sent to position and revolving speed and generates unit, and position and revolving speed generate unit will
Hall signal resolves to the position signal θ of rotor1With speed signal ω1It is sent to Park and Clarke conversion module respectively afterwards
In speed adjustment module;Three-phase current iA1、iB1、iC1It is sent in current regulating module;
S2, reference velocityWith feedback speed ω1By speed adjustment module, velocity error E, velocity error difference are obtained
Q axis reference current is obtained through PI controllerSignal EC is obtained through differential, E and EC two paths of signals is input to fuzzy logic control together
Device processed;
S3, setting d axis reference currentFor 0, dq shaft currentWithIt is input to Park and Clarke conversion module, obtains three
Phase reference current
The three-phase reference current that S4, step S3 are obtainedWith the three-phase current i of feedback loopA1、iB1、iC1Through
Overcurrent adjuster obtains three-phase current errorThree error signalsIt is input to stagnant ring
Controller exports three road signal kA1、kB1、kC1Unit is generated to PWM;
S5, according to step S2, fuzzy logic controller output signal G to PWM generates unit, with system preloaded value ARR
Two CCR values to differ in size are synthesized, two different outputs of hystersis controller, the signal that step S4 is obtained are respectively corresponded
kA1、kB1、kC1Corresponding with corresponding CCR value, carrier wave and modulating wave copped wave generate PWM wave, the signal all the way of hystersis controller output
The pwm signal of two-way complementation is generated, so that PWM generates unit and generates corresponding six road pwm signal, six road pwm signals are input to inverse
Become device, control the state of six power switch tubes, control permanent magnet synchronous motor runs well.
Further, in step S3, Park and Clarke are converted to three-phase reference currentIt is as follows:
Wherein, iαAnd iβFor the transformed biphase current of Clarke, θ is between d axis axis and the axis of motor A phase winding
Angle.
Further, in step S4, three error signals of three-phase permanent magnet synchronous motor M1 branchAre as follows:
Further, three error signals are input to the k exported after hystersis controllerjAre as follows:
Wherein, j=A1, B1, C1,For error signal, H is the 1/2 of hystersis controller ring width.
Further, in step S5, with signal kA1、kB1、kC1Value corresponding CCR value is set are as follows:
Wherein, high is the output of hystersis controller height, and low is the low output of hystersis controller, and ARR is system reloading value.
Further, in step S5, for setting system CCR value as modulating wave, setting triangular wave is carrier wave.
Compared with prior art, the present invention at least has the advantages that
A kind of permanent magnet synchronous motor of the present invention obscures hysteretic loop current control system, is controlled by the way of two close cycles,
Speed error is adjusted PI controller, exports q axis reference current, setting d shaft current is 0, to form biphase current;
Biphase current is converted three-phase current by Park and Clarke conversion module;Fuzzy logic controller becomes speed error and error
Rate is converted into output quantity G, is input to PWM and generates unit, and generation PWM is adjusted to realize;Hystersis controller is by three
Phase current error is adjusted, and exports three tunnel signals to PWM and generates unit, and output quantity G with fuzzy logic controller
Match, corresponding CCR value is set, the PWM wave of corresponding duty ratio is formed;Inverter structure is three bridge arms six switch, power switch tube
It using MOSFET, is connected directly with motor and DC power supply, to preferably control motor;PWM generates unit and inverter phase
Even, to realize that six road pwm signals control cut-offfing for six power switch tubes of inverter respectively, the control to motor is realized;Suddenly
That sensor and current sensor are connected to the motor, and so as to obtain electric current and hall signal faster, faster feedback is arrived
Corresponding module;Hall sensor generates unit with position and revolving speed and is connected, and hall signal can be resolved to revolving speed and position letter
Number, it is sent to corresponding module respectively, designs the stability for the system that increases in this way.
Further, system uses double-loop control strategy, and fuzzy logic controller control is feedforward control, two parts group
Unit preferably is generated to PWM altogether to be adjusted, and is enhanced system stability and robustness, is improved current follow-up control
Response speed and stable state accuracy, to realize the more effective control to motor.
Further, the PWM CCR value for generating unit is adjusted using fuzzy control, is combined with hystersis controller,
Preferably improve the response speed and stable state accuracy of current follow-up control.
The invention also discloses a kind of permanent magnet synchronous motors to obscure method for controlling hysteresis loop current, with fuzzy control to PWM
The CCR value for generating unit is adjusted, and is combined with hystersis controller, and the response speed of current follow-up control can be preferably improved
Degree and stable state accuracy, the effective control for realizing motor.
Further, system use double circle controling mode, it can be achieved that motor stability contorting, while fuzzy logic part
Using feed-forward control manner, the PWM CCR value for generating unit can be adjusted, combine with hystersis controller, preferably improve
The response speed and stable state accuracy of current follow-up control.
Further, biphase current is converted to three-phase reference current by step S3, by current regulator, is output to stagnant ring
Controller, so that three road signals of output generate unit, it can be achieved that PWM, which generates unit, generates six road pwm signals, to inversion to PWM
The on-off of six power switch tubes of device is controlled.
Further, step S4 uses Hysteresis control strategy, can effectively handle current error signal, has real
When control, fast response time, strong robustness the advantages of, the response speed and stable state accuracy of current follow-up control can be improved.
Further, two and fuzzy controller output quantity G are set by two outputs of hystersis controller in step S5
Relevant value matches with hystersis controller output, and assigns value to the PWM CCR for generating unit, and control PWM generates unit and produces
The PWM wave of raw corresponding duty ratio, can effectively improve the response speed and stable state accuracy of current follow-up control in this way.
Further, using CCR value as modulating wave, setting triangular wave is carrier wave, with the output of fuzzy logic controller
The variation of G is measured, CCR value is also changing, to realize the control for generating unit to PWM, enhances the robustness of system, can mention in this way
The response speed and stable state accuracy of high current tracing control reinforce the control to motor.
In conclusion the present invention fuzzy control in such a way that Hysteresis control combines, to PWM generate unit control
System can effectively improve the response speed and stable state accuracy of current follow-up control, system stability and robustness enhancing, motor control
System is also effectively improved.
Below by drawings and examples, technical scheme of the present invention will be described in further detail.
Detailed description of the invention
Fig. 1 is inventive control algorithm easy structure block diagram;
Fig. 2 is overall control strategy flow chart of the present invention;
Fig. 3 is pwm signal generating principle figure;
Fig. 4 is fuzzy logic controller of the present invention composition figure;
Fig. 5 is the subordinating degree function figure of input quantity E in fuzzy rule base of the present invention;
Fig. 6 is the subordinating degree function figure of input quantity EC in fuzzy rule base of the present invention;
Fig. 7 is the subordinating degree function figure of output quantity G in fuzzy rule base of the present invention.
Specific embodiment
Referring to Fig. 1, the present invention provides a kind of permanent magnet synchronous motors to obscure hysteretic loop current control system, it include direct current
Source, fuzzy logic controller, Park and Clarke conversion module, hystersis controller, PWM generate unit, PI controller, stagnant ring control
Device, differentiation element, current sensor, Hall sensor, position and revolving speed processed generate unit, inverter, current regulator, revolving speed
Adjuster;
DC power supply is connected with each bridge arm of inverter;Speed regulator and fuzzy logic controller, differentiation element, position
Set and generate unit with revolving speed and be connected with PI controller, be connected after PI controller with Park and Clarke conversion module, Park with
Clarke conversion module and current regulator, position and revolving speed generate unit and are connected, current regulator and current sensor and stagnant
Ring controller is connected, and generates unit with PWM after hystersis controller and is connected, while generating unit with PWM after fuzzy logic controller
Also it is connected, PWM is connected after generating unit with inverter, and inverter is connected directly with motor, position and revolving speed generation unit and suddenly
You are connected at sensor, and Hall sensor and current sensor are connected to the motor.
Inverter is made of three inverter legs and six power switch tubes, after three inverter legs are in parallel with public affairs
Total DC power supply is connected, and inverter is connect with permanent magnet synchronous motor M1, and permanent magnet synchronous motor M1 generates single through position and revolving speed
Member is connect with PI controller, and in terms of algorithm, speed error E and speed error change rate EC are input to fuzzy logic controller,
Fuzzy logic controller exports G to PWM and generates unit, the signal k generated with hystersis controllerjCorresponding, setting PWM generates unit
CRR value, generate corresponding pwm signal and be input to inverter, can be improved the response speed of current of electric tracing control and steady
State precision.
Working principle is as follows:
During system stable operation, inverter can generate the pwm signal that unit generates according to PWM and control power
The switch state of switching tube generates different circuit topological structures, one kind of the corresponding double permanent magnet synchronous motors of every kind of topological structure
Operating mode, working condition represented by every kind of operating mode can drive one of permanent magnet synchronous motor to run alone.
Given speed is inputted according to need of work, after the feedback speed comparison of feedback loop, by pi regulator, output
Q axis reference current, while EC is input in fuzzy logic controller after velocity error E and velocity error derivation, output signal G is arrived
PWM is generated in unit.
Then setting d axis reference current is 0, q axis reference current and d axis reference current through Park and Clarke converting unit
Three-phase reference current is obtained, three-phase reference current passes through current comparing module with the three-phase current of feedback loop respectively, generates three
Phase current error is input in hystersis controller, output signal kjUnit is generated to PWM, is correspondingly arranged CRR value with signal G, is produced
Six road pwm signals of raw corresponding duty ratio, six road pwm signals of generation are input in inverter, are controlled in inverter respectively
Six power switch tubes, to control permanent magnet synchronous motor M1 normal operation.
The three-phase current that current sensor will test is sent to current regulating module;The Hall that Hall sensor will test
Signal is sent to position and revolving speed and generates unit, position and revolving speed generate unit by speed and angle be sent to respectively speed regulator and
Park and Clarke conversion module.
The output quantity G of fuzzy logic controller is input to PWM and generates unit, and two CCR values to differ in size, CCR is arranged
Value is determined that two CCR values not waited respectively correspond two kinds of differences of hystersis controller by output quantity G and system preloaded value ARR
Output corresponding CCR value is arranged according to the output of three hystersis controllers referring to Fig. 3, CCR value is used as modulating wave, is arranged three
Angle wave is carrier wave, and carrier wave and modulating wave copped wave generate PWM wave, and the different output of hystersis controller generates different duty respectively
PWM waveform.After the signal all the way of hystersis controller output is input to PWM generation unit, the pwm signal of two-way complementation, PWM are generated
The raw corresponding six road pwm signal of unit common property is generated, inverter is input to.
Referring to Fig. 2, a kind of permanent magnet synchronous motor of the present invention obscures method for controlling hysteresis loop current, by velocity error and error
Variable quantity is inputted as fuzzy logic controller, and output quantity G is matched with hystersis controller output signal, and control PWM generates corresponding
Six road pwm signals of duty ratio control six power switch tubes of inverter, so that motor stabilizing is run, specifically include following
Step:
S1, system is initialized, Hall sensor and current sensor acquire three-phase permanent magnet synchronous motor M1 respectively
Hall signal and three-phase current signal, hall signal is sent to position and revolving speed and generates unit, and position and revolving speed generate unit will
Hall signal resolves to the position signal θ of rotor1With speed signal ω1It is sent to Park and Clarke conversion module respectively afterwards
In speed adjustment module;Three-phase current iA1、iB1、iC1It is sent in current regulating module;
S2, reference velocityWith feedback speed ω1By speed adjustment module, according to formula
Velocity error E is obtained, on the one hand pass through PI controller obtains q axis reference current to velocity errorOn the one hand by micro-
Get signal EC, E and EC two paths of signals is input to fuzzy logic controller together.
S3, setting d axis reference currentFor 0, dq shaft currentWithIt is input to Park and Clarke conversion module, according to public affairs
Formula
Wherein, iαAnd iβFor the transformed biphase current of Clarke, θ is between d axis axis and the axis of motor A phase winding
Angle.
Obtain three-phase reference current
S4, three-phase reference currentWith the three-phase current i of feedback loopA1、iB1、iC1By current regulation
Device, according to formula
Obtain three-phase current errorThree error signalsIt is input to Hysteresis control
Device, according to formula
Wherein, j=A1, B1, C1,For above-mentioned error signal, H is the 1/2 of hystersis controller ring width, exports three road signals
kA1、kB1、kC1Unit is generated to PWM.
S5, E and EC two paths of signals are input to fuzzy logic controller together, and the subordinating degree function of two input signals is respectively such as
Shown in Fig. 5 and Fig. 6, the subordinating degree function of output signal G, signal G generates unit as shown in fig. 7, signal G is input to PWM, and is
The preloaded value ARR that unites synthesizes two CCR values to differ in size, respectively corresponds two different outputs of hystersis controller.According to
Formula
Wherein, high is the output of hystersis controller height, and low is the low output of hystersis controller, and ARR is system reloading value.
Signal kA1、kB1、kC1It is corresponding with corresponding CCR value, the CCR value of system is set, and CCR value is as modulating wave, setting three
Angle wave is carrier wave, and according to Fig. 3, carrier wave and modulating wave copped wave generate PWM wave, and the signal all the way of hystersis controller output generates two-way
Complementary pwm signal, so that PWM generates unit and generates corresponding six road pwm signal, six road pwm signals are input to inverter, control
The state of six power switch tubes, control permanent magnet synchronous motor run well.
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.The present invention being described and shown in usually here in attached drawing is real
The component for applying example can be arranged and be designed by a variety of different configurations.Therefore, below to the present invention provided in the accompanying drawings
The detailed description of embodiment be not intended to limit the range of claimed invention, but indicate selected implementation of the invention
Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts
Every other embodiment, shall fall within the protection scope of the present invention.
Fuzzy logic controller
Fuzzy logic controller (Fuzzy Logic Controller-FLC) is also referred to as fuzzy controller (Fuzzy
Controller-FC), schematic diagram includes blurring module, fuzzy reasoning module, ambiguity solution module and knowledge base referring to Fig. 4.
Define input and output fuzzy set
First by reference velocityWith actual speed ω1Difference is inverted by following equation for E, difference change rate EC, defeated
Input quantity A and B are obscured out, its value is limited in (- 1,1) section.
If the fuzzy set and its domain of fuzzy logic controller input quantity E and EC and output quantity G are defined as follows:
E, the fuzzy set of EC and G is equal are as follows: { NB, NS, Z, PS, PB }, corresponding physical state are { far below setting model respectively
Lower limit is enclosed, it is micro- to be lower than setting range lower limit, it is within the set range, micro- to be higher than the setting range upper limit, much higher than on setting range
Limit }.E ', the domain of EC ' are equal are as follows: { -1, -0.5,0,0.5,1 }.Obtain velocity error E, the degree of membership of error change EC is shown in Table 1:
The degree of membership of 1 voltage error E of table, error change EC
It is signal G that the fuzzy logic controller, which uniquely exports control amount, and value is related with the ARR value that system is arranged, can
To obscure set representations with single-point, output quantity G domain is controlled are as follows:Its degree of membership is shown in
Table 2:
The degree of membership of 2 output quantity G of table
The present invention is using degree of membership letter of the Triangleshape grade of membership function as Fuzzy control system subset common in engineering
Number, it has the advantages that calculate simply and committed memory is small, mathematic(al) representation are as follows:
Each subordinating degree function of fuzzy controller input E, EC and output quantity is drawn at MATLAB points according to the above rule
Cloth is respectively as shown in Fig. 5, Fig. 6 and Fig. 7.
The fuzzy reasoning method Mamdani rationalistic method that the present invention uses, Mamdani are the sides generally used in fuzzy control
Method, essence are a kind of Compositional Rule of Inference, and the i-th rule is expressed as in rule base
Ri: " If E is A and EC is B, then U is C. "
Wherein C is fuzzy output amount.The fuzzy relation contained is
Ri=(Ai×Bi)×Ci
It can regard "or", that is, the relationship of " asking simultaneously " in control rule base between rule as, then entire rule base accumulates
The fuzzy relation contained are as follows:
3 are shown in Table according to the fuzzy control rule that live practical operation experience is formulated, totally 25.
3 fuzzy control rule of table
Fuzzy reasoning is carried out according to input quantity, according to formula
C=(A × B) ο R
Fuzzy output amount C is exported, ambiguity solution processing is carried out to fuzzy output amount C, using weighted mean method, to fuzzy output
Each element and its corresponding degree of membership seek weighted average in amount, and carry out round, to obtain accurately exporting control
Measure G.The accurate output quantity G obtained by fuzzy controller is output to PWM and generates unit, matches with the output of hystersis controller,
Corresponding six road pwm signal is generated, six power switch tubes in inverter are controlled.
The above content is merely illustrative of the invention's technical idea, and this does not limit the scope of protection of the present invention, all to press
According to technical idea proposed by the present invention, any changes made on the basis of the technical scheme each falls within claims of the present invention
Protection scope within.