CN115903453B - Motor control method, control system and electronic equipment - Google Patents
Motor control method, control system and electronic equipment Download PDFInfo
- Publication number
- CN115903453B CN115903453B CN202211216199.2A CN202211216199A CN115903453B CN 115903453 B CN115903453 B CN 115903453B CN 202211216199 A CN202211216199 A CN 202211216199A CN 115903453 B CN115903453 B CN 115903453B
- Authority
- CN
- China
- Prior art keywords
- motor
- controller
- output
- model
- reference 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 230000004044 response Effects 0.000 claims description 37
- 230000007246 mechanism Effects 0.000 claims description 31
- 238000004422 calculation algorithm Methods 0.000 claims description 17
- 230000003044 adaptive effect Effects 0.000 claims description 16
- 230000010355 oscillation Effects 0.000 claims description 16
- 238000005457 optimization Methods 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 9
- 230000006978 adaptation Effects 0.000 claims description 2
- 230000006870 function Effects 0.000 description 17
- 238000012545 processing Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 230000008901 benefit Effects 0.000 description 8
- 238000001514 detection method Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 8
- 230000000694 effects Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 230000007423 decrease Effects 0.000 description 5
- 238000012544 monitoring process Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 4
- 230000032683 aging Effects 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 4
- 229920001621 AMOLED Polymers 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 230000001276 controlling effect Effects 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 2
- 238000011478 gradient descent method Methods 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000000630 rising effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000013529 biological neural network Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 210000004027 cell Anatomy 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000006866 deterioration Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000010985 leather Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000000704 physical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007858 starting material Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Control Of Electric Motors In General (AREA)
Abstract
The application provides a control method, a control system and electronic equipment of a motor, wherein initial controller parameters are preset, an initial reference model is set according to the preset initial controller parameters, whether the deviation between the output of an actual motor and the output of the reference model is smaller than a preset value is compared, if not, the optimal controller parameters in the current motor state are obtained, and the controller is updated by utilizing the optimal controller parameters so that the output of the motor meets preset requirements. Because the output performance state of the actual motor can be monitored in real time, after the performance of the actual motor is identified, the parameters of the controller can be automatically adjusted, the output of the motor is ensured to meet the requirement, and the stability of a motor control system is ensured.
Description
Technical Field
The application relates to the technical field of terminals, in particular to a motor control method, a motor control system and electronic equipment.
Background
With the development of electronic technology, electronic devices such as mobile phones are equipped with a camera module, and generally, a lens module realizes functions of photographing, video recording, and the like of the mobile phone through the camera module. Generally, a Voice Coil Motor (VCM) is disposed in the camera module, and the voice Coil Motor is a device for converting electric energy into mechanical energy, and is applied to the camera module, and through a controller and a Motor driver, functions of auto-focusing, optical anti-shake and the like of the camera module can be achieved.
Currently, motor control systems include: the controller sets parameters in advance (the parameters of the controller are not changed after being set), and the controller is put into the motor control system for use, so that the output of the motor control system can meet the requirements.
However, as the user uses the camera, the motor will age, and the output of the motor will not reach the index requirement, which affects the normal use of the mobile phone, for example, the camera module will not be in normal focus.
Disclosure of Invention
In order to solve the problems, the application provides a control system and a control method of a motor and electronic equipment, and the influence of motor aging on normal use of a user is reduced.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, a method for controlling a motor is provided, the method comprising: presetting initial controller parameters; setting an initial reference model based on initial controller parameters; comparing whether the deviation between the output of the actual motor and the output of the reference model is smaller than a preset value; if not, acquiring the optimal controller parameters under the current motor state; and updating the controller by utilizing the optimal controller parameters so that the output of the motor meets the preset requirement. According to the motor control method, the output performance of the motor is detected by detecting the deviation between the output of the actual motor and the output of the reference model, and when the output performance of the motor is identified to be reduced, the parameters of the controller are automatically adjusted, so that the output of the motor is ensured to meet the requirements, and the stability of a control system of the motor is further ensured.
In some possible implementations, the current motor model is obtained from the deviation of the actual motor output from the reference model output; and setting the optimal controller parameters under the current motor state based on the motor model. And obtaining a motor model according to the deviation so as to conveniently obtain the optimal controller parameters under the current motor state.
In some possible implementations, based on the motor model, calculating an initial value of the controller parameter using a critical proportional band method; based on the initial value, iterating the controller parameters using an optimization algorithm; and when the controller parameter meets the index of the step response, taking the controller parameter meeting the index of the step response as an optimal controller parameter. The critical proportion band method is used, so that the optimal controller parameters are conveniently calculated, the accuracy is high, and the stability of motor output is further ensured.
In some possible implementations, the type of controller may be a PID controller, with the controller parameters of the PID controller being Kp, ki, kd. Setting the value of Ki to 0 and Kd to 0; increasing Kp on the basis of a motor model until the output of the motor model reaches critical stability; taking the value of Kp of the motor model with the output reaching critical stability as critical gain, and recording the output oscillation period of the motor model under the critical gain as critical oscillation period; and acquiring an initial value of a controller parameter based on the critical gain and the critical oscillation period.
In some possible implementations, the optimization algorithm may be a minimum likelihood estimation, a gradient descent method, and a basin jump method. The optimization algorithm may be one of the types described above, or a combination of the types.
In some possible implementations, the indicators of the step response may be the rise time of the step response, the overshoot of the step response, and the settling period of the step response.
In some possible implementations, the initial reference model is updated based on the optimal controller parameters and motor model. The motor state monitoring system has the advantages that the motor state is continuously monitored, misjudgment on the motor state is reduced, the motor state detection accuracy is improved, and the motor output stability is further guaranteed.
In some possible implementations, the tuning completion signal is sent so that after the tuning completion signal is received, the deviation of the actual motor output from the reference model output is continuously monitored. In order to achieve continuous monitoring of the output state of the motor after updating the controller parameters.
In some possible implementations, if the deviation between the actual motor output and the reference model output is smaller than a preset value, the closed-loop control of the motor is continued. When the motor output can meet the requirement, the controller parameter is not updated, and the waste of resources is avoided.
In a second aspect, embodiments of the present application provide a control system for a motor that includes a controller, a motor drive, a motor, a sensor, a reference model, a motor monitor, and an adaptive mechanism. Wherein the controller is used for outputting control quantity to the motor for driving according to the input; the motor drive is used for outputting a current signal meeting the motor requirement according to the control quantity; the motor is used for outputting according to the current signal; wherein the sensor is for measuring the motor output; the reference model is used for outputting motor output in an initial state according to input; the motor monitor is used for detecting whether the deviation between the motor output and the reference model output is smaller than a preset value, if not, the deviation is sent to the self-adaptive mechanism; the self-adaptive mechanism is used for acquiring the optimal controller parameters under the current motor state when the motor monitor detects that the motor output and the reference model output are larger than the preset value, and updating the controller by utilizing the optimal controller parameters. According to the motor control system, the output performance of the motor is detected by detecting the deviation between the output of the actual motor and the output of the reference model, and when the output performance of the motor is identified to be reduced, the parameters of the controller are automatically adjusted, so that the output of the motor is ensured to meet the requirements, and the stability of the motor control system is further ensured.
In some possible implementations, the adaptive mechanism is specifically configured to: obtaining a current motor model according to the deviation; and setting the optimal controller parameters under the current motor state based on the motor model. And obtaining a motor model according to the deviation so as to conveniently obtain the optimal controller parameters under the current motor state.
In some possible implementations, the adaptive mechanism is specifically configured to: calculating an initial value of a controller parameter by using a critical proportion band method based on a motor model; based on the initial value, iterating the controller parameters using an optimization algorithm; and when the controller parameter meets the index of the step response, taking the controller parameter meeting the index of the step response as an optimal controller parameter. The critical proportion band method is used, so that the optimal controller parameters are conveniently calculated, the accuracy is high, and the stability of motor output is further ensured.
In some possible implementations, the controller is a PID controller; the PID controller parameters include: kp, ki and Kd; the self-adaptive mechanism sets the Ki value to be 0, the Kd value to be 0, and Kp is increased based on the motor model until the output of the motor model reaches critical stability; and taking the value of Kp of which the output reaches critical stability as critical gain, recording the output oscillation period of the motor model under the critical gain as critical oscillation period, and acquiring the initial value of the controller parameter according to the critical gain and the critical oscillation period.
In some possible implementations, the adaptive mechanism is further configured to: and updating the initial reference model according to the optimal controller parameters and the motor model. The motor state monitoring system has the advantages that the motor state is continuously monitored, misjudgment on the motor state is reduced, the motor state detection accuracy is improved, and the motor output stability is further guaranteed.
In some possible implementations, the adaptive mechanism is further configured to: after the optimal controller parameters are updated to the controller, a setting completion signal is sent to the motor monitor, and the motor monitor continuously monitors the deviation of the actual motor output and the reference model output after receiving the setting completion signal. The continuous detection of the motor state is facilitated.
In some possible implementations, the motor monitor is further configured to not activate the adaptive mechanism when the motor monitor detects that the deviation of the output of the motor from the output of the reference model is less than a preset value, so that the motor continues to perform closed-loop control. When the motor output can meet the requirement, the controller parameter is not updated, and the waste of resources is avoided.
In a third aspect, the present application provides an electronic device comprising an acceleration sensor, a processor and a memory; the acceleration sensor is used for acquiring the acceleration of the electronic equipment; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to cause the processor to perform the method of the first aspect described above.
In a fourth aspect, the present application provides a computer readable storage medium having stored therein a computer program or instructions which, when executed, implement the method of the first aspect described above.
In a fifth aspect, the present application provides a computer program product comprising a computer program or instructions which, when executed by a processor, performs the method of the first aspect described above.
It should be appreciated that the description of technical features, aspects, benefits or similar language in this application does not imply that all of the features and advantages may be realized with any single embodiment. Conversely, it should be understood that the description of features or advantages is intended to include, in at least one embodiment, the particular features, aspects, or advantages. Therefore, the description of technical features, technical solutions or advantageous effects in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and advantageous effects described in the present embodiment may also be combined in any appropriate manner. Those of skill in the art will appreciate that an embodiment may be implemented without one or more particular features, aspects, or benefits of a particular embodiment. In other embodiments, additional features and advantages may be recognized in certain embodiments that may not be present in all embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a schematic diagram of a closed loop control system for a motor;
fig. 2 is a schematic diagram of a control system of a motor according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an internal structure of a reference model according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for obtaining optimal controller parameters according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a calculation flow of a critical ratio zone according to an embodiment of the present application;
fig. 6 is a flow chart of a control method of a motor according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include, for example, "one or more" such forms of expression, unless the context clearly indicates to the contrary. It should also be understood that in embodiments of the present application, "one or more" means one, two, or more than two; "and/or", describes an association relationship of the association object, indicating that three relationships may exist; for example, a and/or B may represent: a alone, a and B together, and B alone, wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The plurality of the embodiments of the present application refers to greater than or equal to two. It should be noted that, in the description of the embodiments of the present application, the terms "first," "second," and the like are used for distinguishing between the descriptions and not necessarily for indicating or implying a relative importance, or alternatively, for indicating or implying a sequential order.
For clarity and conciseness in the description of the following embodiments, a brief description of the related art will be given first:
Fig. 1 is a schematic diagram of a closed loop control system for a motor, and fig. 1 includes a controller 100, a motor drive 200, a motor 300, and a sensor 400. A closed loop control system is a type of control system, specifically: and feeding back a part or all of the output quantity of the control system to the input end of the system through a certain method and device, comparing the feedback information with the original input information, and applying the comparison result to the system for control. Wherein the set point r is the amount of output of the closed loop control system of the desired motor; the controlled quantity y is the quantity actually output by a closed-loop control system of the motor; the deviation e is the difference between the set value r and the controlled quantity y; the control amount u is an operation amount for controlling the motor drive output from the controller 100.
The controller 100 is a PID controller, which is a controller that performs control by using a PID control algorithm. The PID control algorithm is a control algorithm integrating three links of Proportional (P), integral (I) and Differential (D), and is the most widely applied control algorithm currently, the control principle of the PID controller is to operate according to the input deviation value and the function relation of the Proportional, integral and Differential, and the operation result is used for the output of the controller.
The proportional, integral and derivative effects in the PID controller are described separately as follows.
The proportional control actually reflects the deviation signal of the control system proportionally (i.e., the proportional first reflected deviation amount e), and once the deviation is generated, the control action is generated to reduce the deviation. The output u of the proportional controller is proportional to the deviation e, and the deviation can be rapidly reflected, thereby reducing the deviation. The magnitude of the proportional control action depends on the magnitude of the proportional gain Kp (which may also be the proportional adjustment coefficient Kp) in addition to the deviation e. The smaller the proportional gain Kp, the smaller the control effort and the slower the system response; conversely, the larger the proportional gain Kp, the stronger the control action, the faster the system response, but an excessive Kp will cause the system to generate larger overshoot and oscillation, resulting in a deterioration of the stability performance of the system. Therefore, kp cannot be selected too much, and Kp should be selected in a compromise according to the characteristics of the controlled object, so that the static difference of the system is controlled within an allowable range, and the response speed is high.
The function of the integral control is to eliminate the residual difference of the automatic control system, the integral control function is related to the existence time of the deviation e, the integral control is continuously operated as long as the deviation exists in the system, the input deviation e is integrated, and the controller output generates control function to reduce the deviation. The magnitude of the integration depends on the integral adjustment coefficient Ki, and the greater the integral coefficient Ki, the weaker the integration and vice versa. However, too large Ki can cause the control system to overshoot and even oscillate.
The differential control can reflect the change trend (change rate) of the deviation e, and can improve the dynamic performance of the system, predict the trend of the deviation e and correct the deviation e in advance, so that the action speed of the system is increased, and the adjustment time is reduced. The smaller the differential adjustment coefficient Kd is, the smaller the control function is, the slower the system response is, and the overshoot is increased; the larger the differential adjustment coefficient Kd is, the stronger the control function is, the faster the system response is, but the larger the Kd is, the response process is excessively braked in advance, the adjustment time is prolonged, and the system is unstable.
The motor drive 200 is used for outputting a current signal meeting the requirement of the motor 300 according to the control amount u output by the controller 100. Because a typical digital controller is not capable of directly generating a current signal that meets the motor requirements, a motor drive is required to drive the motor. The motor drive may be a progressive motor drive, a direct current servo motor drive, a synchronous alternating current servo motor drive, or the like, and in particular, an appropriate motor drive may be selected according to the type of motor, and the present application is not particularly limited.
The motor 300 is referred to as a controlled object in a closed-loop control system of the motor. The motor (motorr) is an electric motor or an engine. The working principle is that the power-on coil is stressed in a magnetic field to drive the starter rotor to rotate, and the pinion on the rotor drives the engine flywheel to rotate. The motor includes: hydraulic motors, high-speed motors, vane motors, etc., the kind of motor of the present application is not particularly limited. In the embodiments of the present application, a Voice Coil Motor (VCM) is taken as an example for illustration.
Wherein the sensor 400 measures the output of the motor 300 (the output of the closed loop control system of the motor), i.e. the sensor 400 can measure the value of the controlled quantity y. The sensor comprises: capacitive sensors, variable reluctance sensors, magneto-dependent sensors, hall sensors, etc., are not limited in this application. In the embodiment of the present application, the sensor 400 is exemplified as a hall sensor.
The control process of the closed loop control system of the motor is specifically described with reference to fig. 1. Before the closed-loop control system of the motor operates, parameters of the controller 100 need to be preset, for example, values of Kp, ki, kd of the controller 100 are preset by taking the controller 100 as a PID controller, and the parameters of the controller 100 are closely related to physical characteristics of the motor and performance indexes of the controller 100. The controller 100 with the set parameters is applied to a closed loop control system of the motor.
The input end inputs a set value r to the controller 100; the controller 100 outputs a control amount u to the motor drive 200 according to the set value r; the motor drive 200 outputs a current signal meeting the requirement of the motor 300 according to the control quantity u to control the motor 300 to operate; the motor 300 operates according to the current signal output from the motor drive 200 and outputs a controlled variable y; the sensor 400 measures the output of the motor 300, that is, the controlled quantity y of the motor 300, and feeds back to the input terminal; then comparing the controlled quantity y with a set quantity r to obtain a deviation e of the controlled quantity y and the set quantity; inputting the deviation e to the controller 100; the controller 100 outputs a control amount u to the motor driver 200 according to the deviation e and a preset parameter; the motor drive 200 drives the motor 300 to operate, and the motor 300 outputs a controlled quantity y; the sensor 400 measures the controlled variable y, returns to the input terminal, calculates the deviation e between the set value r and the controlled variable y, and inputs the deviation e to the controller 100, thereby circulating the process. A closed loop control system of the motor is realized.
Although the closed-loop control system of the motor can reduce the deviation of the controlled quantity and the set value of the motor output through the controller to a certain extent, the motor can be aged along with the use of a user, for example, the problems of amplitude reduction of the motor output, frequency reduction of motor vibration, unstable motor vibration and the like occur, the parameters of the controller leaving the factory are kept, the control quantity control performance of the controller output is reduced, so that the deviation cannot be reduced, the output of the motor system cannot reach the index requirement, and even the motor control system is unstable.
In addition, in the prior art, a motor control system is added with a vibration judging device, if the motor continuously vibrates (that is, the motor ages), the output value is forcibly stabilized. The motor control system does not solve the problem at all, and judges that the motor continuously oscillates for a period of time, so that the use experience of a user is affected.
The application provides a control system of motor, in the closed loop control system of current motor, increased motor monitor, self-adaptation and reference model, after discernment motor's output performance decline (namely motor system performance decline back), automatically regulated controller's parameter for motor output can satisfy the demand, has ensured motor system's performance.
Fig. 2 is a schematic diagram of a control system of a motor according to an embodiment of the present application, where the control system of the motor includes: controller 100, motor drive 200, motor 300, sensor 400, reference model 500, motor monitor 600, and adaptive mechanism 700. That is, the motor control system provided in the embodiment of the present application is that the reference model 500, the motor monitor 600 and the adaptive mechanism 700 are added in the existing motor closed-loop control system. Wherein the controller 100 is exemplified by a PID controller.
Wherein the reference model 500 simulates an open loop control system of the entire motor. Fig. 3 is a schematic diagram of an internal structure of a reference model according to an embodiment of the present application, and according to fig. 3, a reference model 500 includes: the controller 101, the motor drive 201, and the motor 301, wherein the controller 101 is equivalent to the controller 100, the motor drive 201 is equivalent to the motor drive 200, and the motor 301 is equivalent to the motor 300, so the reference model 500 is equivalent to an open loop control system constituted by the controller 100, the motor drive 200, and the motor 300. Wherein the motor 301 is equivalent to the motor 300 when it is not aged.
The reference model 500 can output a reference output y according to the deviation e of the input end input m Since the motor 301 in the reference model 500 does not age during use, the reference model must be the optimal output of the motor in the control system based on the input/output of the input, referred to as the reference output y m . That is, when the motor state is not aged, and the controller parameter is a preset parameter, the optimal output of the motor 301 is the reference output y m 。
Wherein the motor monitor 600 can detect the reference output y m Deviation e from the controlled variable y output from the motor 300 m Whether greater than a preset value. If the deviation e m If the output of the motor 300 is greater than the preset value, which indicates that the output performance of the motor 300 is reduced (the motor 300 is aged), the output of the motor 300 cannot meet the requirement, and the deviation e is generated m To the adaptation mechanism 700; if the deviation e m If the output of the motor 300 is smaller than the preset value, the closed-loop control system is continuously executed.
The adaptive mechanism 700 may calculate optimal controller parameters for the controller 100, i.e., in the present embodiment, optimal values of Kp, ki, kd, and update the optimal controller parameters to the controller 100 so that the output of the motor control system in the current state (i.e., in the presence of aging) may meet the preset requirements. That is, the control amount u outputted from the controller 100 can control the motor driver 200 to drive the motor 300 to operate, so that the output of the motor 300 can meet the preset requirement.
Referring to fig. 4 and 5, the adaptive mechanism 700 will be described in detail to acquire optimal controller parameters (Kp, ki, kd) of the controller 100 in the current state. The controller 100 is exemplified by a PID controller. Fig. 4 is a flowchart of a method for obtaining optimal controller parameters according to an embodiment of the present application.
S401, calculating initial values of proportional gain, integral control coefficient and differential control coefficient based on a critical proportional band method (Zigler-Nichols, Z-N method), and marking the initial values as Kp 0 、Ki 0 、Kd 0 。
How Kp is calculated using the critical proportional band method is described in detail with reference to FIG. 5 0 、Ki 0 、Kd 0 。
Fig. 5 is a schematic diagram of a calculation flow of a critical ratio zone according to an embodiment of the present application, and according to fig. 5, it can be seen that:
s501, set ki=0, kd=0, and use a pure proportional controller.
S502, continuously increasing Kp based on a reference model, and observing input and output until the system reaches critical stability.
The critical stability of the system is that the system outputs continuous oscillation with unchanged amplitude and period.
S503, kp of the recording system in a critical steady state is reached to become a critical gain Ku, and the oscillation period at this time is called a critical oscillation period Tu.
Based on Ku and Tu obtained in the above steps, table 1 below shows a parameter calculation table corresponding to the controller type provided in the embodiment of the present application, which can be known as follows:
Table 1:
control type | Kp | Ki | Kd |
Pure proportion controller | 0.5Ku | — | — |
Proportional-integral controller | 0.45Ku | 0.54Ku/Tu | — |
PID controller | 0.6Ku | 1.2Ku/Tu | 0.6Ku*Tu/8 |
When the controller is a pure proportional controller, parameters of the pure proportional controller are obtained through calculation according to kp=0.5 Ku;
when the controller is a proportional-integral controller, the parameters of the proportional-integral controller are obtained by calculation according to Kp=0.45 Ku and Ki=0.54 Ku/Tu;
when the controller is a PID controller, the parameters of the PID controller are calculated according to kp=0.6 Ku, ki=1.2 Ku/Tu, kd=0.6 ku×tu/8.
Therefore, kp 0 =0.6Ku、Ki 0 =1.2Ku/Tu、Kd 0 =0.6Ku*Tu/8。
S402、Kp 0 、Ki 0 、Kd 0 For initial values, the optimization algorithm is used to iterate Kp, ki, kd, using the index of the step response for optimization.
The optimization algorithm includes a minimum likelihood estimation method, a gradient descent method, a basin jump (basin-hoping) method, etc., the optimization algorithm is not particularly limited in this application, any one may be selected as the optimization algorithm, and a combination of multiple optimization algorithms may be used.
The index of the step response includes rise time, overshoot, and steady duration. The rising time of the step response is the corresponding time when the output step response reaches 90% of the steady state value; the overshoot of the step response is the percentage of the maximum value exceeding the final value in the output step response to the amplitude value of the step response; the stable duration of the step response is the duration taken by the output step response to reach within + -5% of the target value.
Specifically, using the index of the step response for optimization includes:
when the rising time of the step response reaches the preset time, kp, ki and Kd are determined;
or determining Kp, ki and Kd when the overshoot of the step response reaches a preset overshoot;
or determining Kp, ki and Kd when the stable duration of the step response reaches the preset duration;
of course, kp, ki, kd may also be determined using a combination of indices of the various step responses.
S403, outputting Kp, ki and Kd meeting the requirements.
Referring to fig. 2, a control procedure of the control system of the motor according to the embodiment of the present application will be specifically described. Before the control system of the motor leaves the factory, the parameters of the controller 100 are preset according to the physical characteristics of the motor 300 and the performance of the controller 100, so that the output of the control system of the motor can meet the requirements. Taking a PID controller as an example, the parameters of the controller 100 include: proportional gain (Kp), integral control coefficient (Ki), differential control coefficient (Kd). And sets the controller parameters of the controller 101 in the reference model 500 according to the parameters of the controller 100.
The set value r is input to the controller 100 and the reference model 500 from the input terminal.
The input end inputs a set value r to the controller 100; the controller 100 outputs the control amount u to the motor drive 200; the motor drive 200 outputs a current signal meeting the requirement of the motor 300 according to the control quantity u to control the motor 300 to operate; the motor 300 operates according to the current signal output from the motor drive 200 and outputs a controlled variable y; the sensor 400 measures the output of the motor 300, i.e. the controlled quantity y of the motor 300.
Input end inputs set value r to reference model 500, reference model 500 outputs reference output y m The method specifically comprises the following steps: the input end inputs a set value r to the controller 101; the controller 101 outputs a control amount u to the motor drive 201; the motor driver 201 outputs a current signal meeting the requirement of the motor 301 according to the control quantity u to control the motor 301 to operate; the motor 301 operates according to the current signal output from the motor drive 201 and outputsReference output y m 。
The controlled quantity y measured by the sensor 400 is compared with a reference output y output by the reference model 500 m Comparing to obtain controlled quantity y and reference output y m Deviation e of (2) m 。
Motor monitor 600 determines deviation e m If the output of the motor 300 is greater than the preset value, the motor 300 is indicated to have poor performance, and the output of the motor 300 cannot meet the requirement; then, the adaptive mechanism 700 calculates an optimal controller coefficient in the current state, and applies the optimal controller coefficient to the controller 100, so that the output of the motor 300 can meet the preset requirement, and the stability of the output of the motor control system is maintained.
Motor monitor 600 determines deviation e m If the output of the motor 300 is greater than the preset value, the output of the motor 300 can meet the requirement, so that the closed-loop control is continued without changing the parameters of the controller.
Further, after the adaptive mechanism 700 obtains the optimal controller parameters, the optimal controller parameters and the current state of the motor 300 are updated into the reference model 500.
Specifically, the optimal controller parameters are applied to the controller 101, and the state of the motor 301 is updated to the current state of the motor 300 (i.e., the state after the motor 300 is aged), so that the controller parameters of the controller 101 are consistent with the parameters of the controller 100 in the motor control system, and the state of the motor 301 is updated to the state of the motor 300. The reference output to be output by the reference model 500 at this time is the optimal output of the controller and the motor in the current state under the current controller parameter setting. Thus, the state of the motor 300 can be continuously detected, whether the performance of the motor 300 is reduced or not can be more intuitively compared, and misjudgment on the performance of the motor 300 is avoided.
Based on the motor control system provided by the embodiment of the application, a reference model, an adaptive mechanism and a motor monitor are added on the existing closed-loop control system of the motor. When the motor monitor determines that the deviation between the output controlled quantity of the motor and the reference output of the reference model is larger than a preset value, an adaptive mechanism is used for obtaining an optimal controller coefficient in the current motor state, and the optimal controller coefficient is applied to the controller, so that the output of the current motor can meet the requirement, and the stability of a control system of the motor is ensured.
Further, the optimal control coefficient and the current motor state are updated into the reference model, so that the motor state can be continuously monitored, misjudgment on the motor state is reduced, and the motor state detection accuracy is improved.
Fig. 6 is a flow chart of a motor control method according to an embodiment of the present application. The motor control method is specifically described with reference to fig. 6.
S601, presetting initial controller parameters of a controller; setting an initial reference model according to the controller parameters;
specifically, taking a controller as a PID controller as an example, the values of Kp, ki, kd of the controller are set in advance. The kind of the controller is not particularly limited in this application.
The parameters of the controller set in advance are determined by the physical properties of the motor and the performance index of the controller.
And then setting an initial reference model according to preset controller parameters. The reference model is a model that simulates an actual motor open loop control system, in other words, the reference model simulates a controller, motor drive, and motor for which initial controller parameters are set.
S602, comparing whether the deviation between the output of the actual motor control system and the output of the reference model is smaller than a preset threshold value.
The preset threshold is set according to the actual situation, and the preset threshold is used for measuring whether the actual motor is aged or not, so that the output of the aged actual motor system cannot meet the actual requirement.
If yes, S603 is performed.
If not, S604 is performed.
If not, it indicates that the actual motor has aged or the like, for example: the amplitude of the motor output decreases, the vibration frequency of the motor output decreases, and the motor vibration does not converge. At this time, the initial controller parameters are maintained, so that the output of the actual motor system cannot meet the requirements, and even the actual motor system is unstable.
S603, continuously executing closed-loop control of the motor control system.
That is, the output of the actual motor system can meet the requirement at this time, and the actual motor system is not required to be updated, and the closed-loop control of the motor control system is continuously executed.
S604, starting the self-adaptive mechanism, and obtaining a motor model in the current state according to the deviation.
The motor model in the current state is the state of the motor when the deviation is larger than a preset threshold value, namely when the motor has problems such as aging and the like. And acquiring a motor model in the current state according to the state of the motor at the moment.
S605, the self-adaptive mechanism obtains optimal controller parameters based on the motor model in the current state.
Taking a controller as a PID controller as an example, obtaining optimal controller parameters specifically includes:
calculating initial values of proportional gain, integral control coefficient and differential control coefficient based on critical proportional band method (Zigler-Nichols, Z-N method), and recording as Kp 0 、Ki 0 、Kd 0 . Kp-based 0 、Ki 0 、Kd 0 Iterative Kp, ki, kd using an optimization algorithm, optimizing using an index of step response. And outputting Kp, ki and Kd meeting the requirements.
And S606, updating the optimal controller parameters into the actual controller.
The controller which updates the parameters can control the motor to drive so that the output of the motor can meet the requirements. The timely updating of the parameters of the controller is realized, the output of the current actual motor system can be ensured to meet the requirements, and the stability of the actual motor system is further ensured.
Further, after updating the optimal controller parameters to the actual controller, the method provided by the embodiment of the application further includes:
s607, updating the optimal controller parameters and the motor model in the current state into the reference model.
The motor state monitoring system can realize continuous monitoring of the motor state, reduce misjudgment of the motor state and improve the accuracy of motor state detection. And the accuracy of detection of the actual motor control system is improved, and the stability of output of the actual motor control system is further improved.
And S608, after updating, the self-adaptive mechanism sends a setting completion signal to the motor monitor.
And after receiving the setting completion signal, the motor monitor continuously monitors the deviation between the output of the actual motor control system and the output of the reference model.
Based on the control method of the motor provided in the embodiment of the present application,
further, the optimal control coefficient and the current motor state are updated into the reference model, so that the motor state can be continuously monitored, misjudgment on the motor state is reduced, and the motor state detection accuracy is improved.
Based on the motor control method provided by the embodiment of the application, the initial controller parameters of the controller are preset; setting an initial reference model according to the controller parameters; comparing whether the deviation between the output of the actual motor control system and the output of the reference model is smaller than a preset threshold value; if not, starting the self-adaptive mechanism, and acquiring a motor model in the current state according to the deviation; the self-adaptive mechanism obtains optimal controller parameters based on a motor model in the current state; and updating the optimal controller parameters into the actual controller. When the aging or the decline of the performance of the motor is identified, the parameters of the controller can be automatically adjusted, so that the output of the motor in the current state can meet the requirements, and the stability of a control system of the motor is further ensured.
Further, the optimal controller coefficient and the current motor state are updated into the reference model, so that the motor state can be continuously monitored, misjudgment on the motor state is reduced, and the accuracy of motor state detection is improved. Further guaranteeing the stability of the actual motor control system.
In some embodiments, the electronic device may be a cell phone, tablet, desktop, laptop, notebook, ultra mobile personal computer (Ultra-mobile Personal Computer, UMPC), handheld computer, netbook, personal digital assistant (Personal Digital Assistant, PDA), wearable electronic device, smart watch, etc., and the specific form of the electronic device is not particularly limited in this application. In this embodiment, the structure of the electronic device may be shown in fig. 7, and fig. 7 is a schematic structural diagram of the electronic device according to the embodiment of the present application.
As shown in fig. 7, the electronic device may include a processor 710, a display 720, a camera 730, a memory 740, a magnetic sensor 750, and a motor 760, among others.
It is to be understood that the configuration illustrated in this embodiment does not constitute a specific limitation on the electronic apparatus. In other embodiments, the electronic device may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 710 may include one or more processing units such as, for example: processor 710 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can be a neural center and a command center of the electronic device. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 710 for storing instructions and data. In some embodiments, the memory in processor 710 is a cache memory. The memory may hold instructions or data that has just been used or recycled by the processor 710. If the processor 710 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 710 is reduced, thereby improving the efficiency of the system.
In some embodiments, processor 710 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, processor 710 may contain multiple sets of I2C buses. The processor 710 may couple to the camera 730 through a different I2C bus interface. For example: the processor 110 may be coupled to the camera 730 through an I2C interface, so that the processor 710 and the camera 730 communicate through an I2C bus interface to implement a photographing function of the electronic device.
The MIPI interface may be used to connect processor 710 with peripheral devices such as display 720, camera 730, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 710 and camera 730 communicate through a CSI interface to implement the shooting functionality of the electronic device. Processor 710 and display screen 720 communicate via a DSI interface to implement the display functionality of the electronic device.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect processor 710 with camera 730, display 720, sensor module 170, and the like. The GPIO interface may also be configured as an I2C interface, MIPI interface, etc.
It should be understood that the connection relationship between the modules illustrated in this embodiment is only illustrative, and does not limit the structure of the electronic device. In other embodiments of the present application, the electronic device may also use different interfacing manners in the foregoing embodiments, or a combination of multiple interfacing manners.
The electronic device implements display functions through the GPU, the display 720, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display 720 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display 720 is used to display images, videos, and the like. The display 720 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro-led, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device may include 1 or N displays 720, N being a positive integer greater than 1.
A series of graphical user interfaces (graphical user interface, GUIs) may be displayed on the display screen 720 of the electronic device, all of which are home screens of the electronic device. Generally, the size of the display 720 of an electronic device is fixed and only limited controls can be displayed in the display 720 of the electronic device. A control is a GUI element that is a software component contained within an application program that controls all data processed by the application program and interactive operations on that data, and a user can interact with the control by direct manipulation (direct manipulation) to read or edit information about the application program. In general, controls may include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and the like. .
The electronic device may implement shooting functions through the ISP, the camera 730, the video codec, the GPU, the display screen 720, the application processor, and the like.
The ISP is used to process the data fed back by the camera 730. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 730.
Camera 730 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device may include 1 or N cameras 730, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, and so on.
Video codecs are used to compress or decompress digital video. The electronic device may support one or more video codecs. In this way, the electronic device may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent cognition of electronic devices can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
Internal memory 740 may be used to store computer-executable program code that includes instructions. The processor 710 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 740. For example, in the present embodiment, the processor 710 may recalculate the optimal controller parameters of the controller by executing instructions stored in the internal memory 740. The internal memory 740 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device (e.g., audio data, phonebook, etc.), and so forth. In addition, the internal memory 740 may include a high-speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 710 performs various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 740 and/or instructions stored in a memory provided in the processor.
The magnetic sensor 750 includes a hall sensor. The electronic device may detect the opening and closing of the flip holster using the magnetic sensor 750. In some embodiments, when the electronic device is a flip machine, the electronic device may detect the opening and closing of the flip according to the magnetic sensor 750. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set. For example: the output of the motor may be measured by a hall sensor.
The motor 760 may generate a vibration alert. The motor 760 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 760 may also correspond to different vibration feedback effects by touching different areas of the display 720. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization. For example: the motor 760 can also be applied to the camera 730 to realize functions of auto-focusing, optical anti-shake, etc., so that the photographed picture is clearer.
In an embodiment of the present application, an electronic device includes a hardware layer, an operating system layer running above the hardware layer, and an application layer running above the operating system layer. The hardware layer may include a central processing unit (central processing unit, CPU), a memory management unit (memory management unit, MMU), and a memory (also referred to as a main memory). The operating system of the operating system layer may be any one or more computer operating systems that implement business processing through processes (processes), for example, a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or windows operating system, etc. The application layer may include applications such as flashlights, browsers, address books, word processing software, instant messaging software, audio playing software, video playing software, and the like.
The embodiment of the application also provides a computer readable storage medium, in which a computer program or instructions are stored, which when executed, implement the functions or steps executed by the electronic device in the above-mentioned method embodiment.
Embodiments of the present application also provide a computer program product, including a computer program or instructions, which when executed by a processor, implement the functions or steps performed by the electronic device in the above-described method embodiments.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.
Claims (13)
1. A method of controlling a motor, the method comprising:
presetting initial controller parameters;
setting an initial reference model based on the initial controller parameters; the reference model is a model for simulating an actual motor open-loop control system; the reference model is used for simulating a controller, a motor drive and a motor of an actual motor open-loop control system;
comparing whether the deviation between the actual motor output and the reference model output is smaller than a preset value;
if not, acquiring the optimal controller parameters under the current motor state;
updating the controller by utilizing the optimal controller parameters so that the output of the motor meets the preset requirement;
The obtaining the optimal controller parameters under the current motor state comprises the following steps:
obtaining a current motor model based on the deviation;
calculating an initial value of a controller parameter by using a critical proportion band method based on the motor model;
iterating the controller parameters using an optimization algorithm based on the initial values;
when the controller parameters meet the index of the step response, taking the controller parameters meeting the index of the step response as optimal controller parameters;
the controller comprises a PID controller; the controller parameters include: kp, ki and Kd; kp is a proportional control coefficient, ki is an integral control coefficient, and Kp is a differential control coefficient; the calculating the initial value of the controller parameter based on the motor model by using a critical proportion band method comprises the following steps:
setting the value of Ki to 0 and Kd to 0;
increasing Kp based on the motor model until an output of the motor model reaches a threshold stability;
taking the value of Kp of the motor model with the output reaching critical stability as critical gain, and recording the output oscillation period of the motor model under the critical gain as critical oscillation period;
and acquiring an initial value of a controller parameter based on the critical gain and the critical oscillation period.
2. The method of claim 1, wherein the optimization algorithm comprises: minimum likelihood estimation, gradient descent, and basin hopping.
3. The method of claim 1, wherein the index of the step response comprises: the rise time of the step response, the overshoot of the step response, and the settling period of the step response.
4. The method of claim 1, wherein after said updating the optimal controller parameters to a controller, the method further comprises:
updating the initial reference model based on the optimal controller parameters and the motor model.
5. The method of claim 1, wherein after said updating the optimal controller parameters to a controller, the method further comprises:
and sending a tuning completion signal so as to continuously monitor the deviation of the actual motor output and the reference model output based on the tuning completion signal.
6. The method according to claim 1, wherein the method further comprises:
and if the deviation between the actual motor output and the reference model output is smaller than a preset value, continuing to carry out closed-loop control of the motor.
7. A control system for a motor, the system comprising: a controller, motor drive, motor, sensor, reference model, motor monitor, and adaptive mechanism;
the controller is used for outputting a control quantity to the motor for driving according to the input;
the motor drive is used for outputting a current signal meeting the motor requirement according to the control quantity output by the controller;
the motor outputs based on the current signal;
the sensor is used for measuring the output of the motor;
the reference model is used for outputting the output of the motor in an initial state according to input; the reference model is used for simulating a controller, a motor drive and a motor of an actual motor open-loop control system;
the motor monitor is used for detecting whether the deviation between the output of the motor and the output of the reference model is smaller than a preset value, and if not, the deviation is sent to the self-adaptive mechanism;
the self-adaptive mechanism is used for acquiring an optimal controller parameter in the current motor state when the motor monitor detects that the output of the motor and the output of the reference model are larger than the preset value, and updating the controller by utilizing the optimal controller parameter;
The self-adaptive mechanism is specifically used for:
obtaining a current motor model based on the deviation;
calculating an initial value of a controller parameter by using a critical proportion band method based on the motor model;
iterating the controller parameters using an optimization algorithm based on the initial values;
when the controller parameters meet the index of the step response, taking the controller parameters meeting the index of the step response as optimal controller parameters;
the controller comprises a PID controller;
the controller parameters include: kp, ki and Kd; kp is a proportional control coefficient, ki is an integral control coefficient, and Kp is a differential control coefficient;
the self-adaptive mechanism is specifically used for:
setting the value of Ki to 0 and Kd to 0;
increasing Kp based on the motor model until an output of the motor model reaches a threshold stability;
taking the value of Kp of the motor model with the output reaching critical stability as critical gain, and recording the output oscillation period of the motor model under the critical gain as critical oscillation period;
and acquiring an initial value of a controller parameter based on the critical gain and the critical oscillation period.
8. The system of claim 7, wherein the adaptive mechanism is further configured to:
Updating the reference model based on the optimal controller parameters and the motor model.
9. The system of claim 7, wherein the adaptation mechanism is further configured to:
and after the optimal controller parameters are updated to the controller, sending a setting completion signal to the motor monitor, so that the motor monitor can continuously monitor the deviation between the actual motor output and the reference model output after receiving the setting completion signal.
10. The system of claim 7, wherein the motor monitor is further configured to:
and when the motor monitor detects that the deviation between the output of the motor and the output of the reference model is smaller than a preset value, the self-adaptive mechanism is not started, so that the motor continues to perform closed-loop control.
11. An electronic device comprising a processor and a memory;
the memory stores computer-executable instructions;
the processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1-6.
12. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program or instructions, which when executed, implement the method of any of claims 1-6.
13. A computer program product comprising a computer program or instructions which, when executed by a processor, implements the method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211216199.2A CN115903453B (en) | 2022-09-30 | 2022-09-30 | Motor control method, control system and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211216199.2A CN115903453B (en) | 2022-09-30 | 2022-09-30 | Motor control method, control system and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115903453A CN115903453A (en) | 2023-04-04 |
CN115903453B true CN115903453B (en) | 2024-04-09 |
Family
ID=86469930
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211216199.2A Active CN115903453B (en) | 2022-09-30 | 2022-09-30 | Motor control method, control system and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115903453B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1760749A (en) * | 2004-10-11 | 2006-04-19 | 吉佳科技股份有限公司 | Positioning device of voice coil motor |
TW200709536A (en) * | 2006-03-02 | 2007-03-01 | Magtronics Technology Inc | A voice coil motor and method of using magnetic restoring force achieving displacement control |
CN111683205A (en) * | 2020-06-23 | 2020-09-18 | 湖南国科微电子股份有限公司 | Camera module focusing method, device, equipment and medium |
CN112162481A (en) * | 2020-09-30 | 2021-01-01 | 重庆阿泰可科技股份有限公司 | Control method and device based on fuzzy PID and PLC control system |
CN112286043A (en) * | 2020-10-13 | 2021-01-29 | 国网浙江省电力有限公司电力科学研究院 | PID parameter setting method based on controlled object step response characteristic data |
CN112835286A (en) * | 2020-11-27 | 2021-05-25 | 江西理工大学 | PID parameter automatic setting method and system |
CN113836385A (en) * | 2021-09-27 | 2021-12-24 | 歌尔股份有限公司 | Motor parameter setting method, apparatus and computer-readable storage medium |
CN114554072A (en) * | 2020-11-26 | 2022-05-27 | 华为技术有限公司 | Motor control method and electronic device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI239432B (en) * | 2004-09-16 | 2005-09-11 | Vasstek Int Corp | Voice coil motor positioning apparatus |
-
2022
- 2022-09-30 CN CN202211216199.2A patent/CN115903453B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1760749A (en) * | 2004-10-11 | 2006-04-19 | 吉佳科技股份有限公司 | Positioning device of voice coil motor |
TW200709536A (en) * | 2006-03-02 | 2007-03-01 | Magtronics Technology Inc | A voice coil motor and method of using magnetic restoring force achieving displacement control |
CN111683205A (en) * | 2020-06-23 | 2020-09-18 | 湖南国科微电子股份有限公司 | Camera module focusing method, device, equipment and medium |
CN112162481A (en) * | 2020-09-30 | 2021-01-01 | 重庆阿泰可科技股份有限公司 | Control method and device based on fuzzy PID and PLC control system |
CN112286043A (en) * | 2020-10-13 | 2021-01-29 | 国网浙江省电力有限公司电力科学研究院 | PID parameter setting method based on controlled object step response characteristic data |
CN114554072A (en) * | 2020-11-26 | 2022-05-27 | 华为技术有限公司 | Motor control method and electronic device |
CN112835286A (en) * | 2020-11-27 | 2021-05-25 | 江西理工大学 | PID parameter automatic setting method and system |
CN113836385A (en) * | 2021-09-27 | 2021-12-24 | 歌尔股份有限公司 | Motor parameter setting method, apparatus and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115903453A (en) | 2023-04-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210304069A1 (en) | Method for training classification model, classification method and device, and storage medium | |
CN107566693B (en) | Electronic device and image capturing method thereof | |
EP2889832B1 (en) | Image processing apparatus and method | |
KR20190053074A (en) | Method and apparatus for video super resolution using convolutional neural network with two-stage motion compensation | |
CN109491494B (en) | Power parameter adjusting method and device and reinforcement learning model training method | |
CN113778663A (en) | Scheduling method of multi-core processor and electronic equipment | |
CN113572993B (en) | Video processing method and mobile terminal | |
CN111512225B (en) | Electronic device including camera and electronic device control method | |
CN112130940A (en) | Terminal control method and device, storage medium and electronic equipment | |
US20230351570A1 (en) | Image processing method and apparatus | |
CN113965694B (en) | Video recording method, electronic device and computer readable storage medium | |
CN111985635A (en) | Method, device and medium for accelerating neural network inference processing | |
KR20210049649A (en) | Method, apparatus and electronic device for enhancing face image | |
CN115903453B (en) | Motor control method, control system and electronic equipment | |
CN115883958A (en) | Portrait shooting method | |
EP4113970A1 (en) | Image processing method and device | |
CN111695071B (en) | Page display method and related device | |
CN111722896B (en) | Animation playing method, device, terminal and computer readable storage medium | |
US20240107092A1 (en) | Video playing method and apparatus | |
CN117135447B (en) | Photographing processing method and electronic equipment | |
CN114816311B (en) | Screen movement method and device | |
CN117135268B (en) | Shooting method, electronic device, chip and storage medium | |
CN117676331B (en) | Automatic focusing method and electronic equipment | |
CN113436062B (en) | Image style migration method and device, electronic equipment and storage medium | |
CN115484384B (en) | Method and device for controlling exposure and electronic equipment |
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 |