CN114006565A - Motor control method, device, equipment and computer readable storage medium - Google Patents

Motor control method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN114006565A
CN114006565A CN202111277461.XA CN202111277461A CN114006565A CN 114006565 A CN114006565 A CN 114006565A CN 202111277461 A CN202111277461 A CN 202111277461A CN 114006565 A CN114006565 A CN 114006565A
Authority
CN
China
Prior art keywords
motor
driving voltage
data
acceleration
voltage data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111277461.XA
Other languages
Chinese (zh)
Inventor
刘兵
刘钰佳
杨鑫峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Inc
Original Assignee
Goertek Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Inc filed Critical Goertek Inc
Priority to CN202111277461.XA priority Critical patent/CN114006565A/en
Publication of CN114006565A publication Critical patent/CN114006565A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P29/00Arrangements for regulating or controlling electric motors, appropriate for both AC and DC motors
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P23/00Arrangements or methods for the control of AC motors characterised by a control method other than vector control
    • H02P23/20Controlling the acceleration or deceleration
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P25/00Arrangements or methods for the control of AC motors characterised by the kind of AC motor or by structural details
    • H02P25/02Arrangements or methods for the control of AC motors characterised by the kind of AC motor or by structural details characterised by the kind of motor
    • H02P25/032Reciprocating, oscillating or vibrating motors
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P25/00Arrangements or methods for the control of AC motors characterised by the kind of AC motor or by structural details
    • H02P25/02Arrangements or methods for the control of AC motors characterised by the kind of AC motor or by structural details characterised by the kind of motor
    • H02P25/06Linear motors
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P27/00Arrangements or methods for the control of AC motors characterised by the kind of supply voltage
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P27/00Arrangements or methods for the control of AC motors characterised by the kind of supply voltage
    • H02P27/02Arrangements or methods for the control of AC motors characterised by the kind of supply voltage using supply voltage with constant frequency and variable amplitude
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P7/00Arrangements for regulating or controlling the speed or torque of electric DC motors
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P7/00Arrangements for regulating or controlling the speed or torque of electric DC motors
    • H02P7/02Arrangements for regulating or controlling the speed or torque of electric DC motors the DC motors being of the linear type
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P7/00Arrangements for regulating or controlling the speed or torque of electric DC motors
    • H02P7/06Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current
    • H02P7/18Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Electric Motors In General (AREA)
  • Apparatuses For Generation Of Mechanical Vibrations (AREA)

Abstract

The invention discloses a motor control method, a device, equipment and a computer readable storage medium, wherein the method comprises the following steps: sampling a target acceleration waveform to obtain first acceleration data; calculating to obtain first driving voltage data according to the first acceleration data; and adjusting the first driving voltage data according to the output voltage peak value of a hardware driving circuit of the motor to obtain second driving voltage data, and driving the motor to vibrate based on the second driving voltage data, wherein the absolute value of the voltage value in the second driving voltage data is not greater than the output voltage peak value. The invention can avoid the situation that the difference between the actual vibration waveform and the expected vibration waveform is larger because the driving voltage required by the acceleration waveform exceeds the output voltage peak value of the hardware driving circuit, thereby ensuring that the difference between the actual vibration effect and the expected vibration effect of the motor is smaller when the driving voltage required by the acceleration waveform exceeds the output voltage peak value of the hardware driving circuit.

Description

Motor control method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of motor technologies, and in particular, to a motor control method, apparatus, device, and computer readable storage medium.
Background
The application of motors in electronic devices is becoming more and more popular, for example, Linear motors (LRAs) have been widely used in various vibration situations of consumer electronics, especially games and AR/VR products, due to their advantages of strong, rich, crisp and low energy consumption. By constructing a wide-frequency vibration waveform (acceleration waveform), the motor can realize very rich and real vibration feedback. However, when constructing the vibration waveform, the game developer has difficulty in ensuring that the amplitude of the driving voltage required by the vibration waveform is always within the range of the peak value of the output voltage of the hardware driving circuit of the motor, because the specific physical characteristics and the control algorithm of the motor are not accurately known. When the required driving voltage exceeds the peak value of the output voltage of the hardware driving circuit, the actual driving voltage is limited to the peak value so as to generate a large deviation with the expected driving voltage, and finally, the generated actual vibration fluctuation has a large difference with the constructed vibration waveform, thereby influencing the actual vibration effect.
Disclosure of Invention
The present invention is directed to a method, an apparatus, a device and a computer readable storage medium for controlling a motor, and aims to solve the technical problem that when a required driving voltage is limited by a voltage peak output by a hardware driving circuit of the motor, a difference between an actual vibration waveform and a constructed vibration waveform is large, so that a difference between an actual vibration effect of the motor and an expected vibration effect is large.
To achieve the above object, the present invention provides a motor control method, comprising the steps of:
sampling a target acceleration waveform to obtain first acceleration data, wherein the first acceleration data comprises a plurality of acceleration sampling values;
calculating to obtain first driving voltage data according to the first acceleration data;
and according to the output voltage peak value of the hardware driving circuit of the motor, carrying out linear adjustment on the first driving voltage data to obtain second driving voltage data, and driving the motor to vibrate based on the second driving voltage data, wherein the absolute value of the voltage value in the second driving voltage data is not greater than the output voltage peak value.
Optionally, the step of linearly adjusting the first driving voltage data according to the output voltage peak of the hardware driving circuit of the motor to obtain second driving voltage data includes:
dividing the output voltage peak value by the absolute peak value of each voltage value in the first driving voltage data to obtain an adjustment coefficient, and judging whether the adjustment coefficient is smaller than 1;
if the adjustment coefficient is greater than or equal to 1, taking the first driving voltage data as second driving voltage data;
and if the adjustment coefficient is smaller than 1, multiplying each voltage value in the first driving voltage data by the adjustment coefficient to obtain each adjusted voltage value, and taking each adjusted voltage value as second driving voltage data.
Optionally, the step of sampling the target acceleration waveform to obtain the first acceleration data includes:
sampling a target acceleration waveform according to a first duration to obtain first acceleration data, wherein the time span of the first acceleration data is the first duration;
after the step of driving the motor to vibrate based on the second driving voltage data, the method further includes:
acquiring user feedback information and extracting a motor vibration state carried by the user feedback information;
and if the motor vibration state is a delay state, adjusting the first time length to obtain a second time length, and continuously sampling the target acceleration waveform based on the second time length, wherein the second time length is less than the first time length.
Optionally, after the step of obtaining the user feedback information and extracting the motor vibration state carried by the user feedback information, the method further includes:
and if the motor vibration state is a distortion state, adjusting the first time length to obtain a third time length, and continuing to sample the target acceleration waveform based on the third time length, wherein the third time length is longer than the first time length.
Optionally, before the step of sampling the target acceleration waveform to obtain the first acceleration data, the method further includes:
acquiring an original acceleration waveform and a sweep frequency characteristic bandwidth of the motor;
and setting parameters of a filter according to the frequency sweep characteristic bandwidth, and filtering the original acceleration waveform by using the filter to obtain a target acceleration waveform.
Optionally, the step of calculating first driving voltage data according to the first acceleration data includes:
obtaining motor parameters of the motor, wherein the motor parameters comprise vibrator mass, magnetic field intensity, spring stiffness coefficient, damping coefficient and coil direct-current resistance;
and calculating according to the first acceleration data and the motor parameters and a conversion formula between the voltage and the acceleration of the motor to obtain first driving voltage data.
Optionally, the step of driving the motor to vibrate based on the second driving voltage data comprises:
calculating second acceleration data based on the second driving voltage, and adjusting and outputting the target acceleration waveform according to the second acceleration data;
and calculating third driving voltage data according to the second acceleration data, inputting the third driving voltage data into a power amplifier of the motor, and performing power amplification on the third driving voltage data through the power amplifier so as to drive the motor to vibrate.
To achieve the above object, the present invention also provides a motor control apparatus, comprising:
the device comprises a sampling module, a processing module and a control module, wherein the sampling module is used for sampling a target acceleration waveform to obtain first acceleration data, and the first acceleration data comprises a plurality of acceleration sampling values;
the calculation module is used for calculating to obtain first driving voltage data according to the first acceleration data;
and the adjustment driving module is used for performing linear adjustment on the first driving voltage data according to the output voltage peak value of the hardware driving circuit of the motor to obtain second driving voltage data and driving the motor to vibrate based on the second driving voltage data, wherein the absolute value of the voltage value in the second driving voltage data is not greater than the output voltage peak value.
To achieve the above object, the present invention also provides a motor control apparatus including: a memory, a processor and a motor control program stored on the memory and executable on the processor, the motor control program when executed by the processor implementing the steps of the motor control method as described above.
Further, to achieve the above object, the present invention also proposes a computer readable storage medium having stored thereon a motor control program which, when executed by a processor, implements the steps of the motor control method as described above.
In the invention, acceleration data is obtained by sampling a target acceleration waveform, required driving voltage data is predicted according to the acceleration data, the required driving voltage data is linearly adjusted, so that the absolute value of the adjusted voltage value is not larger than the output voltage peak value of a hardware driving circuit, the waveform of the driving voltage is consistent with the driving voltage waveform corresponding to the target acceleration, and the motor is driven to vibrate according to the predicted driving voltage, so that when the driving voltage required by the target acceleration waveform is larger than the output voltage peak value of the hardware driving circuit, the driving voltage required by the acceleration waveform is prevented from exceeding the output voltage peak value of the hardware driving circuit by linearly adjusting the voltage, and when the actual driving voltage is limited by the voltage peak value output by the hardware driving circuit, the difference between the actual vibration waveform and the expected vibration waveform can be reduced, so as to ensure that the actual vibration effect of the motor is less different from the expected vibration effect.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a motor control method according to a first embodiment of the present invention;
fig. 3 is a functional block diagram of a motor control device according to a preferred embodiment of the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
It should be noted that, in the motor control device according to the embodiment of the present invention, the motor control device may be disposed in an electronic device such as a smart phone, a personal computer, a game machine, a VR/AR device, and the like, and is not particularly limited herein.
As shown in fig. 1, the motor control apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 does not constitute a limitation of the motor control apparatus and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a motor control program. The operating system is a program that manages and controls the hardware and software resources of the device, supporting the operation of the motor control program as well as other software or programs. In the device shown in fig. 1, the user interface 1003 is mainly used for data communication with a client; the network interface 1004 is mainly used for establishing communication connection with a server; and the processor 1001 may be configured to call up a motor control program stored in the memory 1005 and perform the following operations:
sampling a target acceleration waveform to obtain first acceleration data, wherein the first acceleration data comprises a plurality of acceleration sampling values;
calculating to obtain first driving voltage data according to the first acceleration data;
and according to the output voltage peak value of the hardware driving circuit of the motor, carrying out linear adjustment on the first driving voltage data to obtain second driving voltage data, and driving the motor to vibrate based on the second driving voltage data, wherein the absolute value of the voltage value in the second driving voltage data is not greater than the output voltage peak value.
Further, the step of linearly adjusting the first driving voltage data according to the output voltage peak of the hardware driving circuit of the motor to obtain second driving voltage data includes:
dividing the output voltage peak value by the absolute peak value of each voltage value in the first driving voltage data to obtain an adjustment coefficient, and judging whether the adjustment coefficient is smaller than 1;
if the adjustment coefficient is greater than or equal to 1, taking the first driving voltage data as second driving voltage data;
and if the adjustment coefficient is smaller than 1, multiplying each voltage value in the first driving voltage data by the adjustment coefficient to obtain each adjusted voltage value, and taking each adjusted voltage value as second driving voltage data.
Further, the step of sampling the target acceleration waveform to obtain the first acceleration data includes:
sampling a target acceleration waveform according to a first duration to obtain first acceleration data, wherein the time span of the first acceleration data is the first duration;
after the step of driving the motor to vibrate based on the second driving voltage data, the method further includes:
acquiring user feedback information and extracting a motor vibration state carried by the user feedback information;
and if the motor vibration state is a delay state, adjusting the first time length to obtain a second time length, and continuously sampling the target acceleration waveform based on the second time length, wherein the second time length is less than the first time length.
Further, after the step of obtaining the user feedback information and extracting the motor vibration state carried by the user feedback information, the method further includes:
and if the motor vibration state is a distortion state, adjusting the first time length to obtain a third time length, and continuing to sample the target acceleration waveform based on the third time length, wherein the third time length is longer than the first time length.
Further, before the step of sampling the target acceleration waveform to obtain the first acceleration data, the method further includes:
acquiring an original acceleration waveform and a sweep frequency characteristic bandwidth of the motor;
and setting parameters of a filter according to the frequency sweep characteristic bandwidth, and filtering the original acceleration waveform by using the filter to obtain a target acceleration waveform.
Further, the step of calculating first driving voltage data according to the first acceleration data includes:
obtaining motor parameters of the motor, wherein the motor parameters comprise vibrator mass, magnetic field intensity, spring stiffness coefficient, damping coefficient and coil direct-current resistance;
and calculating according to the first acceleration data and the motor parameters and a conversion formula between the voltage and the acceleration of the motor to obtain first driving voltage data.
Further, the step of driving the motor to vibrate based on the second driving voltage data includes:
calculating second acceleration data based on the second driving voltage, and adjusting and outputting the target acceleration waveform according to the second acceleration data;
and calculating third driving voltage data according to the second acceleration data, inputting the third driving voltage data into a power amplifier of the motor, and performing power amplification on the third driving voltage data through the power amplifier so as to drive the motor to vibrate.
Based on the above-described structure, various embodiments of a motor control method are proposed.
Referring to fig. 2, fig. 2 is a flowchart illustrating a motor control method according to a first embodiment of the present invention.
While a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different than presented herein. In this embodiment, the main body of the motor control method may be a motor control device for driving the motor to vibrate, and may specifically include, but is not limited to, a motor driving circuit, a filter, and other components. The motor control device may be provided in an electronic device such as a smartphone, a personal computer, a game machine, a VR/AR device, or the like, and is not limited in this embodiment. The explanation of the embodiments is omitted below. In this embodiment, the motor control method includes:
step S10, sampling a target acceleration waveform to obtain first acceleration data, wherein the first acceleration data comprises a plurality of acceleration sampling values;
in the present embodiment, the motor may be various vibration motors, for example, a rotor motor, a linear motor, and the like. In order to enable the motor to achieve a certain vibration effect, a target acceleration waveform (namely a target vibration waveform) can be input, the driving voltage is predicted according to the target acceleration waveform, and the actual acceleration waveform which is expected to be achieved by driving the motor to vibrate through the driving voltage can be consistent with the target acceleration waveform as much as possible, so that the expected vibration effect is achieved. In a specific application scenario, the target acceleration waveform may be a broadband signal customized and designed according to a game scenario, or may be a sound effect actually output by a game application.
In order to avoid that the driving voltage required for reaching the target acceleration waveform exceeds the output voltage peak range of the hardware driving circuit, in this embodiment, the driving voltage corresponding to the target acceleration waveform is adjusted according to the output voltage peak of the hardware driving circuit, and the acceleration corresponding to the target acceleration waveform is adjusted by adjusting the driving voltage, so that the driving voltage required for the adjusted acceleration does not exceed the output voltage peak of the hardware driving circuit, and the situation that the actual acceleration waveform of the motor is greatly different from the target acceleration waveform due to the limitation of the output voltage peak of the hardware driving circuit is avoided.
Specifically, the input target acceleration waveform is sampled, and in sampling, one frame of the target acceleration waveform may be sampled each time, or multiple frames of the target acceleration waveform may be sampled simultaneously, which is not limited herein. Taking sampling one frame of target acceleration waveform at a time as an example, obtaining one frame of acceleration data every time of sampling, processing the frame of acceleration data obtained by sampling to obtain one frame of driving voltage data, and driving the motor to vibrate according to the frame of driving voltage data. Wherein, the sampling frequency can be set in advance according to requirements, such as 48 kHz; in the process of sampling the target acceleration waveform, the sampling frequency can be dynamically adjusted according to the requirement, that is, the sampling frequency of the first acceleration data of the previous frame may be different from the sampling frequency of the first acceleration data of the next frame; the time span of the single frame of acceleration data may be set in advance according to needs, for example, set to 1ms, so that when the sampling frequency is 48kHz, a frame of first acceleration data includes 48 acceleration sample values; the first acceleration data of one frame comprises a plurality of acceleration sampling values, and the number of the acceleration sampling values included in the first acceleration data of one frame can be changed by adjusting the time span and the sampling frequency of the acceleration data of one frame; in the process of sampling the target acceleration waveform, the time span may also be dynamically adjusted as needed, that is, the time span of the first acceleration data of the previous frame may be different from the time span of the first acceleration data of the next frame.
Since the processing method of each frame of acceleration data obtained by sampling is the same, the following description will be given by taking a frame of acceleration data as an example, and will be referred to as first acceleration data to show differentiation.
Step S20, calculating to obtain first driving voltage data according to the first acceleration data;
for the first acceleration data obtained by sampling, drive voltage data (hereinafter referred to as first drive voltage data for distinction) is first calculated from the first acceleration data. It is understood that the first drive voltage data is voltage data calculated so that an actual acceleration waveform of the motor vibration can be made to coincide with an acceleration waveform corresponding to the first acceleration data. In a specific embodiment, according to the transfer characteristic between the voltage and the acceleration, a conversion formula between the voltage and the acceleration may be preset, each acceleration sample value in the first acceleration data is substituted into the conversion formula, and a driving voltage value corresponding to each acceleration sample value is obtained through calculation, where each driving voltage value is the calculated first driving voltage data. The conversion formula between the voltage and the acceleration may be obtained by a bilinear conversion method, a unit impulse response invariant method, or an euler discrete method, and according to the transfer characteristic between the voltage and the acceleration of the motor, the conversion formula is not limited in this embodiment.
Step S30, according to the peak value of the output voltage of the hardware driving circuit of the motor, linearly adjusting the first driving voltage data to obtain second driving voltage data, and driving the motor to vibrate based on the second driving voltage data, wherein an absolute value of a voltage value in the second driving voltage data is not greater than the peak value of the output voltage.
After the first driving voltage data is obtained through calculation, the first driving voltage data can be linearly adjusted according to the output voltage peak value of the hardware driving circuit of the motor to obtain second driving voltage data, and the absolute value of the voltage value in the adjusted second driving voltage data is not larger than the output voltage peak value. That is, when the absolute value of the voltage value in the first driving voltage data is greater than the peak value of the output voltage, the first driving voltage data needs to be adjusted so that the absolute value of the voltage value in the adjusted second driving voltage data is not greater than the peak value of the output voltage. In this embodiment, the way of linearly adjusting the first driving voltage data is not limited, for example, in an embodiment, the voltage value in the first driving voltage data may be scaled in the same scale, so that the scaled voltage value of the voltage value with the largest absolute value in the first driving voltage data is not greater than the peak value of the output voltage, and the original sign of the scaled voltage value is retained, so as to obtain the second driving voltage data. The second driving voltage data is obtained by performing linear adjustment on the basis of the driving voltage corresponding to the target acceleration waveform, so that the acceleration waveform corresponding to the second driving voltage data does not have a large difference from the target acceleration waveform, and when the motor is driven to vibrate based on the second driving voltage data, the actual vibration effect can be ensured to have a small difference from the expected vibration effect.
Further, in an embodiment, the refining of the step S30 further includes:
step S31, calculating second acceleration data based on the second driving voltage, and adjusting and outputting the target acceleration waveform according to the second acceleration data;
step S32, calculating third driving voltage data according to the second acceleration data, inputting the third driving voltage data to a power amplifier of the motor, and performing power amplification on the third driving voltage data through the power amplifier to drive the motor to vibrate.
After the adjustment to obtain the second driving voltage data, acceleration data (hereinafter referred to as second acceleration data to indicate distinction) may be calculated from the second driving voltage data. It is understood that the second drive voltage data is voltage data that enables an actual acceleration waveform of the motor vibration to coincide with an acceleration waveform corresponding to the second acceleration data; since the second driving voltage data is obtained by linearly adjusting the first driving voltage data, there will be a certain difference between the acceleration waveform corresponding to the second acceleration data and the acceleration waveform corresponding to the first acceleration data (a segment of the target acceleration waveform), that is, there will be a certain difference between the actual acceleration waveform of the motor vibration and the expected acceleration waveform, but since the absolute value of the voltage value of the second driving voltage data is not larger than the peak value of the output voltage, and is obtained by performing linear adjustment on the basis of the first driving voltage data according to the peak value of the output voltage, it does not happen that the actual acceleration waveform differs too much from the expected acceleration waveform because the driving voltage required for the acceleration waveform exceeds the output voltage peak of the hardware driving circuit, therefore, the actual vibration effect of the motor does not differ too much from the expected vibration effect.
In a specific embodiment, a conversion formula between acceleration and voltage may be preset, each driving voltage value in the second driving voltage data is substituted into the conversion formula, and an acceleration value corresponding to each voltage value is obtained through calculation, and each acceleration value is the calculated second acceleration data. The conversion formula between the acceleration and the voltage may be obtained by a bilinear conversion method, a unit impulse response invariant method, or an euler discrete method, and according to the transfer characteristic between the voltage and the acceleration of the motor, the conversion formula is not limited in this embodiment.
After the second acceleration data is obtained through calculation, in order to make the actual acceleration waveform of the motor consistent with the acceleration waveform corresponding to the second acceleration data, the target acceleration waveform is adjusted based on the second acceleration data obtained through calculation, and the expected target acceleration waveform is adjusted to be the actual acceleration waveform and output, so that a user can consult when the user wants to know the acceleration waveform when the motor actually vibrates, wherein the output actual acceleration waveform can be a waveform, and can also be acceleration data or waveform parameters corresponding to the actual acceleration waveform. Further, the driving voltage data (hereinafter referred to as third driving voltage data for distinction) may be recalculated based on the second acceleration data. It is understood that the third drive voltage data is voltage data calculated so that an actual acceleration waveform of the motor vibration can be made to coincide with an acceleration waveform corresponding to the second acceleration data. In a specific embodiment, the method for calculating the third driving voltage data according to the second acceleration data may refer to the method for calculating the first driving voltage data according to the first acceleration data, and details are not repeated herein.
After the third driving voltage data is obtained, the third driving voltage data may be input to a power amplifier in the motor hardware driving circuit, and the power amplifier performs power amplification on the third driving voltage data, that is, each voltage value in the third driving voltage data is converted into actual voltage to drive the motor to vibrate by the power amplifier. The power amplifier may adopt an amplifier for performing power matching on an input signal, for example, a common class a, class B, class AB, or class D driver may be adopted, and the input signal may be an analog signal or a digital signal of a certain system.
In this embodiment, the acceleration data is obtained by sampling the target acceleration waveform, the required driving voltage data is predicted according to the acceleration data, and the required driving voltage data is linearly adjusted, so that the absolute value of the adjusted voltage value is not greater than the peak value of the output voltage of the hardware driving circuit, and then the motor is driven to vibrate according to the adjusted voltage data, so that when the driving voltage required by the target acceleration waveform is greater than the peak value of the output voltage of the hardware driving circuit, the voltage can be linearly adjusted, thereby avoiding a large difference between the actual vibration waveform and the expected vibration waveform due to the fact that the driving voltage required by the acceleration waveform exceeds the peak value of the output voltage of the hardware driving circuit, and ensuring that the difference between the actual vibration effect and the expected vibration effect of the motor is small.
Further, in an embodiment, before the step S10, the method further includes:
step S50, acquiring an original acceleration waveform and a sweep frequency characteristic bandwidth of the motor;
and step S60, setting parameters of a filter according to the frequency sweep characteristic bandwidth, and then filtering the original acceleration waveform by using the filter to obtain a target acceleration waveform.
When the frequency of the input acceleration waveform exceeds the sweep frequency characteristic bandwidth of the motor, the input original acceleration waveform can be filtered, the filtered acceleration waveform is taken as a target acceleration waveform, and then the target acceleration waveform is subjected to subsequent sampling operation.
Specifically, the original acceleration waveform and the sweep characteristic bandwidth of the motor may be acquired first. The frequency sweeping characteristic of the motor refers to the frequency domain response characteristic of the acceleration amplitude under the unit driving voltage. And setting parameters of a filter according to the frequency sweep characteristic bandwidth, filtering the original acceleration waveform according to the filter with the set parameters, and taking the acceleration waveform obtained by filtering as a target acceleration waveform. The frequency of the target acceleration waveform obtained by filtering can be within the frequency sweep characteristic bandwidth by setting the parameters of the filter according to the frequency sweep characteristic bandwidth.
Specifically, in one embodiment, the upper limit frequency of the frequency sweep characteristic bandwidth may be set as the cut-off frequency of a low-pass filter, and the lower limit frequency of the frequency sweep characteristic bandwidth may be set as the cut-off frequency of a high-pass filter, and then the low-pass filter and the high frequency may be usedAnd the pass filter sequentially performs low-pass filtering and high-pass filtering on the original acceleration waveform to obtain the target acceleration waveform. For example, the swept characteristic bandwidth is [ f ]aL,faH]The cut-off frequency of the low-pass filter can be set to faHSetting the cut-off frequency of the high-pass filter to faL
Or, in another embodiment, after the upper limit frequency of the frequency sweep characteristic bandwidth is set as the upper limit cut-off frequency of a band-pass filter and the lower limit frequency of the frequency sweep characteristic bandwidth is set as the lower limit cut-off frequency of the band-pass filter, the band-pass filter may be used to perform band-pass filtering on the original acceleration waveform to obtain the target acceleration waveform. For example, the swept characteristic bandwidth is [ f ]aL,faH]The bandwidth of the bandpass filter can be set to [ f ]aL,faH]。
Further, based on the first embodiment described above, a second embodiment of the motor control method of the present invention is proposed, and in this embodiment, the step S30 includes:
step S301, dividing the output voltage peak value by the absolute peak value of each voltage value in the first driving voltage data to obtain an adjustment coefficient, and judging whether the adjustment coefficient is smaller than 1;
in order to avoid that the driving voltage required by the acceleration waveform exceeds the output voltage peak value of the hardware driving circuit, and meanwhile, ensure that the difference between the actual acceleration waveform and the target acceleration waveform of the motor is relatively small, in this embodiment, the time span of a single frame of acceleration data can be set, so that the sampled first acceleration data includes a plurality of acceleration sample values, and the first driving voltage data includes a plurality of voltage values, and each voltage value of the first driving voltage data is linearly adjusted, so that the adjusted second driving voltage data and the first driving voltage data are in a linear relationship, and thus the difference between the actual acceleration waveform and the target acceleration waveform which are finally achieved by driving the motor based on the second driving voltage data is relatively small.
In one embodiment, the adjustment is linearThe method may be to extract a maximum value, that is, an absolute peak value, of absolute values of the voltage values in the first driving voltage data. For example, the first driving voltage data includes n voltage values u1(1)、u1(2)、……u1(n), taking the absolute value to obtain | u1(1)|、|u1(2)|、……|u1(n) l, and detecting the maximum value by using a sequential comparison method, namely comparing | u |1(1) I and I u1(2) Taking the larger value as u1max(ii) a Re-comparison u1maxAnd | u1(3) Taking the larger value as new u1max(ii) a And so on until u is compared1maxAnd | u1(n) |, taking the larger value as the final u1maxI.e. the absolute peak. After the absolute peak value is obtained, the output voltage peak value of the hardware driving circuit is divided by the absolute peak value, and the obtained result is used as an adjusting coefficient.
After the adjustment coefficient is obtained, whether the adjustment coefficient is smaller than 1 can be judged, and the adjustment coefficient is used for limiting the voltage peak value actually output by the driving circuit so as to ensure the safety of the motor and the driving circuit thereof.
Step S302, if the adjustment coefficient is greater than or equal to 1, the first driving voltage data is used as second driving voltage data;
when the adjustment coefficient is greater than or equal to 1, it is described that the absolute value of each voltage value in the first driving voltage data does not exceed the output voltage peak value, and at this time, the situation that the driving voltage required by the motor exceeds the output voltage peak value of the hardware driving circuit does not occur, and the first driving voltage data can be directly used as the second driving voltage data required by the target acceleration, that is, the first driving voltage data does not need to be adjusted, so that the actual acceleration waveform of the motor is consistent with the target acceleration waveform.
Step S303, if the adjustment coefficient is smaller than 1, multiplying each voltage value in the first driving voltage data by the adjustment coefficient to obtain each adjusted voltage value, and using each adjusted voltage value as second driving voltage data.
When the adjustment coefficient is less than 1, it is described that the absolute value of at least one voltage value in the first driving voltage data exceeds the peak value of the output voltage, and at this time, the voltage value needs to be adjusted, each voltage value in the first driving voltage data may be multiplied by the adjustment coefficient to obtain each adjusted voltage value, and the adjusted voltage value is taken as the second driving voltage data The waveform difference is relatively small.
Further, in an embodiment, the step S10 includes:
step S101, sampling a target acceleration waveform according to a first duration to obtain first acceleration data, wherein the time span of the first acceleration data is the first duration;
in this embodiment, when sampling the target acceleration waveform, the sampling may be performed according to a currently set time span of a single frame of acceleration data (hereinafter, referred to as a first time length for distinction), that is, the time span of the sampled first acceleration data is made to be the first time length.
After the step S40, the method further includes:
step A10, obtaining user feedback information, and extracting a motor vibration state carried by the user feedback information;
an input device for receiving user feedback information, such as a display screen or a joystick of the game machine, may be provided, and the user may feed back the vibration state of the motor, for example, whether the vibration state of the motor is a delayed state, a distorted state, or the like. The delay state refers to a delay between vibration of the motor and operation of the user, for example, one operation of the user triggers a vibration effect of the motor, but the vibration effect of the motor occurs only after the user operates the motor for a period of time, and this state is the delay state. The distortion state means that there is a large difference between the vibration of the motor and the expected vibration effect.
In the process of driving the motor to vibrate, user feedback information is obtained from input equipment, and the user feedback information carries the vibration state of the motor. Specifically, the motor vibration state may be a delayed state or a non-delayed state.
Step A20, if the motor vibration state is a delay state, adjusting the first time length to obtain a second time length, and continuing to sample the target acceleration waveform based on the second time length, wherein the second time length is less than the first time length.
After the vibration state of the motor is extracted, whether the vibration state of the motor is a delay state or not is judged, if yes, the first time length can be adjusted to obtain a second time length smaller than the first time length, and when the target acceleration waveform is sampled next time, the second time length is sampled to be sampled, namely, the time span of the first acceleration data obtained by next sampling is the second time length. It should be noted that, since the motor is driven to vibrate based on the second driving voltage data after the sampled first acceleration data is processed to obtain the second driving voltage data, when the motor vibration state is a time-delay state, it is described that the first time length is too long, which causes the motor vibration sensed by the user to be delayed, and at this time, the time span of the single acceleration data is shortened and then the subsequent sampling is performed, so that the time delay of the motor vibration sensed by the user is shorter or the time delay of the motor vibration is not sensed. Specifically, in an embodiment, the adjusting the first duration to obtain the second duration may be performed by subtracting a preset value from the first duration, that is, taking the preset value as a step, and subtracting the preset value from a time span of currently set single-frame acceleration data to shorten the time span each time when it is determined that the vibration state of the motor is the delayed state according to the user feedback information; further, a lowest threshold value may be set, and when the first duration minus a preset value is smaller than the lowest threshold value, the first duration is not adjusted, and the first duration is still maintained, so as to ensure that at least a plurality of acceleration sample values are present in the sampled first acceleration data.
Further, in an embodiment, after the step a10, the method further includes:
step A30, if the vibration state of the motor is a distortion state, adjusting the first time length to obtain a third time length, and continuing to sample the target acceleration waveform based on the third time length, wherein the third time length is longer than the first time length.
After the vibration state of the motor is extracted, whether the vibration state of the motor is a distortion state or not is judged, if yes, the first time length can be adjusted to obtain a third time length which is longer than the first time length, and when next sampling is carried out on the target acceleration waveform, the third time length is adopted for sampling, namely, the time span of first acceleration data obtained by next sampling is the third time length. It should be noted that, when the time span of the acceleration data of a single sampling is short, the adjusted second driving voltage data and the first driving voltage data may not maintain a strong linear relationship due to the small number of acceleration sampling values in a frame, and the effect of the motor vibration is distorted for the user, so when the motor vibration state is a distorted state, the subsequent sampling is performed after the time span of the acceleration data of the single frame is increased, and the distortion of the motor vibration perceived by the user is not obvious or not perceived. Specifically, in an embodiment, the adjusting the first duration to obtain the third duration may be performed by adding a preset value to the first duration, that is, taking the preset value as a step, and adding the preset value to the time span of the currently set single-frame acceleration data to increase the time span each time when it is determined that the vibration state of the motor is the distortion state according to the user feedback information; further, a highest threshold value may be set, and when the first duration is greater than the highest threshold value after adding the preset value to the first duration, the first duration is not adjusted, and the first duration is still maintained, so as to ensure that the delay of the motor vibration is not serious due to too long time span of the single-frame acceleration.
It can be understood that the less the number of frames in a single sampling, the higher the timeliness of the adjustment of the sampling parameters such as the time span according to the feedback information of the user, and when only one frame of acceleration waveform is sampled each time, after the feedback information of the user is obtained, the next frame of acceleration waveform can be sampled by using the adjusted sampling parameters according to the feedback information of the user, so that the response timeliness of the feedback information of the user is improved.
Further, based on the first and/or second embodiments, a third embodiment of the motor control method according to the present invention is provided, in which the step of calculating the first driving voltage data according to the first acceleration data in step S20 includes:
step S201, obtaining motor parameters of the motor, wherein the motor parameters comprise vibrator mass, magnetic field intensity, spring stiffness coefficient, damping coefficient and coil direct current resistance;
step S202, calculating according to the first acceleration data and the motor parameters and a conversion formula between the motor voltage and the acceleration to obtain first driving voltage data.
In this embodiment, a conversion formula between voltage and acceleration may be set according to motor parameters of the motor, the motor parameters of the motor may be obtained, and the motor parameters and the first acceleration data are substituted into the conversion formula for calculation, so as to obtain first driving voltage data. The motor parameters may include vibrator mass, magnetic field strength, spring stiffness, damping coefficient, coil dc resistance.
Specifically, in an embodiment, the first driving voltage data may be calculated according to the following conversion formula.
Figure BDA0003329962530000151
Figure BDA0003329962530000152
Figure BDA0003329962530000153
Figure BDA0003329962530000154
Figure BDA0003329962530000155
Figure BDA0003329962530000156
Figure BDA0003329962530000157
Figure BDA0003329962530000161
Wherein u is1(n) denotes an nth driving voltage value in the first driving voltage data, a1(n) represents an nth acceleration sample value in the first acceleration data. m is the oscillator mass, Bl is the magnetic field strength, k is the spring stiffness coefficient, r is the damping coefficient, Re is the coil dc resistance, and T is the sampling period. f. ofaLIs the lower limit frequency of the frequency sweep characteristic bandwidth of the motor. When n is 1, u1(n-1)、u1(n-2)、a1(n-1) and a1(n-2) is 0, and when n is 2, u is1(n-2) and a1(n-2) is 0.
After the first driving voltage data is calculated, the first driving voltage data is linearly adjusted based on a voltage peak value output by a hardware driving circuit to obtain second driving voltage data, when the motor is driven to vibrate based on the second driving voltage data, second acceleration data is calculated according to the second driving voltage data, third driving voltage data is calculated according to the second acceleration data, the third driving voltage data is input into a power amplifier in the hardware driving circuit, and the motor is driven to vibrate after the third driving voltage data is subjected to power amplification.
In one embodiment, the second acceleration data may be calculated according to the following conversion formula.
Figure BDA0003329962530000162
b0=4K3
b1=-8K3
b2=4K3
Figure BDA0003329962530000163
Figure BDA0003329962530000164
Figure BDA0003329962530000165
Figure BDA0003329962530000166
Wherein, a2(n) denotes an nth acceleration value, i, in the second acceleration data2(n) denotes an nth voltage value in the second driving voltage data. m is the oscillator mass, Bl is the magnetic field strength, k is the spring stiffness coefficient, r is the damping coefficient, Re is the coil dc resistance, and T is the sampling period. f. ofaLIs the lower limit frequency of the frequency sweep characteristic bandwidth of the motor. When n is 1, a2(n-1)、a2(n-2)、i2(n-1) and i2(n-2) is 0, and when n is 2, a2(n-2) and i2(n-2) is 0.
In one embodiment, the third driving voltage data may be calculated according to the following conversion formula.
Figure BDA0003329962530000171
Figure BDA0003329962530000172
Figure BDA0003329962530000178
Figure BDA0003329962530000173
Figure BDA0003329962530000174
Figure BDA0003329962530000175
Figure BDA0003329962530000177
Figure BDA0003329962530000176
Wherein, a2(n) denotes an nth acceleration value, u, in the second acceleration data3(n) denotes an nth driving voltage value in the third driving voltage data. m is the oscillator mass, Bl is the magnetic field strength, k is the spring stiffness coefficient, r is the damping coefficient, Re is the coil dc resistance, and T is the sampling period. f. ofaLIs the lower limit frequency of the frequency sweep characteristic bandwidth of the motor. When n is 1, a2(n-1)、a2(n-2)、u3(n-1) and u3(n-2) is 0, and when n is 2, a2(n-2) and u3(n-2) is 0.
In addition, an embodiment of the present invention further provides a motor control apparatus, and with reference to fig. 3, the apparatus includes:
the system comprises a sampling module 10, a processing module and a processing module, wherein the sampling module is used for sampling a target acceleration waveform to obtain first acceleration data, and the first acceleration data comprises a plurality of acceleration sampling values;
the calculation module 20 is configured to calculate to obtain first driving voltage data according to the first acceleration data;
and the adjustment driving module 30 is configured to perform linear adjustment on the first driving voltage data according to an output voltage peak of a hardware driving circuit of the motor to obtain second driving voltage data, and drive the motor to vibrate based on the second driving voltage data, where an absolute value of a voltage value in the second driving voltage data is not greater than the output voltage peak.
Further, the adjustment driving module 30 includes:
the first calculation unit is used for dividing the output voltage peak value by the absolute peak value of each voltage value in the first driving voltage data to obtain an adjustment coefficient and judging whether the adjustment coefficient is smaller than 1;
a determining unit, configured to take the first driving voltage data as second driving voltage data if the adjustment coefficient is greater than or equal to 1;
and the second calculating unit is used for multiplying each voltage value in the first driving voltage data by the adjusting coefficient to obtain each adjusted voltage value if the adjusting coefficient is smaller than 1, and taking each adjusted voltage value as second driving voltage data.
Further, the sampling module 10 is further configured to sample a target acceleration waveform according to a first duration to obtain first acceleration data, where a time span of the first acceleration data is the first duration;
the device further comprises:
the first acquisition module is used for acquiring user feedback information and extracting a motor vibration state carried by the user feedback information;
the adjustment driving module 30 is further configured to adjust the first time length to obtain a second time length if the motor vibration state is a delay state, so as to continue sampling the target acceleration waveform based on the second time length, where the second time length is smaller than the first time length.
Further, the adjustment driving module 30 is further configured to adjust the first time length to obtain a third time length if the vibration state of the motor is a distortion state, so as to continue sampling the target acceleration waveform based on the third time length, where the third time length is longer than the first time length.
Further, the apparatus further comprises:
the second acquisition module is used for acquiring an original acceleration waveform and a frequency sweep characteristic bandwidth of the motor;
and the filtering module is used for filtering the original acceleration waveform by adopting the filter to obtain the target acceleration waveform after setting parameters of the filter according to the sweep frequency characteristic bandwidth.
Further, the calculation module 20 includes:
the motor parameter acquisition unit is used for acquiring motor parameters of the motor, wherein the motor parameters comprise vibrator mass, magnetic field intensity, spring stiffness coefficient, damping coefficient and coil direct-current resistance;
and the third calculation unit is used for calculating to obtain first driving voltage data according to the first acceleration data and the motor parameters and a conversion formula between the voltage and the acceleration of the motor.
Further, the adjustment driving module 30 is further configured to:
calculating second acceleration data based on the second driving voltage, and adjusting and outputting the target acceleration waveform according to the second acceleration data;
and calculating third driving voltage data according to the second acceleration data, inputting the third driving voltage data into a power amplifier of the motor, and performing power amplification on the third driving voltage data through the power amplifier so as to drive the motor to vibrate.
The specific embodiment of the motor control device of the present invention is basically the same as the embodiments of the motor control method, and is not described herein again.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, on which a motor control program is stored, and the motor control program, when executed by a processor, implements the steps of the motor control method as described below.
For the embodiments of the motor control device and the computer-readable storage medium of the present invention, reference may be made to the embodiments of the motor control method of the present invention, and details are not repeated here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A motor control method, characterized in that the method comprises the steps of:
sampling a target acceleration waveform to obtain first acceleration data, wherein the first acceleration data comprises a plurality of acceleration sampling values;
calculating to obtain first driving voltage data according to the first acceleration data;
and according to the output voltage peak value of the hardware driving circuit of the motor, carrying out linear adjustment on the first driving voltage data to obtain second driving voltage data, and driving the motor to vibrate based on the second driving voltage data, wherein the absolute value of the voltage value in the second driving voltage data is not greater than the output voltage peak value.
2. The motor control method of claim 1, wherein the step of linearly adjusting the first driving voltage data to obtain the second driving voltage data according to the peak value of the output voltage of the hardware driving circuit of the motor comprises:
dividing the output voltage peak value by the absolute peak value of each voltage value in the first driving voltage data to obtain an adjustment coefficient, and judging whether the adjustment coefficient is smaller than 1;
if the adjustment coefficient is greater than or equal to 1, taking the first driving voltage data as second driving voltage data;
and if the adjustment coefficient is smaller than 1, multiplying each voltage value in the first driving voltage data by the adjustment coefficient to obtain each adjusted voltage value, and taking each adjusted voltage value as second driving voltage data.
3. The motor control method of claim 2, wherein the step of sampling the target acceleration waveform to obtain the first acceleration data comprises:
sampling a target acceleration waveform according to a first duration to obtain first acceleration data, wherein the time span of the first acceleration data is the first duration;
after the step of driving the motor to vibrate based on the second driving voltage data, the method further includes:
acquiring user feedback information and extracting a motor vibration state carried by the user feedback information;
and if the motor vibration state is a delay state, adjusting the first time length to obtain a second time length, and continuously sampling the target acceleration waveform based on the second time length, wherein the second time length is less than the first time length.
4. The motor control method of claim 3, wherein after the step of obtaining the user feedback information and extracting the vibration state of the motor carried by the user feedback information, the method further comprises:
and if the motor vibration state is a distortion state, adjusting the first time length to obtain a third time length, and continuing to sample the target acceleration waveform based on the third time length, wherein the third time length is longer than the first time length.
5. The motor control method according to claim 1, wherein the step of sampling the target acceleration waveform to obtain the first acceleration data further comprises:
acquiring an original acceleration waveform and a sweep frequency characteristic bandwidth of the motor;
and setting parameters of a filter according to the frequency sweep characteristic bandwidth, and filtering the original acceleration waveform by using the filter to obtain a target acceleration waveform.
6. The motor control method according to claim 1, wherein the step of calculating first driving voltage data from the first acceleration data comprises:
obtaining motor parameters of the motor, wherein the motor parameters comprise vibrator mass, magnetic field intensity, spring stiffness coefficient, damping coefficient and coil direct-current resistance;
and calculating according to the first acceleration data and the motor parameters and a conversion formula between the voltage and the acceleration of the motor to obtain first driving voltage data.
7. The motor control method according to claim 1, wherein the step of driving the motor to vibrate based on the second driving voltage data includes:
calculating second acceleration data based on the second driving voltage, and adjusting and outputting the target acceleration waveform according to the second acceleration data;
and calculating third driving voltage data according to the second acceleration data, inputting the third driving voltage data into a power amplifier of the motor, and performing power amplification on the third driving voltage data through the power amplifier so as to drive the motor to vibrate.
8. A motor control apparatus, characterized in that the apparatus comprises:
the device comprises a sampling module, a processing module and a control module, wherein the sampling module is used for sampling a target acceleration waveform to obtain first acceleration data, and the first acceleration data comprises a plurality of acceleration sampling values;
the calculation module is used for calculating to obtain first driving voltage data according to the first acceleration data;
and the adjustment driving module is used for performing linear adjustment on the first driving voltage data according to the output voltage peak value of the hardware driving circuit of the motor to obtain second driving voltage data and driving the motor to vibrate based on the second driving voltage data, wherein the absolute value of the voltage value in the second driving voltage data is not greater than the output voltage peak value.
9. A motor control apparatus, characterized by comprising: memory, a processor and a motor control program stored on the memory and executable on the processor, the motor control program when executed by the processor implementing the steps of the motor control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a motor control program is stored thereon, which when executed by a processor implements the steps of the motor control method according to any one of claims 1 to 7.
CN202111277461.XA 2021-10-29 2021-10-29 Motor control method, device, equipment and computer readable storage medium Pending CN114006565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111277461.XA CN114006565A (en) 2021-10-29 2021-10-29 Motor control method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111277461.XA CN114006565A (en) 2021-10-29 2021-10-29 Motor control method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114006565A true CN114006565A (en) 2022-02-01

Family

ID=79925725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111277461.XA Pending CN114006565A (en) 2021-10-29 2021-10-29 Motor control method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114006565A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115622475A (en) * 2022-11-07 2023-01-17 歌尔股份有限公司 Protection method of linear motor, terminal device and computer readable storage medium
CN115632592A (en) * 2022-11-07 2023-01-20 歌尔股份有限公司 Displacement control method and device for linear motor oscillator, terminal device and medium
CN115632593A (en) * 2022-11-07 2023-01-20 歌尔股份有限公司 Protection method of linear motor, terminal device and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5898286A (en) * 1997-01-13 1999-04-27 International Business Machines Corporation Digital servo control system for a data recording disk file with improved saturation modelling
US20130043987A1 (en) * 2011-08-15 2013-02-21 Fujitsu Limited Mobile terminal apparatus and control method
JP2015173551A (en) * 2014-03-12 2015-10-01 ファスフォードテクノロジ株式会社 Semiconductor manufacturing method and die bonder
US20190121433A1 (en) * 2017-10-20 2019-04-25 Immersion Corporation Determining a haptic profile using a built-in accelerometer
CN111193457A (en) * 2019-12-16 2020-05-22 Oppo广东移动通信有限公司 Vibration device, method of controlling vibration device, electronic apparatus, and storage medium
CN111478630A (en) * 2019-12-30 2020-07-31 瑞声科技(新加坡)有限公司 Motor steady-state single-frequency distortion compensation method and device
CN111694437A (en) * 2020-06-20 2020-09-22 瑞声科技(新加坡)有限公司 Implementation method and device of haptic effect and computer-readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5898286A (en) * 1997-01-13 1999-04-27 International Business Machines Corporation Digital servo control system for a data recording disk file with improved saturation modelling
US20130043987A1 (en) * 2011-08-15 2013-02-21 Fujitsu Limited Mobile terminal apparatus and control method
JP2015173551A (en) * 2014-03-12 2015-10-01 ファスフォードテクノロジ株式会社 Semiconductor manufacturing method and die bonder
US20190121433A1 (en) * 2017-10-20 2019-04-25 Immersion Corporation Determining a haptic profile using a built-in accelerometer
CN111193457A (en) * 2019-12-16 2020-05-22 Oppo广东移动通信有限公司 Vibration device, method of controlling vibration device, electronic apparatus, and storage medium
CN111478630A (en) * 2019-12-30 2020-07-31 瑞声科技(新加坡)有限公司 Motor steady-state single-frequency distortion compensation method and device
CN111694437A (en) * 2020-06-20 2020-09-22 瑞声科技(新加坡)有限公司 Implementation method and device of haptic effect and computer-readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115622475A (en) * 2022-11-07 2023-01-17 歌尔股份有限公司 Protection method of linear motor, terminal device and computer readable storage medium
CN115632592A (en) * 2022-11-07 2023-01-20 歌尔股份有限公司 Displacement control method and device for linear motor oscillator, terminal device and medium
CN115632593A (en) * 2022-11-07 2023-01-20 歌尔股份有限公司 Protection method of linear motor, terminal device and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN114006565A (en) Motor control method, device, equipment and computer readable storage medium
CN113992106A (en) Motor control method, device, equipment and computer readable storage medium
KR102600718B1 (en) Thermal model of the transducer for thermal protection and resistance estimation
CN110011591B (en) Motor drive signal generation method, electronic device, and storage medium
EP2624099B1 (en) Method and system for sound to haptic effect conversion using waveform
CN110380664A (en) A kind of motor vibrations control method, device and computer readable storage medium
CN115242157A (en) Displacement limiting method and device for motor oscillator, terminal device and storage medium
EP2487557A2 (en) Sound to haptic effect conversion system using amplitude value
EP4355500A1 (en) Methods and systems for in-system estimation of actuator parameters
CN113406495B (en) Method and device for generating sweep frequency characteristic curve of vibration motor and storage medium
CN111478630B (en) Motor steady-state single-frequency distortion compensation method and device
CN111694437B (en) Method and apparatus for implementing haptic effects
CN109144606A (en) A kind of motor driving method, terminal device and computer readable storage medium
CN111552371A (en) Excitation voltage generation method, device, equipment and medium, and test method and system
CN113702829A (en) Method and device for generating sweep frequency characteristic curve of vibration motor and storage medium
CN113949324B (en) Method and apparatus for controlling linear motor, and medium
CN110350828B (en) Motor parameter tracking method and system
CN113949323A (en) Control method, control device, apparatus and medium for linear motor
CN110045814B (en) Excitation signal generation method and device, terminal and storage medium
CN108347209A (en) Overshoot response eliminates system and method
CN113992107B (en) Motor control method, apparatus, device, and computer-readable storage medium
CN112422862A (en) Television control method, television and readable storage medium
CN109713945B (en) Braking method and braking system of ERM motor
CN114389491B (en) Motor vibration control method, apparatus, computer device, and storage medium
CN111402876A (en) Data transmission method, device and 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