Disclosure of Invention
The invention aims to provide a control method of a voice coil motor, which can simultaneously meet different requirements of a position control stage and a force control stage, so that the voice coil motor can complete a complex process, and the application range of the voice coil motor is greatly expanded. Another object of the present invention is to provide a control system for a voice coil motor, which has the above-mentioned advantages.
In order to solve the above technical problem, the present invention provides a method for controlling a voice coil motor, including:
receiving preset position information and preset current information determined according to the preset acting force information;
driving the voice coil motor to reach a given position through a position closed loop and a current closed loop based on high current gain according to the preset position information, wherein the high current gain is a gain within a range from a first preset gain value to a second preset gain value;
acquiring the current of the voice coil motor, and judging whether the current of the voice coil motor is greater than a preset current threshold value;
if yes, the acting force formed by driving the voice coil motor through a current closed loop based on low current gain reaches the designated acting force according to the preset current information, wherein the low current gain is the gain from the first preset gain value to a third preset gain value, and the second preset gain value is smaller than the third preset gain value.
Preferably, before the driving the voice coil motor to the given position through the position closed loop and the high current gain current closed loop according to the preset position information, the control method further comprises:
and according to preset speed information determined by the preset position information, controlling the speed of the voice coil motor to reach a specified speed through a speed closed loop so that the voice coil motor can reach the given position at the specified speed.
Preferably, after the obtaining the current of the voice coil motor and before the determining whether the current of the voice coil motor is greater than a preset current threshold, the control method further includes:
and carrying out filtering processing on the current of the voice coil motor.
Preferably, the process of filtering the current of the voice coil motor specifically includes:
and carrying out least square filtering processing on the current of the voice coil motor.
Preferably, when the voice coil motor does not reach a given position, in the position closed loop, performing position closed loop control on the voice coil motor by adopting a dynamic proportional-integral-derivative (PID) parameter according to the preset position information;
and when the voice coil motor reaches a given position, performing position closed-loop control on the voice coil motor by adopting a static PID parameter according to the preset position information in the position closed loop.
Preferably, the control method further includes:
and filtering the position fed back by the voice coil motor in the position closed loop, and then performing subsequent closed loop control.
Preferably, the control method further includes:
and filtering the speed fed back by the voice coil motor in the speed closed loop, and then performing subsequent closed loop control.
In order to solve the above technical problem, the present invention further provides a control system of a voice coil motor, including:
the receiving module is used for receiving preset position information and preset current information determined according to the preset acting force information;
the position control module is used for driving the voice coil motor to reach a given position through a position closed loop and a current closed loop based on high current gain according to the preset position information, wherein the high current gain is a gain within a range from a first preset gain value to a second preset gain value;
the current detection module is used for acquiring the current of the voice coil motor and sending the current to the potential switching judgment module;
the potential force switching judgment module is used for judging whether the current of the voice coil motor is greater than a preset current threshold value or not, and if so, triggering the force control module;
the force control module is used for driving an acting force formed by the voice coil motor to reach a specified acting force through a current closed loop based on a low current gain according to the preset current information, wherein the low current gain is a gain within a range from the first preset gain value to a third preset gain value, and the second preset gain value is smaller than the third preset gain value.
Preferably, the control system further comprises a speed loop controller module;
the speed loop controller module is used for controlling the speed of the voice coil motor to reach a specified speed through a speed closed loop according to preset speed information determined by preset position information, so that the voice coil motor can reach the given position at the specified speed;
the receiving module is further configured to receive the preset speed information determined according to the preset position information.
Preferably, the control system further comprises a current feedback filtering module;
the current feedback filtering module is used for filtering the current of the voice coil motor so as to enable the position force switching judgment module to judge whether to switch the position force according to the current.
The invention provides a control method of a voice coil motor, which adopts a position closed loop and a current closed loop with high current gain to drive the voice coil motor to reach a given position in a position control stage, then judges whether to switch potential force according to the current of the voice coil motor, when the control is switched to force control, adopts a current closed loop with low current gain to drive the voice coil motor to form an acting force reaching a specified acting force so as to finish the force control, because a second preset gain value is smaller than a third preset gain value, the gain range of the high current gain is smaller than the gain range of the low current gain, and adopts the same voice coil motor in the position control stage and the force control stage, the maximum currents of the voice coil motors are equal, the gain range of the current is equivalent to the range of the minimum current and the maximum current of the voice coil motor, and the gain range of the current is larger, the slower and more accurate the current change of the driving voice coil motor, the smaller the gain range of the current, the faster the current change of the driving voice coil motor, and therefore, the high current gain adopted in the position control stage can ensure that the voice coil motor can quickly reach a given position, and the low current gain adopted in the force control stage can ensure the fine and accurate requirements of different processes on force control.
The invention also provides a control system of the voice coil motor, and the control system has the same beneficial effects as the control method of the voice coil motor.
Detailed Description
The core of the invention is to provide a control method of the voice coil motor, which can simultaneously meet different requirements of a position control stage and a force control stage, so that the voice coil motor can complete a complex process, and the application range of the voice coil motor is greatly expanded. Another core of the present invention is to provide a control system of a voice coil motor, which has the above-mentioned advantages.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for controlling a voice coil motor according to the present invention, the method including:
step S11: receiving preset position information and preset current information determined according to the preset acting force information;
specifically, the voice coil motor has two working modes in the actual working process, one is a position control mode, and the other is a force control mode, and the two working modes correspond to different process requirements respectively. The position control comprises at least two nested cascade control loops, namely a position closed loop and a current closed loop, and the force control mode comprises one control loop, namely the current closed loop. That is, the position control phase realizes that the voice coil motor reaches a given position through a position closed loop and a current closed loop, and the force control phase realizes that the acting force generated by the voice coil motor reaches a specified acting force only through the current closed loop. An ideal position curve is planned according to preset position information, reliable position setting of the voice coil motor is achieved, one-to-one correspondence relationship exists between acting force information and currents of the voice coil motor, complex force curve planning can be completed according to the acting force information in advance, smooth transition can be guaranteed in a force contact stage, a force control stage and a force release stage, the force magnitude and the force duration of each force control stage can be adjusted, complex process requirements of the force control stage can be met, then preset current information is obtained according to the force curve correspondence, and setting of a current loop of the force control stage can be achieved.
Step S12: driving a voice coil motor to reach a given position through a position closed loop and a current closed loop based on high current gain according to preset position information, wherein the high current gain is a gain within a range from a first preset gain value to a second preset gain value;
specifically, in the position control stage, the current closed loop selects a high current gain, that is, the proportional parameter of the current closed loop adopts the high current gain, the high current gain is the amplification multiple of the analog signal, the gain range of the high current gain is smaller, that is, the current range bearable by the voice coil motor corresponds to the gain range one by one, when the gain range is smaller, the current change corresponding to the same gain change is larger, so that the speed change of the voice coil motor in the position control stage is faster, the response is fast, and the fast position following capability and the good dynamic characteristic are realized.
It should be noted that the first preset gain value and the second preset gain value are preset and obtained according to the current range that the voice coil motor can bear and the desired gain range, and only need to be set once, and the gain range does not need to be reset unless the gain range needs to be modified.
Step S13: acquiring the current of a voice coil motor;
specifically, when the voice coil motor reaches a given position, due to the fact that the voice coil motor is in contact with the surface of an object in the process, the current of the voice coil motor is rapidly increased under the conditions of stalling and the like, the actual current of the voice coil motor fed back serves as a potential force switching condition, and the acting force detected by the force sensor serves as a potential force switching condition in the prior art. In addition, the current of the voice coil motor may be obtained through a hall current sensor, or may be obtained through other manners, which is not limited herein.
Step S14: judging whether the current of the voice coil motor is larger than a preset current threshold value or not; if yes, go to step S15;
step S15: and achieving the specified acting force through the acting force formed by driving the voice coil motor through the current closed loop based on the low current gain according to the preset current information, wherein the low current gain is the gain from the first preset gain value to the third preset gain value, and the second preset gain value is smaller than the third preset gain value.
Specifically, when the voice coil motor reaches a given position, the current of the voice coil motor is rapidly increased due to the fact that the voice coil motor is locked and the like, when the current of the voice coil motor is higher than a preset current threshold value, it is indicated that the voice coil motor enters a force control stage and bit force switching needs to be performed, when the voice coil motor is in the force control stage, a low current gain is selected for a current closed loop, namely a low current gain is adopted for a proportional parameter of the current closed loop, the low current gain is an amplification factor of an analog signal, the gain range of the low current gain is large, current change corresponding to the same gain change is small, and therefore the speed change of the voice coil motor in the force control stage is slow, so that finer control in the force control stage can be achieved, and the voice coil motor can meet complex technological requirements in the force control stage. Therefore, the voice coil motor is driven by adopting two gain modes, namely high current gain and low current gain, the novel driving strategy can respectively enhance different performance requirements of two control stages, compromise is not needed to be made for mutual transfer, and the two control stages can achieve the integral optimum.
The invention provides a control method of a voice coil motor, which adopts a position closed loop and a current closed loop with high current gain to drive the voice coil motor to reach a given position in a position control stage, then judges whether to switch potential force according to the current of the voice coil motor, when the position is switched to force control, the acting force formed by driving the voice coil motor by adopting the current closed loop with low current gain reaches a specified acting force so as to finish the force control, because a second preset gain value is smaller than a third preset gain value, the gain range of the high current gain is smaller than the gain range of the low current gain, while the same voice coil motor is adopted in the position control stage and the force control stage, the maximum currents of the voice coil motors are equal, the gain range of the current is equivalent to the range of the minimum current and the maximum current of the voice coil motor, the larger the gain range of the current is, the slower the current change of the driving motor is, The more accurate the gain range of the current is, the smaller the gain range of the current is, the faster the current for driving the voice coil motor changes, and therefore, the high current gain is adopted in the position control stage to ensure that the voice coil motor can quickly reach a given position, and the low current gain is adopted in the force control stage to ensure the fine and accurate requirements of different processes on force control.
On the basis of the above-described embodiment:
as a preferred embodiment, before driving the voice coil motor to the given position through the position closed loop and the high current gain current closed loop according to the preset position information, the control method further comprises:
and according to the preset speed information determined by the preset position information, controlling the speed of the voice coil motor to reach the specified speed through a speed closed loop so that the voice coil motor reaches the given position at the specified speed.
Specifically, considering that the current change in the position control stage is relatively large, which may cause the speed fluctuation of the voice coil motor to be relatively large, in order to make the voice coil motor reach a given position stably, a speed closed loop may be added in the position control stage, so as to ensure the accurate following capability of the speed. The position curve obtained by the preset position information is differentiated with time to obtain preset speed information, and then the speed of the voice coil motor is controlled by a speed closed loop to stably reach a given position at a specified speed, of course, the speed closed loop control can be controlled by a proportional-integral-derivative (PID) parameter or a proportional-integral (PI) parameter, and the invention is not limited herein.
As a preferred embodiment, after obtaining the current of the voice coil motor, before determining whether the current of the voice coil motor is greater than a preset current threshold, the control method further includes:
and carrying out filtering processing on the current of the voice coil motor.
Specifically, current of the voice coil motor fed back is filtered, current noise can be eliminated, detected current information is more accurate and reliable, misjudgment of potential switching can be prevented through filtering, switching of the voice coil motor is more reliable, and the anti-interference capacity of the potential switching of the voice coil motor is enhanced.
As a preferred embodiment, the process of filtering the current of the voice coil motor specifically includes:
and performing least square filtering processing on the current of the voice coil motor.
Specifically, the least square method filtering algorithm is adopted to carry out filtering processing on the voice coil motor current fed back, so that current noise can be eliminated, the fed-back current information is more stable and reliable, misjudgment of potential switching is prevented, the calculated amount of the least square method filtering algorithm is small, and the real-time performance of the control process can be guaranteed. It should be noted that, besides the least square filtering algorithm, other filtering methods may also be adopted, and the present invention is not limited herein.
As a preferred embodiment, when the voice coil motor does not reach a given position, in a position closed loop, performing position closed loop control on the voice coil motor by adopting a dynamic proportional-integral-derivative (PID) parameter according to preset position information;
and when the voice coil motor reaches a given position, in the position closed loop, performing position closed loop control on the voice coil motor by adopting a static PID parameter according to preset position information.
Specifically, in the position control stage, in addition to the high current gain adopted by the gain of the current closed loop, the position closed loop can adopt two groups of parameters of a dynamic PID parameter and a static PID parameter to perform error-free position tracking, that is, when the voice coil motor does not reach a given position, the speed of the voice coil motor is not 0, the control of the voice coil motor is a dynamic control process, at this time, the dynamic PID parameter is adopted, when the voice coil motor reaches the given position, the speed of the voice coil motor is controlled to be 0, at this time, the control process of controlling the voice coil motor to stay at the given position is a static control process, at this time, the static PID parameter is adopted, and by setting different PID parameters, the performance requirements of different stages can be met, so that the control is more targeted and more accurate, and the control performance.
It should be noted that, in addition to the two sets of PID parameters, other closed-loop control methods may also be adopted, and the present invention is not limited herein.
As a preferred embodiment, the control method further includes:
and filtering the position fed back by the voice coil motor in the position closed loop, and then performing subsequent closed loop control.
Specifically, the real-time position signal fed back by the voice coil motor actually is filtered, so that some nonlinear fluctuations in the feedback process, such as vibration of an encoder for detecting the position of the voice coil motor, can be eliminated, the influence on the whole motion control system is ensured, the stability and the accuracy of the whole control loop are ensured, and the stability and the accuracy of the control process are enhanced. Of course, the specific manner of filtering may be selected according to actual situations, and the present invention is not limited herein.
As a preferred embodiment, the control method further includes:
and filtering the speed fed back by the voice coil motor in the speed closed loop, and then performing subsequent closed loop control.
Specifically, the speed signal actually fed back by the voice coil motor is filtered, so that some nonlinear fluctuations in the feedback process, such as vibration of an encoder for detecting the speed of the voice coil motor, can be eliminated, the influence on the whole motion control system is avoided, and the stability and the accuracy of the control process are enhanced. Of course, the specific manner of filtering may be selected according to actual situations, and the present invention is not limited herein.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a control system of a voice coil motor provided in the present invention, including:
the receiving module 1 is used for receiving preset position information and preset current information determined according to preset acting force information;
the position control module 2 is used for driving the voice coil motor to reach a given position through a position closed loop and a current closed loop based on high current gain according to preset position information, wherein the high current gain is a gain from a first preset gain value to a second preset gain value;
the current detection module 3 is used for acquiring the current of the voice coil motor and sending the current to the potential switching judgment module 4;
the potential force switching judgment module 4 is used for judging whether the current of the voice coil motor is larger than a preset current threshold value or not, and if so, triggering the force control module 5;
and the force control module 5 is used for driving the voice coil motor to form an acting force through a current closed loop based on low current gain according to the preset current information to reach a specified acting force, wherein the low current gain is a gain from a first preset gain value to a third preset gain value, and the second preset gain value is smaller than the third preset gain value.
As a preferred embodiment, the control system further comprises a speed loop controller module;
the speed loop controller module is used for controlling the speed of the voice coil motor to reach the specified speed through a speed closed loop according to preset speed information determined by the preset position information, so that the voice coil motor can reach the given position at the specified speed;
the receiving module 1 is further configured to receive preset speed information determined according to the preset position information.
As a preferred embodiment, the control system further comprises a current feedback filtering module;
the current feedback filtering module is used for filtering the current of the voice coil motor, so that the position force switching judgment module 4 judges whether to switch the position force according to the current.
For the description of the control system of the voice coil motor provided by the present invention, please refer to the above method embodiments, and the present invention is not repeated herein.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 a" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.