Motor driving method, driving chip, equipment and medium

CN119234386APending Publication Date: 2024-12-31SHANGHAI AWINIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380009461.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing electronic devices require additional sensors when adjusting motor vibration intensity, which increases hardware costs and different motors cannot output consistent vibration feedback under the same excitation signal, resulting in differences in user experience.

Method used

By measuring the reverse electromotive force of the motor during residual vibration, calculating the vibration parameters and adjusting the excitation signal, the motor vibration intensity can be adjusted without the need for additional sensors to ensure that the vibration parameters of different motors are consistent.

Benefits of technology

It saves hardware costs, improves the user's tactile experience, ensures that multiple motors output consistent vibration feedback under the same excitation signal, and improves the uniformity of vibration intensity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119234386A_ABST
    Figure CN119234386A_ABST
Patent Text Reader

Abstract

The invention is applied to the technical field of electronics, and provides a motor driving method, a driving chip, equipment and a medium, the motor driving method is applied to first electronic equipment, the first electronic equipment comprises a first motor, and the method comprises the following steps: acquiring a first reverse electromotive force generated by residual vibration after a first signal is adopted to drive the first motor to move; calculating a first vibration parameter generated by the first motor in the first signal driving process according to the first back electromotive force; and adjusting the first signal into a second signal based on the first vibration parameter, and driving the first motor to move by adopting the second signal. Therefore, the electronic equipment can calculate the vibration parameter of the motor only by measuring the back electromotive force during residual vibration of the motor, and the vibration intensity of the first motor can be adjusted without acquiring the vibration parameter by an additional sensor, so that the hardware cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Motor driving method, driving chip, device and medium Technical Field

[0001] The present invention relates to the field of electronic technology, and in particular to a motor driving method, a driving chip, a device, and a medium. Background Art

[0002] In many electronic devices, linear motors are key components, converting electrical energy into kinetic energy to provide realistic tactile feedback. Among the many types of vibrotactile feedback signals, long-lasting vibrations are a key type, with important applications in a wide range of scenarios, such as incoming call and text message ringing, emergency alerts, and countdown reminders. To effectively achieve this vibration effect, the motor typically needs to operate at its resonant frequency to achieve steady-state operation.

[0003] Due to limitations of materials, design, processing technology and other factors, there are performance differences between individual motors actually produced, such as resonant frequency and steady-state vibration intensity. This results in the inability to obtain a consistent tactile experience using the same excitation signal. Typically, electronic devices can use sensors to detect the vibration parameters of the motor (such as displacement, speed, and acceleration, etc.), and then send the vibration parameters to the driver chip. The driver chip adjusts the voltage of the excitation signal to adjust the vibration intensity of the motor in steady state.

[0004] However, the above method requires the use of additional sensors to obtain vibration parameters, which increases the hardware cost of the electronic device for adjusting the excitation signal.

[0005] Summary of the Invention

[0006] The present application provides a motor driving method, a driving chip, a device and a medium.

[0007] In a first aspect, a motor driving method is provided, which is applied to a first electronic device, the first electronic device including a first motor, wherein the method includes: obtaining a first back electromotive force generated by residual vibration after the first motor is driven to move by a first signal; calculating a first vibration parameter generated by the first motor during the first signal driving process based on the first back electromotive force; adjusting the first signal to a second signal based on the first vibration parameter, and using the second signal to drive the first motor to move.

[0008] In this way, the electronic device can calculate the vibration parameters of the motor by only measuring the back electromotive force during the motor's residual vibration. No additional sensors are needed to obtain the vibration parameters, and the vibration intensity of the first motor can be adjusted, saving hardware costs.

[0009] In conjunction with the first aspect, in some implementations, the first vibration parameter includes one or more of displacement, velocity, and acceleration.

[0010] In combination with the first aspect, in some implementations, the first back electromotive force includes the frequency of the first cycle and the peak values ​​of multiple cycles, wherein the peak values ​​of the multiple cycles include the peak value of the first cycle; the method also includes: determining the damping parameters of the first motor based on the peak values ​​of multiple cycles; and calculating the first vibration parameters of the first motor based on the damping parameters, the peak value and the frequency of the first cycle.

[0011] In conjunction with the first aspect, in some implementations, the damping parameter includes a first damping ratio and a first damping coefficient. The method further includes: calculating a ratio between adjacent peak values ​​based on the plurality of peak values; calculating the first damping ratio based on the ratio between the adjacent peak values; and calculating a first damping coefficient of the first motor based on the first damping ratio.

[0012] In conjunction with the first aspect, in some implementations, the damping parameters include a second damping ratio and a second damping coefficient. The method further includes: determining a ratio between differences between adjacent peak values ​​among the plurality of peak values ​​based on differences between adjacent peak values; calculating the second damping ratio based on the ratio between differences between the plurality of adjacent peak values; and determining a second damping coefficient for the first motor based on the second damping ratio.

[0013] In combination with the first aspect, in some implementations, the back electromotive force also includes multiple valley values, the damping parameters include a third damping ratio and a third damping coefficient, and the method also includes: calculating the ratio between the differences between multiple valley values ​​and peak values ​​based on the differences between adjacent valley values ​​and peak values; determining the third damping ratio based on the ratio between the differences between multiple valley values ​​and peak values; and determining the third damping coefficient of the first motor based on the third damping ratio.

[0014] In combination with the first aspect, in some implementations, a second vibration parameter is obtained, and the second vibration parameter is obtained based on a second back electromotive force generated by the residual vibration after the second motor is driven to move by the first signal; based on the second vibration parameter and the first vibration parameter, the first signal is adjusted to the second signal.

[0015] In this way, the same vibration parameters can be used to adjust the excitation signal for motors of the same type, so that the excitation signals of different motors can be adjusted according to the same vibration parameters, making the vibration parameters of multiple motors consistent, and thus the vibration feeling felt by the user consistent, thereby improving the user's tactile experience.

[0016] In combination with the first aspect, in some implementations, corresponding to the ratio of the first vibration parameter to the second vibration parameter being greater than the upper threshold value, the first signal is adjusted to the second signal according to the upper threshold value; corresponding to the ratio of the first vibration parameter to the second vibration parameter being less than or equal to the lower threshold value, the first signal is adjusted to the second signal according to the lower threshold value; corresponding to the ratio of the first vibration parameter to the second vibration parameter being greater than the lower threshold value and less than or equal to the upper threshold value, the first signal is adjusted to the second signal according to the ratio of the first vibration parameter to the second vibration parameter.

[0017] Furthermore, the magnitude of the first signal can be adjusted based on the difference between the first and second vibration parameters, ultimately ensuring that the motor's vibration intensity matches that of the second motor. Setting upper and lower thresholds limits the amplitude of each adjustment to the first signal, preventing it from being adjusted too high all at once. This prevents the motor from being damaged by overload due to a sudden increase in the first signal.

[0018] In the second aspect, the present application provides an electronic device, including a driver chip and a first motor; wherein the driver chip is used to: obtain a first back electromotive force generated by the residual vibration after the first motor is driven to move by a first signal, and calculate the first vibration parameter generated by the first motor during the driving process of the first signal based on the first back electromotive force, and is also used to adjust the first signal to a second signal based on the first vibration parameter, and use the second signal to drive the first motor to move.

[0019] In a third aspect, the present application provides a driver chip comprising a processor and a memory, wherein the memory is used to store instructions and the processor is used to execute instructions. When the processor executes the instructions, the method described in the first aspect is performed.

[0020] In a fourth aspect, the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are run on an electronic device, the method described in the first aspect is executed.

[0021] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When the computer program product is executed by a computing device, the computing device performs the method described in the first aspect.

[0022] To sum up, through the motor driving method, driving chip, device and medium provided in this application, the electronic device can obtain the vibration parameters of the motor by obtaining the reverse electromotive force of the motor. Without the need for additional sensors to obtain the vibration parameters, the vibration intensity of the first motor can be adjusted, saving hardware costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments.

[0024] FIG1 is a vibration waveform diagram of a motor provided in an embodiment of the present application;

[0025] FIG2 is a schematic diagram of a structure for adjusting an excitation signal by a sensor according to an embodiment of the present application;

[0026] FIG3 is a schematic flow chart of a motor driving method provided in an embodiment of the present application;

[0027] FIG4 is a schematic diagram of collected back electromotive force data provided by an embodiment of the present application;

[0028] FIG5 is a schematic diagram of another type of back electromotive force data collected according to an embodiment of the present application;

[0029] FIG6 is a schematic diagram of a back electromotive force including a DC bias provided by an embodiment of the present application;

[0030] FIG7 is a flow chart of another motor driving method provided in an embodiment of the present application;

[0031] FIG8 is a motor drive system provided by an embodiment of the present application;

[0032] FIG9 is another motor drive system provided in an embodiment of the present application;

[0033] FIG10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The illustrative embodiments of the present application include, but are not limited to, a motor driving method, a driving chip, a device, and a medium.

[0035] A motor is a structure composed of magnets, coils, and springs. It converts electrical energy into kinetic energy by inputting an AC signal. During operation, the motor's coils, driven by the excitation signal, generate a rotating magnetic field. This rotating magnetic field interacts with the magnetic field of the magnets, causing the springs to vibrate.

[0036] Electronic devices are often equipped with motors, whose main functions are vibration reminders and vibration feedback. For example, the motor in a mobile phone can be used for vibration reminders, the motor in a game controller can provide vibration tactile simulation, and the motor in augmented reality (AR) / virtual reality (VR) products can provide vibration feedback.

[0037] When driven by an excitation signal, a motor vibrates. After the excitation stops, the motor's oscillation waveform decays until it disappears. As shown in Figure 1, the oscillation waveform when driven by an excitation signal is the excitation driving portion, while the oscillation waveform after the excitation stops is the residual vibration portion.

[0038] It should be understood that when the motor is driven by an excitation signal, the vibration frequency of the motor is affected by the frequency of the excitation signal, and the vibration intensity of the motor is affected by the voltage of the excitation signal.

[0039] The frequency at which the motor achieves maximum energy conversion efficiency when driven by an excitation signal is called the resonant frequency f0. When the motor operates at this resonant frequency, it can generate the highest kinetic energy using the least amount of electrical energy. At this point, the motor is in steady state, and the excitation signal is also called the steady-state signal, with its frequency being the resonant frequency f0.

[0040] However, during the motor manufacturing process, due to limitations in materials, design, processing technology, and other factors, it is difficult to ensure that the structures and vibration characteristics of multiple motors are consistent. There is also the problem of inconsistent vibration intensity in the steady state among motors of the same batch.

[0041] For example, production indicators of a certain type of motor include: acceleration ≥ 0.5 gravitational acceleration / effective value (Grms) and resonant frequency = 170 ± 10 Hz.

[0042] This shows that the vibration parameters of motors of the same model and batch can vary. If the excitation signal that causes one motor to reach steady state is applied to other motors, the other motors will not be able to produce the same vibration intensity as the first motor in steady state. In other words, multiple motors cannot output vibration feedback with consistent intensity and crispness under the same excitation signal. This leads to different vibration experiences among the same batch of electronic devices, which can be perceived by users.

[0043] Typically, electronic devices can use sensors to detect the vibration parameters of the motor (such as acceleration), and then send the vibration parameters to the chip. The chip adjusts the voltage of the excitation signal to adjust the vibration intensity of the motor in steady state.

[0044] As shown in Figure 2, the electronic device 100 may include a driver chip 110, a motor 120, and a sensor 130. The sensor 130 may specifically be an acceleration sensor. The driver chip 110 first applies an excitation signal having a resonant frequency f0 to the motor 120, causing the motor 120 to be in a steady state. The sensor 130 then obtains vibration parameters such as acceleration of the motor 120 when in a steady state, and then sends the vibration parameters to the driver chip 110. The driver chip 110 then adjusts the voltage of the excitation signal to adjust the vibration intensity of the motor in the steady state.

[0045] However, the above method requires the use of an additional sensor to obtain the vibration parameters and adjust the excitation signal, which increases the hardware cost of the electronic device for adjusting the excitation signal.

[0046] It's understandable that during motor operation, although the motor's coils remain stationary, they cut through the magnetic flux lines of the rotating magnetic field they generate. This in turn generates a voltage in the opposite direction of the excitation signal, known as the back-electromotive force (BEMF). Furthermore, the faster the motor's vibration speed, the more magnetic flux lines the coils cut, resulting in a greater back-electromotive force. In other words, the motor's back-electromotive force is related to its vibration speed. The motor's vibration speed can also be used to determine its acceleration.

[0047] Therefore, in order to solve the problem that additional sensors are required to obtain vibration parameters, which increases hardware costs, the present application provides a motor driving method, in which the electronic device first uses a first signal to excite the first motor to cause the first motor to vibrate. Then, the electronic device measures the first back electromotive force generated by the residual vibration of the vibration. Then, the first vibration parameter (such as acceleration, velocity, displacement) of the first motor when it is driven by the first signal is obtained based on the first back electromotive force. Then, the electronic device can adjust the voltage of the first signal by the first vibration parameter to obtain a second signal, and use the second signal to drive the motor to achieve the purpose of adjusting the vibration intensity of the first motor.

[0048] In this way, the electronic device only needs to measure the back electromotive force during the residual vibration of the motor to calculate the vibration parameters of the motor. No additional sensors are needed to obtain the vibration parameters, and then the vibration intensity of the first motor is adjusted, saving hardware costs.

[0049] In some embodiments, the motor driving method provided by the present application, the electronic device also compares the first vibration parameter of the first motor with the second vibration parameter, and adjusts the voltage of the first signal based on the ratio of the first vibration parameter to the second vibration parameter. The second vibration parameter is also calculated based on the measured second back electromotive force of the residual vibration after the electronic device drives the second motor to a steady state. The second motor is used as the target motor, and the driving signal of the first motor is adjusted to make the vibration intensity reach the intensity of the second motor.

[0050] In this way, the same vibration parameters can be used to adjust the excitation signal for motors of the same type, so that the excitation signals of different motors can be adjusted according to the vibration parameters of the same target motor (second motor), so that the vibration intensity of multiple motors is consistent with the target motor (second motor), thereby making the vibration sense felt by users on different devices consistent, improving the user's tactile experience. On the same device, due to environmental changes (such as temperature) and vibrator changes (such as aging), real-time adjustments can also be made through this application to keep the vibration experience consistent.

[0051] It should be understood that the first motor and the second motor can be any type of motor, and the first motor and the second motor can be of the same type. For example, the first motor and the second motor can be X-axis linear motors, such as a 0809 motor or a 0815 motor, and this application does not impose any specific limitations.

[0052] The motor driving method provided by the present application is described below in conjunction with FIG3 . The motor driving method can be applied to an electronic device, wherein the electronic device includes a first motor. The method specifically includes:

[0053] S310: Using a first signal to excite a first motor, and obtaining a first back electromotive force when the first motor is in residual vibration.

[0054] The electronic device first obtains the resonant frequency of the first motor and then excites the first motor using a first signal, where the first signal can be a signal having a frequency equal to the resonant frequency and an intensity equal to the rated voltage, so that the first motor reaches a stable state. Since the motor is driven by excitation, both the excitation signal and the back electromotive force are present at both ends of the coil, and the back electromotive force of the motor during the excitation process cannot be directly measured. Furthermore, the electronic device excites the motor to a steady state and then stops the excitation. At this time, the voltage across the motor during the residual vibration is the back electromotive force during the residual vibration, which is recorded as the first back electromotive force.

[0055] The electronic device may measure the resonant frequency of the first motor by frequency sweeping. Frequency sweeping refers to changing the driving excitation frequency from high to low or from low to high during the measurement process to obtain a frequency response curve of the vibrator, and then obtain the resonant frequency of the vibrator. The electronic device may also calculate the resonant frequency of the vibrator under forced vibration driven by the excitation based on the period or frequency of the residual vibration portion of the first motor. It should be understood that the present application does not specifically limit the method by which the electronic device obtains the resonant frequency of the first motor.

[0056] The first back electromotive force of the first motor obtained by the electronic device includes the peak value and frequency of the first cycle and the peak values ​​of multiple subsequent cycles. The first cycle can be the first cycle of the residual vibration or other cycles. For example, the frequency of the first cycle can be obtained by obtaining the time of the zero crossing, the peak time, the time between the peak and the valley, the time between the zero crossing and the peak, or the time between the zero crossing and the valley in the first cycle.

[0057] For example, as shown in FIG4 , the back electromotive force acquired by the electronic device includes peak values ​​Pε1 , Pε2 , Pε3 , and a first cycle frequency fd1 .

[0058] In some embodiments, the motor back electromotive force obtained by the electronic device also includes multiple cycles of valley values. For example, as shown in FIG5 , the back electromotive force obtained by the electronic device includes peak values ​​and valley values: Pε1′, Pε2′, Pε3′, Pε4′, Pε5′, and Pε6′.

[0059] It should be understood that the present application does not specifically limit the number of peak values ​​and valley values ​​obtained by the electronic device.

[0060] S320: Determine a first vibration parameter when the first motor is excited according to a first back electromotive force when the first motor is in residual vibration.

[0061] The electronic device first determines the damping parameters, which include the damping ratio and damping coefficient, from the first back EMF generated during the residual vibration of the first motor. The first vibration parameters, such as velocity, acceleration, or displacement, are then derived from the first back EMF and the damping parameters immediately after the excitation is stopped.

[0062] Specifically, the electronic device first calculates a damping ratio based on the ratio of multiple peak values ​​of the first back electromotive force, and then calculates a damping coefficient based on the damping ratio. The first vibration parameter can be determined using the damping ratio, damping coefficient, and the frequency and peak value of the first cycle. The specific calculation method will be described in detail below.

[0063] Because the motor's coils generate both the excitation signal and the back EMF during excitation, it's impossible to directly measure the motor's back EMF during excitation. This method excites the motor to a steady state and then stops the excitation. The back EMF is then measured as the voltage across the motor's coils during residual vibration.

[0064] The back EMF during motor residual vibration will decay due to damping, including a gradual decrease in its peak value. Therefore, electronic equipment can determine the damping parameters by measuring the back EMF during motor residual vibration. Then, based on the back EMF and damping parameters immediately after de-excitation, the back EMF when the motor reaches steady state can be calculated. Specifically, the frequency and peak value of the first cycle of residual vibration, along with the damping parameters, can be used to determine the back EMF at steady state. The motor's vibration parameters can then be determined based on this steady-state back EMF.

[0065] S330: Adjust the first signal to a second signal based on the first vibration parameter, and use the second signal to drive the first motor to move.

[0066] The electronic device can adjust the voltage of the first signal based on the magnitude of the first vibration parameter to obtain a second signal. The electronic device can then drive the first motor to move based on the second signal, thereby adjusting the vibration intensity of the motor during excitation.

[0067] In this way, the electronic device can calculate the vibration parameters of the motor by only measuring the back electromotive force during the residual vibration of the motor, without the need for additional sensors to obtain the vibration parameters, and then adjust the vibration intensity of the first motor, saving hardware costs.

[0068] The specific implementation process of the above step S320 is described in detail below.

[0069] Here, an example is first given in which the first vibration parameter is acceleration.

[0070] The calculation method of the ratio of multiple peak values ​​of the residual oscillation back electromotive force can refer to the following formula (1), which is illustrated by taking the peak values ​​Pε1, Pε2, and Pε3 as an example. Among them, R1 and R2 are peak ratios.

[0071] The relationship between the peak ratio and the damping ratio ζ1 can be referred to in the following (2), and the damping ratio ζ1 can also be called the first damping ratio.

[0072] Furthermore, the electronic device can calculate the damping ratio ζ1 based on the ratio of multiple peak values ​​by referring to the following formula (3).

[0073] Then, the damping ratio ζ can be calculated using the least-squares (LS) method. For details, please refer to the following formula (4). ζ1=(H T H) -1 H T z

[0074] in,

[0075] In some embodiments, the back EMF measured by the electronic device includes a DC bias, as shown in Figure 6. Furthermore, the electronic device can first calculate the difference between multiple peak values, then calculate the damping ratio based on the ratio obtained from the difference between the multiple peak values, and then calculate the damping coefficient. In this way, subtracting multiple peak values ​​can eliminate the DC bias in the residual vibration portion, avoiding the problem of DC bias when collecting the back EMF and making the calculation result more accurate.

[0076] Specifically, the electronic device may calculate the difference between multiple peak values ​​by referring to the following formula (5): wherein PPε1 and PPε2 are the differences between two peak values.

[0077] Then, the electronic device calculates the peak difference ratio based on the multiple peak differences. For example, the peak difference ratio of PPε1 and PPε2 can refer to the following formula (6).

[0078] The relationship between the peak difference ratio and the damping ratio ζ2 can be referred to in the following (7). The damping ratio ζ2 can also be called the second damping ratio.

[0079] In other embodiments, the electronic device may measure not only multiple peak values ​​of the residual vibration portion of the first motor but also multiple valley values ​​of the residual vibration portion of the first motor, and calculate the damping ratio and damping coefficient based on the difference between the peak values ​​and the valley values.

[0080] Specifically, the electronic device can calculate the difference between the peak value and the valley value by referring to the following formula (8). Wherein, the peak value and valley value of the first reverse electromotive force are Pε1', Pε2', Pε3'...Pε in order from small to large in time. i '. PPε1' to PPεi' are the differences between the peak and valley values.

[0081] Then, the peak-to-peak ratio is calculated based on the difference between the peak value and the valley value. For details, please refer to the following formula (9): Where R1' to Ri' are multiple peak-to-peak ratios.

[0082] The relationship between the peak-to-peak ratio and the damping ratio ζ3 can be referred to the following formula (10). The damping ratio ζ3 can also be called the third damping ratio.

[0083] Furthermore, the calculation method of the damping ratio of the electronic device based on the peak-to-peak ratio can refer to the following formula (11).

[0084] Then, the damping ratio ζ3 can be calculated using the LS algorithm. For details, please refer to the following formula (12): H·ζ3=z

[0085] in,

[0086] Furthermore, the calculation method of the damping ratio ζ can refer to the following formula (13). ζ3=(H' T H') -1 H' T z' (13)

[0087] In other embodiments, the electronic device may also calculate the difference between the peak value and the valley value by referring to the following formula (14) or the following formula (15):

[0088] Then, according to the above formulas (10) to (12), H can be modified as follows: Then the damping ratio ζ3 can be calculated according to formula (13).

[0089] The following describes how to calculate the damping parameter based on the damping ratio ζ. Due to different damping ratio calculation methods, the resulting damping coefficient is also different, where the damping coefficient can be specifically zeta_coeff_1 or zeta_coeff_2. Specifically, it includes:

[0090] When the damping ratio ζ of an electronic device is calculated based on the peak value, that is, in formulas (1) to (7), and ζ is ζ1 or ζ2, the damping coefficient calculation formula can be specifically referred to as the following formula (16). Here, zeta_coeff_1 is the damping coefficient. When ζ is ζ1, the calculated zeta_coeff_1 can also be called the first damping coefficient, and when ζ is ζ2, the calculated zeta_coeff_1 can also be called the second damping coefficient.

[0091] Furthermore, the electronic device can calculate the first vibration parameter, i.e., the acceleration of the first motor, based on the damping ratio ζ1 or ζ2, the corresponding damping coefficient zeta_coeff_1, the frequency fd1 of the first cycle, and the peak value Pε1. For details, refer to the following formula (17), where amax_level1 is the acceleration.

[0092] When the electronic device calculates the damping ratio ζ based on the peak and valley values, that is, when ζ is ζ3, that is, formulas (8) to (15), the damping coefficient calculation formula can be specifically referred to as the following formula (18). Among them, zeta_coeff_2 is the damping coefficient, which can also be called the third damping coefficient.

[0093] Furthermore, the electronic device can calculate the first vibration parameter based on the damping ratio ζ3, the damping coefficient zeta_coeff_2, the frequency fd1 of the first cycle, and the peak value PPε1'. For details, refer to the following formula (19). Where amax_level1' is the acceleration.

[0094] In some other embodiments, after the electronic device obtains the first vibration parameter, it can also save the first vibration parameter to a memory, and the parameter name after the storage is Sample_amax_level, which can refer to the following formula (20): Sample_amax_level = amax_level1 (20)

[0095] In other embodiments, the motor driving method provided herein may further include comparing the vibration parameter of the first motor with a second vibration parameter, and adjusting the voltage of the first signal based on the ratio of the vibration parameter to the second vibration parameter. For details, see the flowchart shown in FIG7 .

[0096] S710: Acquire a first vibration parameter of the first motor.

[0097] The electronic device may obtain the first vibration parameter of the first motor by referring to the above steps S310 to S320 and formulas (1) to (20).

[0098] S720: Acquire a second vibration parameter of the second motor.

[0099] The second motor can be a standard motor serving as the first motor, and the second motor can be included in the electronic device 300 described above. The excitation signal driving the second motor has a frequency equal to the resonant frequency f0 and a voltage equal to the rated voltage. The electronic device then calculates the vibration parameters of the second motor based on the second back electromotive force of the second motor, which are recorded as second vibration parameters. For details, refer to steps S310 to S330 above and are not further described here.

[0100] After the electronic device obtains the second vibration parameter amax_level2, it can also save the second vibration parameter to the memory. The saved parameter name Golden_amax_level can refer to the following formula (21): Golden_amax_level=amax_level2 (21)

[0101] S730: Determine a proportional coefficient according to the first vibration parameter and the second vibration parameter.

[0102] The electronic device determines the proportional coefficient according to the first vibration parameter and the second vibration parameter, and the formula can refer to the following formula (22).

[0103] S740: Adjust the first signal to a second signal according to the proportional coefficient, the upper threshold value, and the lower threshold value, and use the second signal to drive the first motor to move.

[0104] The electronic device can set an upper threshold and a lower threshold. When the ratio of the first vibration parameter to the second vibration parameter is between the upper threshold and the lower threshold, the first signal is adjusted based on the ratio to obtain the second signal. When the ratio of the first vibration parameter to the second vibration parameter is greater than the upper threshold, the first signal is adjusted based on the upper threshold to obtain the second signal. When the ratio of the first vibration parameter to the second vibration parameter is less than the lower threshold, the first signal is adjusted based on the lower threshold to obtain the second signal.

[0105] Furthermore, the magnitude of the first signal can be adjusted based on the difference between the first and second vibration parameters, ultimately ensuring that the motor's vibration intensity matches that of the second motor. Setting upper and lower thresholds limits the amplitude of each adjustment to the first signal, preventing it from being adjusted too high all at once. This prevents the motor from being damaged by overload due to a sudden increase in the first signal.

[0106] The process of comparing the electronic device's proportional coefficient with the upper and lower thresholds can be referred to in the following code:

[0107] In the above code, Sample_scalecoeff is Sample_amax_scalecoeff, scalecoeff_up is the upper threshold, and scalecoeff_down is the lower threshold.

[0108] Then, the electronic device can adjust the voltage of the first signal according to the comparison result to obtain the voltage of the second signal. For details, please refer to the following formula (23), where Sample_vrms_scale is the voltage of the second signal.

[0109] In this way, the same second vibration parameter can be used to adjust the excitation signal for motors of the same type, so that the excitation signals of different motors can be adjusted according to the same second vibration parameter, so that the vibration parameters of multiple motors are consistent, and the vibration feeling felt by the user is consistent, thereby improving the user's tactile experience.

[0110] In some embodiments, the first vibration parameter and the second vibration parameter may also be speed. That is, by calculating the speeds of the first motor and the second motor, the first signal stimulating the first motor is adjusted so that the vibration parameters of the first motor and the second motor are consistent, and thus the vibration sensation felt by the user is consistent. Specifically, this includes:

[0111] The electronic device first needs to obtain the damping ratio, the corresponding damping coefficient, and the frequency f of the first cycle. d1 and peak value P ε1 , calculate the speed of the first motor.

[0112] In some embodiments, the damping ratio and the damping coefficient are calculated based on the peak value, that is, when the calculation process refers to the above formulas (1) to (7), the electronic device can calculate the damping ratio ζ as ζ1 and ζ2, the damping coefficient zeta_coeff_1, the frequency of the first cycle f d1 and peak value P ε1 The speed of the first motor umax_level1 is calculated. For details, please refer to the following formula (24).

[0113] In other embodiments, the damping ratio and the damping coefficient are calculated based on the peak and valley values. That is, when the calculation process refers to the aforementioned formulas (8) to (15), the electronic device can calculate the speed umax_level1' of the first motor based on the damping ratio ζ being ζ3, the damping coefficient zeta_coeff_2, the frequency fd1 of the first cycle, and the peak value Pε1. For details, please refer to the following formula (25).

[0114] After the electronic device obtains the speed of the first motor, it can also save the speed of the first motor to the memory. The parameter name after saving is Sample_umax_level, which can be referred to as shown in the following formula (26). Sample_umax_level=umax_level1, (26)

[0115] Or Sample_umax_level = umax_level1'

[0116] Then, the electronic device will also calculate the speed of the second motor using the above method. For details, please refer to the above formulas (1) to (7) and (24), or formulas (8) to (15) and (25).

[0117] After the electronic device obtains the speed of the second motor, it can also save the speed of the second motor to the memory. The parameter name Golden_umax_level after saving can refer to the following formula (27).

[0118] Golden_umax_level=umax_level2, or (27) Golden_umax_level=umax_level2'

[0119] The electronic device then determines the proportional coefficient based on the speed of the first motor and the second motor. For details, please refer to the following formula (28).

[0120] Then, the electronic device adjusts the first signal to a second signal based on the scale factor, the upper threshold, and the lower threshold, and uses the second signal to drive the first motor to move. For details, please refer to the aforementioned step S740, where in the above code, Sample_scalecoef is Sample_umax_scalecoeff.

[0121] In other embodiments, the first vibration parameter and the second vibration parameter may also be displacements. That is, by calculating the displacements of the first motor and the second motor, the first signal stimulating the first motor is adjusted so that the vibration parameters of the first motor and the second motor are consistent, and thus the vibration sensation felt by the user is consistent. Specifically, this includes:

[0122] The electronic device first needs to obtain the damping ratio, the corresponding damping coefficient, the frequency fd1 of the first cycle, and the peak value Pε1 to calculate the displacement of the first motor.

[0123] In some embodiments, the damping ratio and the damping coefficient are calculated based on the peak value, that is, when the calculation process refers to the above formulas (1) to (7), the electronic device can calculate the damping ratio ζ as ζ1 and ζ2, the damping coefficient zeta_coeff_1, the frequency of the first cycle f d1 and peak value P ε1 The displacement xmax_level1 of the first motor is calculated. For details, please refer to the following formula (29).

[0124] In other embodiments, the damping ratio and the damping coefficient are calculated based on the peak and valley values. That is, when the calculation process refers to the aforementioned formulas (8) to (15), the electronic device can calculate the displacement umax_level1' of the first motor based on the damping ratio ζ being ζ3, the damping coefficient zeta_coeff_2, the frequency fd1 of the first cycle, and the peak value Pε1. For details, please refer to the following formula (30).

[0125] After the electronic device obtains the displacement of the first motor, it can also save the displacement of the first motor to the memory. The parameter name after saving is Sample_xmax_level, which can be referred to as shown in the following formula (31). Sample_xmax_level=xmax_level1, (31)

[0126] Or Sample_xmax_level = xmax_level1'

[0127] Then, the electronic device will also calculate the displacement of the second motor using the above method. For details, please refer to the previous formulas (1) to (7) and (29), or formulas (8) to (15) and (30).

[0128] After the electronic device obtains the displacement of the second motor, it can also save the displacement of the second motor into the memory. The parameter name Golden_xmax_level after saving can refer to the following formula (32).

[0129] Golden_xmax_level=xmax_level2, or (32) Golden_xmax_level=xmax_level2'

[0130] The electronic device then determines the proportional coefficient based on the displacement of the first motor and the second motor. For details, please refer to the following formula (33).

[0131] Then, the electronic device adjusts the first signal to a second signal based on the scale factor, the upper threshold, and the lower threshold, and uses the second signal to drive the first motor to move. For details, please refer to the aforementioned step S740, where in the above code, Sample_scalecoef is Sample_xmax_scalecoeff.

[0132] That is to say, the first vibration parameter and the second vibration parameter can also be acceleration, velocity, and displacement. By calculating the acceleration, velocity, or displacement of the first motor and the second motor, the signal that excites the first motor is adjusted so that the vibration sensations of the first motor and the second motor are consistent.

[0133] It should be understood that the electronic device can also adjust the first signal through multiple parameters in the acceleration, speed and displacement of the first motor and the second motor. For example, the proportional coefficients corresponding to the acceleration and speed are first calculated respectively, and then the proportional coefficients of the acceleration and the speed are averaged to adjust the voltage of the first signal.

[0134] The following describes a motor drive system provided by an embodiment of the present application. As shown in FIG8 , the motor drive system includes an electronic device 200 , which includes a driver chip 210 and a first motor 220 . The driver chip 210 includes an excitation unit 211 , an acquisition unit 212 , and an adjustment unit 213 .

[0135] The excitation unit 211 is configured to generate a first signal having a resonant frequency f0 to the first motor 220. The acquisition unit 212 then acquires the back electromotive force (BEMF) of the residual vibration generated by the first motor 220 after the first signal excitation, including the multiple peaks of the residual vibration and the frequency of the first cycle. The method described in step S310 is specifically performed and will not be further described here.

[0136] Adjustment unit 213 then calculates vibration parameters based on the back electromotive force and determines the voltage of the adjusted first signal based on the vibration parameters to generate a second signal. Finally, excitation unit 211 applies the second signal to first motor 220. The specific implementation of steps S320 through S330 is omitted here.

[0137] In some embodiments, the motor drive system may further include an electronic device 300 . As shown in FIG9 , the electronic device 300 includes a driver chip 210 and a second motor 320 . The driver chip 310 includes an excitation unit 311 , an acquisition unit 312 , and a calculation unit 313 .

[0138] The excitation unit 311 of the electronic device 300 drives the second motor 320 using an excitation signal. The excitation signal has a frequency of the resonant frequency f0 and a voltage of the rated voltage. The acquisition unit 312 obtains the back electromotive force of the second motor 320. The calculation unit 313 determines the second vibration parameter (standard parameter) of the second motor 320 based on the back electromotive force. The second vibration parameter is then transmitted to the driver chip 210 of the electronic device 200.

[0139] The electronic device 200 may determine a ratio of the first vibration parameter to the second vibration parameter based on the stored second vibration parameter and the first vibration parameter, and adjust the first signal based on the ratio.

[0140] In some embodiments, the electronic device 200 and the electronic device 300 may also be the same electronic device, that is, the electronic device has both the first motor and the second motor.

[0141] In summary, through the motor drive system provided by the present application, the electronic device can obtain the vibration parameters of the motor by obtaining the reverse electromotive force of the motor, without the need for additional sensors to obtain the vibration parameters, thus saving hardware costs. The electronic device adjusts the voltage of the excitation signal by measuring the vibration parameters, and thus can adjust the vibration intensity of the first motor when it is working in a steady state. For motors of the same type, the same second vibration parameter can also be used to adjust the excitation signal, so that the excitation signals of different motors can be adjusted according to the same second vibration parameter, so that the vibration parameters of multiple motors are consistent, and the vibration sense felt by the user is consistent, thereby improving the user's tactile experience.

[0142] By using the motor driving method provided in the embodiments of the present application on different motors and comparing it with the method not provided in the embodiments of the present application, the simulation performance gains of different motors were obtained to be 95% to 99%. The laboratory conducted actual measurement verification on the 0809 model motor, and its performance gain was also above 80%, which is consistent with the expectations of the invention.

[0143] As can be seen, the motor drive method provided by this application minimizes the error between the motor's vibration parameters and the standard parameters. Furthermore, the vibration parameters of multiple motors in steady state are nearly identical, resulting in consistent vibration intensity and a consistent vibration sensation felt by the user, enhancing the user's tactile experience.

[0144] The present application also provides a chip in an embodiment, which may be the aforementioned driver chip 310 or driver chip 210. The chip may be used to execute the other steps described in the embodiment of FIG3 or FIG7, which will not be described in detail here.

[0145] The structure of the electronic device 1100 in this embodiment is described below. As shown in FIG10 , the electronic device 1100 includes a processor 1110 , a communication interface 1120 , and a memory 1130 . The processor 1110 , the communication interface 1120 , and the memory 1130 are interconnected via an internal bus 1140 .

[0146] The processor 1110, the communication interface 1120, and the memory 1130 can be connected via a bus, or can communicate via other means such as wireless transmission. The embodiment of the present application takes the connection via bus 1140 as an example, wherein the bus 1140 can be a peripheral component interconnect (PCI) bus. The bus 1140 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in Figure 10, but this does not mean that there is only one bus or one type of bus.

[0147] The processor 1110 may be specifically the processor in the aforementioned driver chip 310 or driver chip 210. The processor 1110 may be composed of one or more general-purpose processors, such as a central processing unit (CPU), or a combination of a CPU and a hardware chip. The processor 1110 executes various types of digitally stored instructions, such as software or firmware programs stored in the memory 1130, enabling the electronic device 1100 to provide a wide variety of services.

[0148] Memory 1130 may include volatile memory, such as random access memory (RAM); memory 1130 may also include non-volatile memory, such as read-only memory (ROM) or a solid-state drive (SSD); memory 1130 may also include a combination of the above. Memory 1130 may store application code and program data. The program code can be used to execute the other steps described in the embodiments of Figures 3 or 7, which will not be repeated here.

[0149] The communication interface 1120 can be a wired interface (such as an Ethernet interface), an internal interface (such as a high-speed serial computer expansion bus (Peripheral Component Interconnect Express, PCIe), a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or a wireless local area network interface) for communicating with other devices or modules.

[0150] It should be noted that Figure 10 is only one possible implementation of an embodiment of the present application. In actual applications, the electronic device may also include more or fewer components, which is not limited here. For content not shown or described in the embodiments of the present application, please refer to the relevant explanations in the embodiments described in Figures 3 or 7 above, which will not be repeated here. The electronic device shown in Figure 10 may also be a computer cluster consisting of multiple computing nodes, which is not specifically limited in this application.

[0151] An embodiment of the present application further provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is executed on a processor, the method flow shown in FIG. 3 or FIG. 7 is implemented.

[0152] An embodiment of the present application further provides a computer program product. When the computer program product is run on a processor, the method flow shown in FIG. 3 or FIG. 7 is implemented.

[0153] The various embodiments in this specification are described in a progressive, parallel, or progressive and parallel manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referenced to each other.

[0154] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such article or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the article or device comprising the aforementioned elements.

[0155] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A motor driving method, characterized in that: Applied to a first electronic device, the first electronic device includes a first motor, and the method includes: Acquire a first reverse electromotive force generated by residual vibration after the first motor is driven to move by a first signal; calculating, according to the first back electromotive force, a first vibration parameter generated by the first motor during a driving process of the first signal; The first signal is adjusted to a second signal based on the first vibration parameter, and the second signal is used to drive the first motor to move.

2. The method according to claim 1, characterized in that: The first vibration parameter includes one or more of displacement, velocity and acceleration.

3. The method according to claim 2, characterized in that The first back electromotive force includes a frequency of a first cycle and peak values ​​of a plurality of cycles, wherein the peak values ​​of the plurality of cycles include a peak value of the first cycle; The step of calculating, according to the first back electromotive force, a first vibration parameter generated by the first motor during the driving process of the first signal comprises: determining a damping parameter of the first motor according to peak values ​​of the plurality of cycles; The first vibration parameter is calculated according to the damping parameter, the peak value and the frequency of the first period.

4. The method according to claim 3, characterized in that The damping parameters include a first damping ratio and a first damping coefficient, and determining the damping parameters of the first motor according to the peak values ​​of the multiple cycles includes: Calculating the ratio between adjacent peak values ​​according to the plurality of peak values; Calculating the first damping ratio according to the ratio between the adjacent peak values; A first damping coefficient of the first motor is calculated according to the first damping ratio.

5. The method according to claim 3, characterized in that: The damping parameters include a second damping ratio and a second damping coefficient, and determining the damping parameters of the first motor according to the peak values ​​of the multiple cycles includes: Determining a ratio between the differences between the plurality of adjacent peak values ​​according to the differences between the plurality of adjacent peak values; Calculating the second damping ratio according to a ratio between differences between the plurality of adjacent peak values; A second damping coefficient of the first motor is determined according to the second damping ratio.

6. The method according to claim 3, characterized in that The back electromotive force further includes a plurality of valley values, and the damping parameters include a third damping ratio and a third damping coefficient. Determining the damping parameter of the first motor according to the peak values ​​of the multiple cycles includes: Calculate the ratio between the differences between the multiple valley values ​​and the peak values ​​according to the differences between the adjacent valley values ​​and the peak values; determining the third damping ratio according to a ratio between differences between the plurality of valley values ​​and peak values; A third damping coefficient of the first motor is determined according to the third damping ratio.

7. The method according to claim 1, characterized in that The method further comprises: Acquire a second vibration parameter, where the second vibration parameter is calculated based on a second back electromotive force generated by residual vibration after the second motor is driven to move by the first signal; The first signal is adjusted to the second signal based on the second vibration parameter and the first vibration parameter.

8. The method according to claim 7, characterized in that The adjusting the first signal to the second signal based on the second vibration parameter and the first vibration parameter includes: corresponding to a ratio of the first vibration parameter to the second vibration parameter being greater than an upper threshold, adjusting the first signal to the second signal according to the upper threshold; corresponding to a ratio of the first vibration parameter to the second vibration parameter being less than or equal to a lower threshold, adjusting the first signal to the second signal according to the lower threshold; Corresponding to the ratio of the first vibration parameter to the second vibration parameter being greater than the lower threshold and less than or equal to the upper threshold, the first signal is adjusted to the second signal according to the ratio of the first vibration parameter to the second vibration parameter.

9. An electronic device, characterized in that: including a driving chip and a first motor; The driver chip is used for: obtaining a first back electromotive force generated by residual vibration after the first motor is driven to move by the first signal, and calculating a first vibration parameter generated by the first motor during the driving process of the first signal according to the first back electromotive force, and It is also used to adjust the first signal into a second signal based on the first vibration parameter, and use the second signal to drive the first motor to move.

10. A driver chip, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store instructions, and the processor is used to execute the instructions. When the processor executes the instructions, the method according to any one of claims 1 to 8 is executed.

11. A computer-readable storage medium, characterized in that: The method comprises instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 8.