CN112965439B - Control method, device, equipment and storage equipment of electronic cam - Google Patents

Control method, device, equipment and storage equipment of electronic cam Download PDF

Info

Publication number
CN112965439B
CN112965439B CN202110135763.7A CN202110135763A CN112965439B CN 112965439 B CN112965439 B CN 112965439B CN 202110135763 A CN202110135763 A CN 202110135763A CN 112965439 B CN112965439 B CN 112965439B
Authority
CN
China
Prior art keywords
sampling
current
motor
error
model
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.)
Active
Application number
CN202110135763.7A
Other languages
Chinese (zh)
Other versions
CN112965439A (en
Inventor
王荣坤
杜全恺
熊启彬
刘武根
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huaqiao University
Original Assignee
Huaqiao University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huaqiao University filed Critical Huaqiao University
Priority to CN202110135763.7A priority Critical patent/CN112965439B/en
Publication of CN112965439A publication Critical patent/CN112965439A/en
Application granted granted Critical
Publication of CN112965439B publication Critical patent/CN112965439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/06Programme control other than numerical control, i.e. in sequence controllers or logic controllers using cams, discs, rods, drums, or the like
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/04Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
    • G05B13/042Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance

Abstract

The embodiment of the invention provides a control method, a control device, control equipment and storage equipment of an electronic cam, and relates to the technical field of electronic cams. The control method comprises the steps of predicting a tracking error through a control curve, obtaining an error threshold value according to working condition information, judging whether disturbance exists at a future moment or not through the tracking error and the error threshold value, performing different compensations on a control signal according to different conditions, and controlling a motor according to the compensated control signal. The control performance after disturbance is greatly improved. Through the self-adaptive threshold model, the judgment threshold can be self-adaptively adjusted according to the actual working condition and the sampling error of the motor in the control process, and the operation in the control process is simplified.

Description

Control method, device, equipment and storage equipment of electronic cam
Technical Field
The invention relates to the technical field of electronic cams, in particular to a control method, a control device, control equipment and storage equipment of an electronic cam.
Background
An electronic cam is a technology that simulates and replaces a mechanical cam by constructing a cam curve. Compared with a mechanical cam, the electronic cam technology has the advantages of high operation precision, simple structure, high safety, good compatibility and the like, can change a cam curve by modifying parameters, and is widely applied to motion control systems such as rotary cutting, flying shears and flying saws.
High precision tracking of cam curves is a difficulty in electronic cam control, and is mainly caused by two factors. On the one hand, in the cam curve design process, a polynomial fitting and interpolation method is usually adopted to obtain cam curve information. However, the methods often ignore the phenomenon of abrupt change of speed and acceleration at the inflection point of the curve, which causes the problems of jamming, buffeting and the like of the controlled object, and reduces the control accuracy of the cam curve. On the other hand, in the operation process of the system, the electronic cam mainly controls the motion process through a table look-up method and an online calculation method, the table look-up method requires that the controlled object moves strictly according to offline data, and the controlled object belongs to an open-loop structure, so that the disturbance condition in the actual operation process is ignored; the online calculation method can only process the current quantity in real time, and hysteresis exists for the suppression of disturbance.
Disclosure of Invention
The invention provides a control method, a control device, control equipment and storage equipment of an electronic cam, and aims to solve the problem that the control performance of the electronic cam is reduced after disturbance in the related art.
The first aspect,
The embodiment of the invention provides a control method of an electronic cam, which comprises the following steps:
and S1, acquiring a control curve of the motor.
And S3, predicting the predicted position of the motor rotor after N sampling moments through a prediction model according to the control curve.
And S4, calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the control curve.
And S6, obtaining the working condition information of the motor.
And S8, calculating the error threshold of the motor at the current sampling moment through a self-adaptive error threshold model according to the working condition information.
And S9, judging whether the tracking error is larger than the self-adaptive error threshold value.
And S10, when the tracking error is judged to be larger than the self-adaptive error threshold value, calculating to obtain a position compensation coefficient according to the control curve and the working condition information, and performing position compensation on the control signal at the current sampling moment according to the position compensation coefficient.
And S11, when the tracking error is judged to be smaller than the self-adaptive error threshold value, calculating to obtain a speed compensation coefficient according to the control curve and the working condition information, and performing speed compensation on the control signal at the current sampling moment according to the speed compensation coefficient.
And S12, controlling the motor according to the compensated control signal.
Optionally, the control curve is generated according to a table look-up method.
Optionally, before step S3, the method further includes:
and S2, constructing the prediction model.
Optionally, before step S8, the method further includes:
and S7, constructing the adaptive threshold model.
Optionally, the step S2 specifically includes:
s2a, constructing a controlled autoregressive integral sliding average model according to the mechanical motion equation of the motor rotor.
S2b, obtaining the prediction model through a Diophantine model according to the controlled autoregressive integral moving average model. Wherein the expression of the prediction model is:
Figure BDA0002926888300000031
where k is the current sampling instant, N is the number of predicted sampling instants,
Figure BDA0002926888300000032
the predicted angle of the motor rotor at the sampling moment of k + N, G, H and F are variables in the motor control process, delta is a differential operator, Iq *(k + N-1) is the theoretical current of the q axis of the motor at the sampling moment of k + N-1, Iq *(k + N) is the theoretical current of the q-axis of the motor at the sampling time of k + N, theta*And (k + N) is the theoretical angle of the motor rotor at the sampling moment of k + N.
Optionally, after step S4, the method further includes the following steps:
and S5, smoothing the prediction model according to the tracking error to obtain a correction model. Wherein the expression of the correction model is:
Figure BDA0002926888300000033
Where k is the current sampling instant, N is the number of predicted sampling instants,
Figure BDA0002926888300000034
the correction angle of the motor rotor at the sampling time of k + N, and gamma is a smoothing coefficientThe value range is [0, 1 ]],
Figure BDA0002926888300000035
Is the correction angle of the motor rotor at the sampling moment of k + N-1,
Figure BDA0002926888300000036
the predicted angle of the motor rotor at the sampling time k + N is obtained, and e (k + N) is the tracking error at the sampling time k + N.
Optionally, the operating condition information includes a sampling current x of a q-axis of the motoriAnd the sampling angle x of the motor rotorθ
Optionally, the step S7 specifically includes:
and S7a, constructing a position current sampling threshold error model. Wherein the position current sampling threshold error model ε1(xi,xθ) The expression of (a) is:
Figure BDA0002926888300000037
in the formula, xiTo sample the current, xθIs the sampling angle, n is the sampling frequency, k is the current sampling time,
Figure BDA0002926888300000038
as a sampling error of the current iq(k) Is the sampled current i of the q axis of the motor at the current sampling momentq(k-1) is the sampling current of the q axis of the motor at the sampling moment of k-1,
Figure BDA0002926888300000041
and theta (k) is a sampling angle of the motor rotor at the current sampling moment, and theta (k-1) is a sampling angle of the motor rotor at the sampling moment of k-1.
And S7b, constructing a working condition change threshold error model. Wherein the working condition change threshold error model epsilon 2(xi) The expression of (c) is:
ε2(xi)=λiq(k)
in the formula, xiFor sampling the current, λ is the transfer coefficient, iq(k) The current is the sampling current of the q axis of the motor at the current sampling moment, and k is the current sampling moment.
S7c, obtaining the self-adaptive threshold model according to the position current sampling threshold error model and the working condition change threshold error model. Wherein the expression of the adaptive threshold model ε is:
ε=ε01(xi,xθ)+ε2(xi)
in the formula, epsilon0Is a predetermined basic threshold value, epsilon1(xi,xθ) For a model of the error of the sampling threshold of the position current, epsilon2(xi) And (3) a working condition change threshold error model.
Optionally, the step S4 specifically includes:
and S4a, acquiring the theoretical angle of the motor rotor after N sampling moments according to the control curve.
And S4b, calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the theoretical angle. Wherein the tracking error e (k + N) has the expression:
Figure BDA0002926888300000042
where k is the current sampling instant, N is the number of predicted sampling instants, θ*(k + N) is the theoretical angle of the motor rotor at the sampling moment of k + N,
Figure BDA0002926888300000043
and the predicted angle of the motor rotor at the sampling moment of k + N is obtained.
Optionally, according to the control curve and the operating condition information, a position compensation coefficient is calculated, specifically:
And acquiring the position compensation coefficient through a first evaluation function according to the control curve and the working condition information. Wherein the first merit functionJ1The expression of (a) is:
Figure BDA0002926888300000044
wherein k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Alpha is a position compensation coefficient and the value range is [1, 2 ] for the theoretical angle of the motor rotor at the current sampling moment],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure BDA0002926888300000051
and the theoretical current of the q axis of the motor at the current sampling moment.
Optionally, a speed compensation coefficient is calculated according to the control curve and the working condition information, and specifically:
and acquiring the speed compensation coefficient through a second evaluation function according to the control curve and the working condition information. Wherein the second evaluation function J2The expression of (a) is:
Figure BDA0002926888300000052
wherein k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Beta is a speed compensation coefficient and the value range is [0, 1 ] which is the theoretical angle of the motor rotor at the current sampling moment],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure BDA0002926888300000053
is the theoretical current of the q axis of the motor at the current sampling moment, omega (k) is the sampling angular speed of the rotor of the motor at the current sampling moment, omega *(k) The theoretical angular velocity of the motor rotor at the current sampling moment.
The second aspect,
The embodiment of the invention provides a control device of an electronic cam, which comprises the following modules:
and the curve acquisition module is used for acquiring a control curve of the motor.
And the position prediction module is used for predicting the predicted position of the motor rotor after N sampling moments through a prediction model according to the control curve.
And the error calculation module is used for calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the control curve.
And the working condition acquisition module is used for acquiring the working condition information of the motor.
And the threshold calculation module is used for calculating the error threshold of the motor at the current sampling moment through a self-adaptive error threshold model according to the working condition information.
And the error judgment module is used for judging whether the tracking error is larger than the self-adaptive error threshold value or not.
And the position compensation module is used for calculating to obtain a position compensation coefficient according to the control curve and the working condition information when the tracking error is judged to be larger than the self-adaptive error threshold value, and performing position compensation on the control signal at the current sampling moment according to the position compensation coefficient.
And the speed compensation module is used for calculating a speed compensation coefficient according to the control curve and the working condition information when the tracking error is judged to be smaller than the self-adaptive error threshold value, and performing speed compensation on the control signal at the current sampling moment according to the speed compensation coefficient.
And the motor control module is used for controlling the motor according to the compensated control signal.
Optionally, the control curve is generated according to a table look-up method.
Optionally, the control device further comprises
And the prediction model building module is used for building the prediction model.
And the threshold model building module is used for building the self-adaptive threshold model.
Optionally, the prediction model building module comprises:
and the average model unit is used for constructing a controlled autoregressive integral sliding average model according to the mechanical motion equation of the motor rotor.
And the prediction model construction unit is used for obtaining the prediction model through a Diphantine model according to the controlled autoregressive integral moving average model. Wherein the expression of the prediction model is:
Figure BDA0002926888300000061
where k is the current sampling instant, N is the number of predicted sampling instants,
Figure BDA0002926888300000062
the predicted angle of the motor rotor at the sampling moment of k + N, G, H and F are variables in the motor control process, delta is a differential operator, I q *(k + N-1) is the theoretical current of the q axis of the motor at the sampling moment of k + N-1, Iq *(k + N) is the theoretical current of the q-axis of the motor at the sampling time of k + N, theta*And (k + N) is the theoretical angle of the motor rotor at the sampling moment of k + N.
Optionally, the control device further comprises
And the correction model construction module is used for carrying out smoothing treatment on the prediction model according to the tracking error to obtain a correction model. Wherein the expression of the correction model is:
Figure BDA0002926888300000071
where k is the current sampling instant, N is the number of predicted sampling instants,
Figure BDA0002926888300000072
the correction angle of the motor rotor at the sampling moment of k + N, gamma is a smooth coefficient and the value range is [0, 1%],
Figure BDA0002926888300000073
Is the correction angle of the motor rotor at the sampling moment of k + N-1,
Figure BDA0002926888300000074
the predicted angle of the motor rotor at the sampling time k + N is obtained, and e (k + N) is the tracking error at the sampling time k + N.
Optionally, the operating condition information includes a sampling current x of a q-axis of the motoriAnd the sampling angle x of the motor rotorθ
Optionally, the threshold calculation module includes:
and the first model building unit is used for building a position current sampling threshold error model. Wherein the position current sampling threshold error model ε1(xi,xθ) The expression of (a) is:
Figure BDA0002926888300000075
in the formula, xiTo sample the current, x θIs the sampling angle, n is the sampling number, k is the current sampling time,
Figure BDA0002926888300000076
as a sampling error of the current iq(k) Is the sampled current i of the q axis of the motor at the current sampling momentq(k-1) is the sampling current of the q axis of the motor at the sampling moment of k-1,
Figure BDA0002926888300000077
and theta (k) is a sampling angle of the motor rotor at the current sampling moment, and theta (k-1) is a sampling angle of the motor rotor at the sampling moment of k-1.
And the second model building unit is used for building a working condition change threshold error model. Wherein the threshold error model epsilon of the working condition change2(xi) The expression of (a) is:
ε2(xi)=λiq(k)
in the formula, xiTo adoptSample current, λ is the transmission coefficient, iq(k) The current is the sampling current of the q axis of the motor at the current sampling moment, and k is the current sampling moment.
And the threshold model construction unit is used for obtaining the self-adaptive threshold model according to the position current sampling threshold error model and the working condition change threshold error model. Wherein the expression of the adaptive threshold model ε is:
ε=ε01(xi,xθ)+ε2(xi)
in the formula, epsilon0Is a predetermined basic threshold value, epsilon1(xi,xθ) For a model of the error of the sampling threshold of the position current, epsilon2(xi) And (3) a working condition change threshold error model.
Optionally, the error calculation module includes:
and the theoretical angle acquisition unit is used for acquiring the theoretical angle of the motor rotor after N sampling moments according to the control curve.
And the tracking error calculation unit is used for calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the theoretical angle. Wherein the tracking error e (k + N) is expressed as:
Figure BDA0002926888300000081
where k is the current sampling instant, N is the number of predicted sampling instants, θ*(k + N) is the theoretical angle of the motor rotor at the sampling moment of k + N,
Figure BDA0002926888300000082
and the predicted angle of the motor rotor at the sampling moment of k + N is obtained.
Optionally, according to the control curve and the operating condition information, a position compensation coefficient is calculated, specifically:
and acquiring the position compensation coefficient through a first evaluation function according to the control curve and the working condition information. WhereinSaid first evaluation function J1The expression of (a) is:
Figure BDA0002926888300000083
wherein k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Alpha is a position compensation coefficient and the value range is [1, 2 ] for the theoretical angle of the motor rotor at the current sampling moment],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure BDA0002926888300000084
and the theoretical current of the q axis of the motor at the current sampling moment.
Optionally, a speed compensation coefficient is calculated according to the control curve and the working condition information, and specifically:
And acquiring the speed compensation coefficient through a second evaluation function according to the control curve and the working condition information. Wherein the second evaluation function J2The expression of (a) is:
Figure BDA0002926888300000091
wherein k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Beta is a speed compensation coefficient and the value range is [0, 1 ] which is the theoretical angle of the motor rotor at the current sampling moment],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure BDA0002926888300000092
is the theoretical current of the q axis of the motor at the current sampling moment, omega (k) is the sampling angular speed of the rotor of the motor at the current sampling moment, omega*(k) The theoretical angular velocity of the motor rotor at the current sampling moment.
The third aspect,
An embodiment of the present invention provides a control apparatus of an electronic cam, which includes a processor, a memory, and a computer program stored in the memory. The computer program is executable by the processor to implement the control method of the electronic cam according to any one of the paragraphs of the first aspect.
The fourth aspect,
An embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, an apparatus in which the computer-readable storage medium is located is controlled to execute the method for controlling an electronic cam according to any one of the paragraphs of the first aspect.
By adopting the technical scheme, the invention can obtain the following technical effects:
the embodiment of the invention can greatly improve the control performance after disturbance by predicting the tracking error of the control curve at the future moment and judging whether the disturbance exists according to the tracking error and carrying out the targeted operation in advance aiming at different conditions.
The embodiment of the invention adopts the self-adaptive threshold model, can self-adaptively adjust and judge the threshold value according to the actual working condition and the sampling error of the motor in the control process, and simplifies the operation in the control process.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a control method of an electronic cam according to a first embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a system of an electronic cam according to a first embodiment of the present invention.
Fig. 3 is a logic block diagram of the compensation method according to the first embodiment of the present invention.
Fig. 4 is a logic block diagram of a control method of an electronic cam according to a first embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a control device of an electronic cam according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship.
The word "if," as used herein, may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection," depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
In the embodiments, the references to "first \ second" merely distinguish similar objects and do not represent a specific ordering for the objects, and it is to be understood that "first \ second" may interchange a specific order or sequence where permitted. It should be understood that "first \ second" distinguishing objects may be interchanged under appropriate circumstances such that the embodiments described herein may be implemented in sequences other than those illustrated or described herein.
The invention is described in further detail below with reference to the following figures and embodiments:
the first embodiment is as follows:
referring to fig. 1 to 4, a control method of an electronic cam according to a first embodiment of the present invention can be executed by a control device of the electronic cam (hereinafter referred to as a control device). In particular, there are one or more processors within the control device to execute to implement the steps of:
and S1, acquiring a control curve of the motor.
As shown in fig. 2, in the present embodiment, the control device may be a servo driver or a servo motor controller, which is not particularly limited in the present invention.
On the basis of the above embodiment, in an optional embodiment of the present invention, the control curve is generated according to a table look-up method. Specifically, the operation track of the electronic cam can be well planned by obtaining the control curve through a table look-up method, and the theoretical position of the motor rotor can be obtained more accurately and directly. The cam curve can be generated by electronic equipment such as an upper computer, an encoder, a PLC, a computer and the like and is transmitted to the control equipment in a wired or wireless mode. The present invention does not specifically limit the device for generating the control curve and the transmission mode of the control curve.
And S3, predicting the predicted position of the motor rotor after N sampling moments through the prediction model according to the control curve.
The prediction model in the present embodiment may be a prediction model such as a conventional servo system state prediction algorithm based on deep learning or a conventional prediction model such as a prediction control algorithm of a permanent magnet synchronous motor, which is not particularly limited in the present invention.
In this embodiment, the motor is a servo motor, which can be synchronized with the control signal well. The control equipment controls parameters such as the rotating angle, the rotating speed and the like of the motor rotor through pulse signals. One sampling moment is one control step length. The predicted position refers to an angle of a rotor of the electric machine. And the current of the q axis of the motor can be calculated according to the motion parameters of the motor rotor.
On the basis of the above embodiment, in an alternative embodiment of the present invention, before step S3, step S2 is further included.
And S2, constructing a prediction model.
In the embodiment, a better prediction model is obtained by constructing the prediction model, so that an accurate prediction position of a station can be obtained, the hysteresis of the control method provided by the embodiment is greatly reduced, and the robustness of the control method provided by the embodiment is improved. Preferably, the predictive model is capable of predicting the position of the next N sample instants at the current instant.
On the basis of the above embodiment, in an alternative embodiment of the present invention, step S2 includes step S2a and step S2 b.
And S2a, constructing a controlled autoregressive integral sliding average model according to the mechanical motion equation of the motor rotor.
In this embodiment, the servo motor is preferably a permanent magnet synchronous motor. The specific steps for constructing the controlled autoregressive integral moving average model are as follows:
first, a controlled autoregressive integrated sliding average (CARIMA) model of a transmission system is constructed from the mechanical equation of motion of a Permanent Magnet Synchronous Machine (PMSM) rotor. Specifically, the method comprises the following steps:
the mechanical motion equation of the PMSM rotor is as follows:
Figure BDA0002926888300000131
in the formula 1, JmTheta (k) is the rotational inertia of the motor, and F is the rotational angle of the rotor of the motorem(k) Is an electromagnetic torque, FlAnd B is a load torque, B is a motor viscous friction coefficient, theta (k) is a motor rotation angle, k is the current sampling moment, and a differential operator is represented by a square above a symbol.
Electromagnetic torque Fem(k) Satisfies the relationship:
Fem(k)=ktiq(k) (2)
in the formula 2, Fem(k) Is an electromagnetic torque, ktIs the motor torque coefficient, iq(k) Is the motor q-axis current.
Secondly, to establish the CARIMA model, the load torque F is measuredlThe resulting disturbance is converted into an electromagnetic torque Fem(k) In (1). Therefore, the transfer function of the motor position-current in the s-domain can be simplified as:
Figure BDA0002926888300000132
Again, using a zeroth order keeper and z-transform for equation 3, the z-domain transfer function of the mechanical motion is expressed as:
(1+a11z-1+a12z-2)θ(k)=(b10+b11z-1)iq(k-1) (4)
in formula 4, a11、a12、b10And b11The following relation is satisfied:
Figure BDA0002926888300000133
in formula 5, TsIs the sampling period.
Then, model calculation is simplified to let A (z)-1)=1+a11z-1+a12z-2,B(z-1)=b10+b11z-1Then equation 4 can be expressed as:
A(z-1)θ(k)=B(z-1)iq(k-1) (6)。
finally, considering the effect of the random disturbance ζ (k), the CARIMA model of the motion system is:
Figure BDA0002926888300000141
in formula 7, Δ ═ 1-z-1Representing differential operators
S2b, obtaining a prediction model through a Diphantine model according to a controlled autoregressive integral moving average model (CARIMA).
Specifically, the Diphantine recursion equation is
Figure BDA0002926888300000142
In equation 8, D (z)-1)、F(z-1)、G(z-1) And H (z)-1) For controlling process variables, can be represented by A (z)-1) And B (z)-1) The step of calculating the control process variable is obtained by calculation, which is the prior art and is not repeated in the invention. The resulting matrix expression is:
Figure BDA0002926888300000143
Figure BDA0002926888300000144
Figure BDA0002926888300000145
Figure BDA0002926888300000146
therefore, the best predicted output (i.e., the expression of the prediction model) of the rotor of the electric machine after N sampling times is:
Figure BDA0002926888300000147
in equation 9, k is the current sampling instant, N is the number of predicted sampling instants,
Figure BDA0002926888300000151
the predicted angle of the motor rotor at the sampling moment of k + N, G, H and F are variables in the motor control process, delta is a differential operator, Iq *(k + N-1) is the theoretical current of the q axis of the motor at the sampling moment of k + N-1, I q *(k + N) is the theoretical current of the q-axis of the motor at the sampling time of k + N, theta*And (k + N) is the theoretical angle of the motor rotor at the sampling moment of k + N.
And S4, calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the control curve.
In this embodiment, the tracking error is a difference between a predicted value of the motor rotor and a theoretical value of the motor rotor. And predicting the predicted position after N sampling moments according to the control curve, and then calculating the tracking error of the predicted position and the control curve to judge whether the control process has disturbance. The disturbance is restrained in time, so that the running stability of the electronic cam is greatly improved, the jitter of a controlled object at the inflection point of the curve is effectively restrained, and the uniform and continuous effects of the speed curve and the acceleration curve are realized.
On the basis of the foregoing embodiment, in an optional embodiment of the present invention, step S4 specifically includes:
and S4a, acquiring the theoretical angle of the motor rotor after N sampling moments according to the control curve.
And S4b, calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the theoretical angle. Wherein, the expression of the tracking error e (k + N) is:
Figure BDA0002926888300000152
where k is the current sampling instant, N is the number of predicted sampling instants, θ *(k + N) is the theoretical angle of the motor rotor at the sampling moment of k + N,
Figure BDA0002926888300000153
and the predicted angle of the motor rotor at the sampling moment of k + N is obtained.
In this embodiment, the theoretical angle is an angle of the motor rotor directly obtained according to the control curve. The control method of the embodiment can predict the tracking error and the disturbance condition of the motion curve of the motor rotor at the future moment in the execution process, make targeted operation in advance, and solve the problem that the control performance is reduced after the traditional table look-up method and online operation method are disturbed.
On the basis of the above embodiment, in an alternative embodiment of the present invention, step S5 is further included after step S4.
And S5, smoothing the prediction model according to the tracking error to obtain a correction model. Wherein the expression of the correction model is:
Figure BDA0002926888300000161
where k is the current sampling instant, N is the number of predicted sampling instants,
Figure BDA0002926888300000162
the correction angle of the motor rotor at the sampling moment of k + N, gamma is a smooth coefficient and the value range is [0, 1%],
Figure BDA0002926888300000163
Is the correction angle of the motor rotor at the sampling moment of k + N-1,
Figure BDA0002926888300000164
the predicted angle of the motor rotor at the sampling time k + N is obtained, and e (k + N) is the tracking error at the sampling time k + N.
In this embodiment, based on the tracking error of the previous embodiment, the predicted position is smoothed, and a more continuous predicted position can be obtained to ensure stable and smooth operation of the electronic cam.
And S6, acquiring the working condition information of the motor.
It will be appreciated that three-loop control is typically employed in servo systems. The control information of the motor includes the current of the q-axis of the motor, the rotation speed of the motor, and the position (i.e., the rotation angle) of the motor. The working condition information of the servo motor is obtained in the prior art, and is not described herein again.
And S8, calculating the error threshold of the motor at the current sampling moment through a self-adaptive error threshold model according to the working condition information.
Specifically, at the inflection point of the control curve, there are sudden changes in speed and acceleration, which cause the problems of motor seizure, jitter, etc., collectively referred to as disturbance. These disturbances can reduce the control accuracy of the motor. Therefore, in the embodiment, the disturbance is determined by setting the error threshold value to suppress the disturbance, so that the motor operates more stably and smoothly.
On the basis of the above embodiment, in an alternative embodiment of the present invention, before the step S8, the method further includes a step S7:
s7, constructing the adaptive threshold model;
in the present embodiment, an adaptive threshold is obtained by constructing an adaptive threshold model. Therefore, in the control process, the disturbance can be accurately judged, all the disturbances in the motor operation process are suppressed, and the motor operation is more stable.
On the basis of the above embodiment, in an alternative embodiment of the present invention, the step S7 includes steps S7a, S7b, and S7 c.
It should be noted that the factors influencing the error threshold in the online planning process of the electronic cam mainly include sampling errors and working condition changes. The sampling errors include position and current sampling errors.
S7a, constructing a position current sampling threshold error model; wherein the position current sampling threshold error model ε1(xi,xθ) The expression of (a) is:
Figure BDA0002926888300000171
in the formula: x is the number ofiTo sample the current, xθIs the sampling angle, n is the sampling number, k is the current sampling time,
Figure BDA0002926888300000172
as a sampling error of the current iq(k) Is the sampled current i of the q axis of the motor at the current sampling momentq(k-1) is the sampling current of the q axis of the motor at the sampling moment of k-1,
Figure BDA0002926888300000173
and theta (k) is a sampling angle of the motor rotor at the current sampling moment, and theta (k-1) is a sampling angle of the motor rotor at the sampling moment of k-1.
In this embodiment, the threshold error due to the sampling error is first calculated. It can be known from step S2 that errors in the position and current samples have an effect on the tracking error threshold.
S7b, constructing a working condition change threshold error model; wherein the threshold error model epsilon of the working condition change 2(xi) The expression of (a) is:
ε2(xi)=λiq(k)
in the formula: x is the number ofiFor sampling the current, λ is the transfer coefficient, iq(k) The current is the sampling current of the q axis of the motor at the current sampling moment, and k is the current sampling moment. Lambda characterizes the off between the current and the threshold change due to the current changeIs described.
In this embodiment, when the system operating condition changes, the current will change accordingly, and the tracking error will also change accordingly. Thus, the old threshold value is no longer satisfactory and an adaptive change of the threshold value according to the current change is required.
S7c, obtaining the self-adaptive threshold model according to the position current sampling threshold error model and the working condition change threshold error model; wherein the expression of the adaptive threshold model ε is:
ε=ε01(xi,xθ)+ε2(xi)
in the formula: epsilon0Is a predetermined basic threshold value, epsilon1(xi,xθ) Sampling threshold error, ε, for position current2(xi) A condition change threshold error.
In this embodiment, all factors that may affect the threshold error are considered comprehensively to obtain the most accurate adaptive threshold model, and the model is updated in real time according to the sampling data to adapt to the current control situation, so that the model can be used to determine the disturbance more accurately. The self-adaptive threshold model of the embodiment can self-adaptively adjust the self-adaptive error threshold according to the actual working condition and the sampling error of the motor in the control process, avoids the complex operation of an empirical method, and has good practical significance.
And S9, judging whether the tracking error is larger than the self-adaptive error threshold value.
In this embodiment, through the adaptive error threshold, the disturbance information at each moment can be accurately determined, so that all disturbances are suppressed, and the motor operation is more stable.
In the embodiment, in order to reduce disturbance and reduce the influence of the tracking error on the motion curve, a current component and a velocity component are introduced into an evaluation function, and a first evaluation function and a second evaluation function are respectively designed for the two situations of disturbance and non-disturbance so as to deal with different situations, so that the control signal is better compensated, and the tracking error is reduced.
And S10, when the tracking error is judged to be larger than the self-adaptive error threshold value, calculating to obtain a position compensation coefficient according to the control curve and the working condition information, and performing position compensation on the control signal at the current sampling moment according to the position compensation coefficient.
In this embodiment, a disturbance is present when the tracking error is greater than the adaptive error threshold. The compensation of large steps is performed by a position loop in the motor three-loop control when disturbance exists. Calculating to obtain a position compensation coefficient according to the control curve and the working condition information, wherein the position compensation coefficient specifically comprises the following steps:
And acquiring a position compensation coefficient through a first evaluation function according to the control curve and the working condition information. Wherein the first evaluation function J1The expression of (a) is:
Figure BDA0002926888300000181
wherein k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Alpha is a position compensation coefficient and the value range is [1, 2 ] for the theoretical angle of the motor rotor at the current sampling moment],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure BDA0002926888300000191
and the theoretical current of the q axis of the motor at the current sampling moment is shown.
Disturbance can be well restrained through large-step compensation, and the motor can run more stably.
The large-step compensation model for performing position compensation on the control signal at the current sampling moment according to the position compensation coefficient is as follows:
Figure BDA0002926888300000192
in the formula (I), the compound is shown in the specification,
Figure BDA0002926888300000193
compensated control angle for current timeDegree, theta*(k) Is the theoretical angle of the current moment, alpha is the position compensation coefficient, k is the current sampling moment, N is the number of sampling moments,
Figure BDA0002926888300000194
is the predicted angle theta of the motor rotor after smoothing processing at the sampling time of k-N*And (k-N) is the theoretical angle of the motor rotor at the sampling moment of k-N.
And S11, when the tracking error is judged to be smaller than the self-adaptive error threshold value, calculating to obtain a speed compensation coefficient according to the control curve and the working condition information, and performing speed compensation on the control signal at the current sampling moment according to the speed compensation coefficient.
In this embodiment, when the tracking error is less than the adaptive error threshold, there is no disturbance. When no disturbance exists, the step length of small step length is carried out through a speed ring in three-ring control of the motor, so that the motor can be controlled more accurately, and the running precision of the electronic cam is ensured. Calculating to obtain a speed compensation coefficient according to the control curve and the working condition information, wherein the speed compensation coefficient specifically comprises the following steps:
and acquiring a speed compensation coefficient through a second evaluation function according to the control curve and the working condition information. Wherein the second evaluation function J2The expression of (c) is:
Figure BDA0002926888300000195
wherein k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Beta is a speed compensation coefficient and the value range is [0, 1 ] which is the theoretical angle of the motor rotor at the current sampling moment],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure BDA0002926888300000201
is the theoretical current of the q axis of the motor at the current sampling moment, omega (k) is the sampling angular speed of the rotor of the motor at the current sampling moment, omega*(k) The theoretical angular velocity of the motor rotor at the current sampling moment.
The small step compensation model for performing speed compensation on the control signal at the current sampling moment according to the speed compensation coefficient is as follows:
Figure BDA0002926888300000202
In the formula (I), the compound is shown in the specification,
Figure BDA0002926888300000203
delta is a differential operator, v (k) is the speed of the motor rotor at the current moment, beta is a speed compensation coefficient,
Figure BDA0002926888300000204
is the predicted angle theta of the motor rotor after smoothing processing at the sampling time of k + N*(k + N) is the theoretical angle of the rotor of the motor at the sampling time k + N, theta*And (k + M) is the theoretical angle of the motor rotor at the sampling moment of k + M, theta (k + M) is the sampling angle of the motor rotor at the sampling moment of k + M, k is the current sampling moment, and N and M are the number of the sampling moments respectively.
And S12, controlling the motor according to the compensated control signal.
The control method provided by the embodiment can realize self-adaptive compensation for disturbance and tracking errors, a large-step compensation method is adopted when the disturbance occurs, the influence of the disturbance is reduced in the shortest time, otherwise, a small-step compensation method is adopted, the tracking performance of the controlled object is improved, and the influence of under-compensation or over-compensation in the single fixed-step compensation method realization process on the control performance is avoided.
And moreover, a prediction algorithm is combined with a curve quadratic programming technology to realize online adjustment of the cam motion curve and improve the robustness and tracking performance of the controlled object.
Example II,
Referring to fig. 5, an embodiment of the invention provides a control device for an electronic cam, which includes the following modules:
And the curve acquisition module 1 is used for acquiring a control curve of the motor.
And the position prediction module 3 is used for predicting the predicted position of the motor rotor after N sampling moments through the prediction model according to the control curve.
And the error calculation module 4 is used for calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the control curve.
And the working condition acquisition module 6 is used for acquiring the working condition information of the motor.
And the threshold calculation module 8 is used for calculating the error threshold of the motor at the current sampling moment through a self-adaptive error threshold model according to the working condition information.
And an error judgment module 9, configured to judge whether the tracking error is greater than the adaptive error threshold.
And the position compensation module 10 is configured to calculate a position compensation coefficient according to the control curve and the working condition information when it is determined that the tracking error is greater than the adaptive error threshold, and perform position compensation on the control signal at the current sampling time according to the position compensation coefficient.
And the speed compensation module 11 is configured to calculate a speed compensation coefficient according to the control curve and the working condition information when it is determined that the tracking error is smaller than the adaptive error threshold, and perform speed compensation on the control signal at the current sampling time according to the speed compensation coefficient.
And the motor control module 12 is used for controlling the motor according to the compensated control signal.
Optionally, the control curve is generated according to a table look-up method.
Optionally, the control device further comprises
And the prediction model building module is used for building a prediction model.
And the threshold model building module is used for building an adaptive threshold model.
Optionally, the prediction model building module comprises:
and the average model unit is used for constructing a controlled autoregressive integral sliding average model according to the mechanical motion equation of the motor rotor.
And the prediction model construction unit is used for obtaining a prediction model through a Diphantine model according to the controlled autoregressive integral moving average model. Wherein, the expression of the prediction model is as follows:
Figure BDA0002926888300000211
where k is the current sampling instant, N is the number of predicted sampling instants,
Figure BDA0002926888300000212
the predicted angle of the motor rotor at the sampling moment of k + N, G, H and F are variables in the motor control process, delta is a differential operator, Iq *(k + N-1) is the theoretical current of the q axis of the motor at the sampling moment of k + N-1, Iq *(k + N) is the theoretical current of the q-axis of the motor at the sampling time of k + N, theta*And (k + N) is the theoretical angle of the motor rotor at the sampling moment of k + N.
Optionally, the control device further comprises
And the correction model construction module is used for carrying out smoothing treatment on the prediction model according to the tracking error to obtain a correction model. Wherein the expression of the correction model is:
Figure BDA0002926888300000221
Where k is the current sampling instant, N is the number of predicted sampling instants,
Figure BDA0002926888300000222
the correction angle of the motor rotor at the sampling moment of k + N, gamma is a smooth coefficient and the value range is [0, 1 ]],
Figure BDA0002926888300000223
Is the correction angle of the motor rotor at the sampling moment of k + N-1,
Figure BDA0002926888300000224
is the predicted angle of the motor rotor at the sampling time of k + N, and e (k + N) is at the sampling time of k + NA tracking error.
Optionally, the operating condition information includes a sampled current x of a q-axis of the motoriAnd the sampling angle x of the motor rotorθ
Optionally, the threshold calculation module includes:
and the first model building unit is used for building a position current sampling threshold error model. Wherein, the error model epsilon of the position current sampling threshold value1(xi,xθ) The expression of (a) is:
Figure BDA0002926888300000225
in the formula, xiTo sample the current, xθIs the sampling angle, n is the sampling number, k is the current sampling time,
Figure BDA0002926888300000226
as a sampling error of the current iq(k) Is the sampled current i of the q axis of the motor at the current sampling momentq(k-1) is the sampling current of the q axis of the motor at the sampling moment of k-1,
Figure BDA0002926888300000227
and theta (k) is a sampling angle of the motor rotor at the current sampling moment, and theta (k-1) is a sampling angle of the motor rotor at the sampling moment of k-1.
And the second model building unit is used for building a working condition change threshold error model. Wherein, the threshold error model epsilon of the working condition change 2(xi) The expression of (a) is:
ε2(xi)=λiq(k)
in the formula, xiFor sampling the current, λ is the transfer coefficient, iq(k) The current is the sampling current of the q axis of the motor at the current sampling moment, and k is the current sampling moment.
And the threshold model building unit is used for obtaining the self-adaptive threshold model according to the position current sampling threshold error model and the working condition change threshold error model. Wherein the expression of the adaptive threshold model ε is:
ε=ε01(xi,xθ)+ε2(xi)
in the formula, epsilon0Is a predetermined basic threshold value, epsilon1(xi,xθ) For a model of the error of the sampling threshold of the position current, epsilon2(xi) And (3) a working condition change threshold error model.
Optionally, the error calculation module comprises:
and the theoretical angle acquisition unit is used for acquiring the theoretical angle of the motor rotor after N sampling moments according to the control curve.
And the tracking error calculation unit is used for calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the theoretical angle. Wherein, the expression of the tracking error e (k + N) is:
Figure BDA0002926888300000231
where k is the current sampling instant, N is the number of predicted sampling instants, θ*(k + N) is the theoretical angle of the motor rotor at the sampling moment of k + N,
Figure BDA0002926888300000232
and the predicted angle of the motor rotor at the sampling moment of k + N is obtained.
Optionally, according to the control curve and the operating condition information, a position compensation coefficient is calculated, specifically:
And acquiring a position compensation coefficient through a first evaluation function according to the control curve and the working condition information. Wherein the first evaluation function J1The expression of (a) is:
Figure BDA0002926888300000233
wherein k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) For the rotor of the machine at the present sampling momentThe theoretical angle, alpha, is a position compensation coefficient, and the value range is [1, 2 ]],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure BDA0002926888300000234
and the theoretical current of the q axis of the motor at the current sampling moment.
Optionally, according to the control curve and the operating condition information, a speed compensation coefficient is calculated, specifically:
and obtaining a speed compensation coefficient through a second evaluation function according to the control curve and the working condition information. Wherein the second evaluation function J2The expression of (a) is:
J2=(θ*(k)-θ(k))2+β(iq *(k)-iq(k))2+(1-β)(ω*(k)-ω(k))2
wherein k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Beta is a speed compensation coefficient and the value range is [0, 1 ] which is the theoretical angle of the motor rotor at the current sampling moment],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure BDA0002926888300000241
is the theoretical current of the q axis of the motor at the current sampling moment, omega (k) is the sampling angular velocity of the rotor of the motor at the current sampling moment, omega *(k) The theoretical angular velocity of the motor rotor at the current sampling moment.
Example III,
An embodiment of the present invention provides a control apparatus of an electronic cam, which includes a processor, a memory, and a computer program stored in the memory. The computer program is executable by the processor to implement the method of controlling an electronic cam according to any one of the first embodiment.
Example four,
The embodiment of the invention provides a computer-readable storage medium, which is characterized by comprising a stored computer program, wherein when the computer program runs, a device where the computer-readable storage medium is located is controlled to execute the control method of the electronic cam according to any one of the embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the present invention or a part thereof, which essentially contributes to the prior art, can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, an electronic device 100, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A method for controlling an electronic cam, comprising:
acquiring a control curve of a motor;
predicting the predicted position of the motor rotor after N sampling moments through a prediction model according to the control curve;
calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the control curve;
acquiring working condition information of the motor;
calculating an error threshold of the motor at the current sampling moment through a self-adaptive error threshold model according to the working condition information;
judging whether the tracking error is larger than the self-adaptive error threshold value or not;
when the tracking error is judged to be larger than the self-adaptive error threshold value, calculating to obtain a position compensation coefficient according to the control curve and the working condition information, and performing position compensation on the control signal at the current sampling moment according to the position compensation coefficient;
When the tracking error is judged to be smaller than the self-adaptive error threshold value, calculating to obtain a speed compensation coefficient according to the control curve and the working condition information, and performing speed compensation on a control signal at the current sampling moment according to the speed compensation coefficient;
controlling the motor according to the compensated control signal;
wherein, according to the control curve and the working condition information, a position compensation coefficient is obtained by calculation, which specifically comprises the following steps:
acquiring the position compensation coefficient through a first evaluation function according to the control curve and the working condition information; wherein the first evaluation function J1The expression of (a) is:
Figure FDA0003579322870000011
k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Alpha is a position compensation coefficient and the value range is [1, 2 ] for the theoretical angle of the motor rotor at the current sampling moment],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure FDA0003579322870000021
the theoretical current of the q axis of the motor at the current sampling moment is obtained;
wherein, according to the control curve and the working condition information, a speed compensation coefficient is obtained by calculation, which specifically comprises the following steps:
obtaining the speed through a second evaluation function according to the control curve and the working condition information A degree compensation coefficient; wherein the second evaluation function J2The expression of (c) is:
Figure FDA0003579322870000022
k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Beta is a speed compensation coefficient and the value range is [0, 1 ] which is the theoretical angle of the motor rotor at the current sampling moment],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure FDA0003579322870000023
is the theoretical current of the q axis of the motor at the current sampling moment, omega (k) is the sampling angular speed of the rotor of the motor at the current sampling moment, omega*(k) The theoretical angular velocity of the motor rotor at the current sampling moment.
2. The control method of claim 1, wherein the control curve is generated according to a table lookup;
before predicting the predicted position of the motor rotor after N sampling moments through a prediction model according to the control curve, the method further comprises the following steps: constructing the prediction model;
according to the working condition information, before calculating the error threshold of the motor at the current sampling moment through a self-adaptive error threshold model, the method further comprises the following steps: and constructing the adaptive threshold model.
3. The control method according to claim 2, characterized in that the predictive model is constructed, in particular:
Constructing a controlled autoregressive integral sliding average model according to a mechanical motion equation of the motor rotor;
obtaining the prediction model through a Diphantine model according to the controlled autoregressive integral moving average model; wherein the expression of the prediction model is:
Figure FDA0003579322870000031
k being the current sampling instant, N being the number of predicted sampling instants,
Figure FDA0003579322870000032
the predicted angle of the motor rotor at the sampling moment of k + N, G, H and F are variables in the motor control process, delta is a differential operator, Iq *(k + N-1) is the theoretical current of the q axis of the motor at the sampling moment of k + N-1, Iq *(k + N) is the theoretical current of the q-axis of the motor at the sampling time of k + N, theta*(k + N) is the theoretical angle of the motor rotor at the sampling moment of k + N;
after calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the control curve, the method further comprises the following steps:
according to the tracking error, smoothing the prediction model to obtain a correction model; wherein the expression of the correction model is as follows:
Figure FDA0003579322870000033
k being the current sampling instant, N being the number of predicted sampling instants,
Figure FDA0003579322870000034
the correction angle of the motor rotor at the sampling moment of k + N, gamma is a smooth coefficient and the value range is [0, 1% ],
Figure FDA0003579322870000035
Is the correction angle of the motor rotor at the sampling moment of k + N-1,
Figure FDA0003579322870000036
prediction of motor rotor at sampling time k + NThe angle, e (k + N), is the tracking error at the sampling instant k + N.
4. The control method according to claim 2, wherein the condition information includes a sampled current x of a q-axis of the motoriAnd the sampling angle x of the motor rotorθ
Constructing the self-adaptive threshold model, specifically:
constructing a position current sampling threshold error model; wherein the position current sampling threshold error model ε1(xi,xθ) The expression of (c) is:
Figure FDA0003579322870000037
xito sample the current, xθIs the sampling angle, n is the sampling number, k is the current sampling time,
Figure FDA0003579322870000038
as a sampling error of the current iq(k) Is the sampled current i of the q axis of the motor at the current sampling momentq(k-1) is the sampling current of the q axis of the motor at the sampling moment of k-1,
Figure FDA0003579322870000041
the sampling error of the angle is theta (k) which is the sampling angle of the motor rotor at the current sampling moment, and theta (k-1) which is the sampling angle of the motor rotor at the k-1 sampling moment;
constructing a working condition change threshold error model; wherein the threshold error model epsilon of the working condition change2(xi) The expression of (c) is:
ε2(xi)=λiq(k)
xifor sampling the current, λ is the transfer coefficient, iq(k) The current is the sampling current of the q axis of the motor at the current sampling moment, and k is the current sampling moment;
Obtaining the self-adaptive threshold model according to the position current sampling threshold error model and the working condition change threshold error model; wherein the expression of the adaptive threshold model ε is:
ε=ε01(xi,xθ)+ε2(xi)
ε0is a predetermined base threshold value, epsilon1(xi,xθ) For a model of the error of the sampling threshold of the position current, epsilon2(xi) And (3) a working condition change threshold error model.
5. The control method according to claim 1, wherein the tracking error of the motor rotor after N sampling instants is calculated based on the predicted position and the control curve, specifically:
obtaining theoretical angles of the motor rotor after N sampling moments according to the control curve;
calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the theoretical angle; wherein the tracking error e (k + N) has the expression:
Figure FDA0003579322870000042
k is the current sampling instant, N is the number of predicted sampling instants, θ*(k + N) is the theoretical angle of the motor rotor at the sampling moment of k + N,
Figure FDA0003579322870000043
and the predicted angle of the motor rotor at the sampling moment of k + N is obtained.
6. A control device for an electronic cam, comprising:
the curve acquisition module is used for acquiring a control curve of the motor;
The position prediction module is used for predicting the predicted position of the motor rotor after N sampling moments through a prediction model according to the control curve;
the error calculation module is used for calculating the tracking error of the motor rotor after N sampling moments according to the predicted position and the control curve;
the working condition acquisition module is used for acquiring the working condition information of the motor;
the threshold calculation module is used for calculating an error threshold of the motor at the current sampling moment through a self-adaptive error threshold model according to the working condition information;
the error judgment module is used for judging whether the tracking error is larger than the self-adaptive error threshold value or not;
the position compensation module is used for calculating a position compensation coefficient according to the control curve and the working condition information when the tracking error is judged to be larger than the self-adaptive error threshold value, and performing position compensation on the control signal at the current sampling moment according to the position compensation coefficient;
the speed compensation module is used for calculating to obtain a speed compensation coefficient according to the control curve and the working condition information when the tracking error is judged to be smaller than the self-adaptive error threshold value, and performing speed compensation on the control signal at the current sampling moment according to the speed compensation coefficient;
The motor control module is used for controlling the motor according to the compensated control signal;
wherein, according to the control curve and the working condition information, a position compensation coefficient is calculated, specifically:
acquiring the position compensation coefficient through a first evaluation function according to the control curve and the working condition information; wherein the first evaluation function J1The expression of (a) is:
Figure FDA0003579322870000051
k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Alpha is a position compensation coefficient for the theoretical angle of the motor rotor at the current sampling momentThe value range is [1, 2 ]],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure FDA0003579322870000052
the theoretical current of the q axis of the motor at the current sampling moment is obtained;
wherein, according to the control curve and the working condition information, a speed compensation coefficient is obtained by calculation, which specifically comprises the following steps:
acquiring the speed compensation coefficient through a second evaluation function according to the control curve and the working condition information; wherein the second evaluation function J2The expression of (a) is:
Figure FDA0003579322870000061
k is the current sampling time, theta (k) is the sampling angle of the motor rotor at the current sampling time, and theta*(k) Beta is the theoretical angle of the motor rotor at the current sampling moment, beta is a speed compensation coefficient, and the value range is [0, 1 ] ],iq(k) Is the sampled current of the q axis of the motor at the current sampling moment,
Figure FDA0003579322870000062
is the theoretical current of the q axis of the motor at the current sampling moment, omega (k) is the sampling angular speed of the rotor of the motor at the current sampling moment, omega*(k) The theoretical angular velocity of the motor rotor at the current sampling moment.
7. The control device of claim 6, wherein the control curve is generated according to a table lookup; the control device also comprises
The prediction model construction module is used for constructing the prediction model;
and the threshold model building module is used for building the self-adaptive threshold model.
8. A control apparatus of an electronic cam, comprising a processor, a memory, and a computer program stored in the memory; the computer program is executable by the processor to implement the control method of the electronic cam according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored computer program, wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the control method of the electronic cam according to any one of claims 1 to 5.
CN202110135763.7A 2021-02-01 2021-02-01 Control method, device, equipment and storage equipment of electronic cam Active CN112965439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110135763.7A CN112965439B (en) 2021-02-01 2021-02-01 Control method, device, equipment and storage equipment of electronic cam

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110135763.7A CN112965439B (en) 2021-02-01 2021-02-01 Control method, device, equipment and storage equipment of electronic cam

Publications (2)

Publication Number Publication Date
CN112965439A CN112965439A (en) 2021-06-15
CN112965439B true CN112965439B (en) 2022-06-14

Family

ID=76272662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110135763.7A Active CN112965439B (en) 2021-02-01 2021-02-01 Control method, device, equipment and storage equipment of electronic cam

Country Status (1)

Country Link
CN (1) CN112965439B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113984424B (en) * 2021-11-08 2023-10-27 深圳市汇川技术股份有限公司 Diagnostic method, device, equipment and storage medium for electronic cam function application
CN115740621B (en) * 2022-11-01 2023-08-18 凯控自动化设备(天津)有限公司 Feeding method of profiling milling flying saw in sawing right-angle square tube

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6295498B1 (en) * 2000-05-22 2001-09-25 General Motors Corporation Dynamic load compensation method for an automatic transmission shift pattern
CN101635119A (en) * 2009-08-07 2010-01-27 总装备部工程设计研究总院 Synchronous control method for collecting, releasing and unfolding picture scroll and collecting and releasing long-distance flexible wire ropes of picture scroll
CN102854840A (en) * 2012-09-24 2013-01-02 沈阳工业大学 Direct-driven XY table profile control method based on predictive control and cross coupling
CN109240156A (en) * 2018-09-07 2019-01-18 南京理工大学 A kind of control system and method for laser radar galvanometer servo motor
CN109586646A (en) * 2018-12-07 2019-04-05 中冶南方(武汉)自动化有限公司 A kind of method that permanent magnet synchronous motor angular error is adaptive
CN109951129A (en) * 2017-12-21 2019-06-28 北京大豪科技股份有限公司 Motor control method, device and the electronic equipment of position-sensor-free
CN110968037A (en) * 2019-10-31 2020-04-07 天津工业大学 Control method for reducing contour error of multi-axis motion system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6295498B1 (en) * 2000-05-22 2001-09-25 General Motors Corporation Dynamic load compensation method for an automatic transmission shift pattern
CN101635119A (en) * 2009-08-07 2010-01-27 总装备部工程设计研究总院 Synchronous control method for collecting, releasing and unfolding picture scroll and collecting and releasing long-distance flexible wire ropes of picture scroll
CN102854840A (en) * 2012-09-24 2013-01-02 沈阳工业大学 Direct-driven XY table profile control method based on predictive control and cross coupling
CN109951129A (en) * 2017-12-21 2019-06-28 北京大豪科技股份有限公司 Motor control method, device and the electronic equipment of position-sensor-free
CN109240156A (en) * 2018-09-07 2019-01-18 南京理工大学 A kind of control system and method for laser radar galvanometer servo motor
CN109586646A (en) * 2018-12-07 2019-04-05 中冶南方(武汉)自动化有限公司 A kind of method that permanent magnet synchronous motor angular error is adaptive
CN110968037A (en) * 2019-10-31 2020-04-07 天津工业大学 Control method for reducing contour error of multi-axis motion system

Also Published As

Publication number Publication date
CN112965439A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN112965439B (en) Control method, device, equipment and storage equipment of electronic cam
CN108233781B (en) Direct current motor self-adaptive inversion sliding mode control method based on disturbance observer
CN106774273B (en) For the algorithm based on sliding mode prediction fault tolerant control method of time_varying delay control system actuator failures
CN107070341B (en) Permanent magnet synchronous motor method for suppressing torque ripple based on Robust Iterative Learning Control
EP1439440B1 (en) Servo motor drive control device
Zhang et al. Novel prescribed performance-tangent barrier Lyapunov function for neural adaptive control of the chaotic PMSM system by backstepping
CN111290263B (en) Improved PID (proportion integration differentiation) optimization control algorithm based on RBFNN (radial basis function network) and BAS (basic automatic component analysis)
Ben Regaya et al. Electric drive control with rotor resistance and rotor speed observers based on fuzzy logic
CN110572107A (en) Debugging-free control method and device for servo system
CN104009696A (en) Interactive model reference adaptive speed and stator resistance identification method based on sliding-mode control
CN110649845B (en) Photoelectric turntable position tracking control method based on robust generalized predictive control
Butt et al. Intelligent speed control of interior permanent magnet motor drives using a single untrained artificial neuron
CN112910328B (en) Permanent magnet synchronous motor acceleration arrangement method based on torque observation compensation
CN113726234A (en) PID control-based stepping motor double-closed-loop control method and system
CN107565866B (en) Prediction-based method for correcting directional deviation of indirect rotor magnetic field of induction motor
Papageorgiou et al. Friction-resilient position control for machine tools—adaptive and sliding-mode methods compared
Qu et al. Novel generalized predictive control for photoelectric tracking system based on improved objective function and predictive value correction
Mallick et al. Performance study of different model reference adaptive control techniques applied to a DC motor for speed control
Piao et al. Friction compensation and limit cycle suppression at low velocities based on extended state observer
CN114665780A (en) Control method, device and equipment of permanent magnet synchronous motor and storage medium
CN113890424A (en) Parameter identification-based permanent magnet synchronous motor speed loop PI controller tuning method
CN107741731B (en) Error processing method caused by S-curve calculation precision
CN107453660B (en) A kind of novel mechanical elastic energy storage system stored energy course location tracking and controlling method
CN111614299A (en) Direct torque control method based on ant colony optimization PID permanent magnet synchronous motor
CN106357170B (en) Determination of characteristic curves for brushless DC motors

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
GR01 Patent grant
GR01 Patent grant