Motor driving method, chip, electronic device and storage medium
By constructing the relationship curve between the acceleration compensation coefficient and the operating frequency and calculating the temperature compensation gain, the vibration consistency problem of the linear motor under temperature changes was solved, ensuring the consistency of the user's tactile experience.
Patent Information
- Application Number
- CN202511314056.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2026-01-06
AI Technical Summary
The resonant frequency of a linear motor shifts with temperature changes, resulting in poor vibration consistency and affecting the consistency of the user's tactile experience.
By obtaining the measured resistance and resonant frequency of the motor at the current temperature, a curve showing the relationship between the acceleration compensation coefficient and the operating frequency is constructed. The temperature compensation gain is calculated, and the drive voltage is adjusted to achieve vibration consistency.
To ensure consistency in motor acceleration amplitude at different temperatures, thus guaranteeing a consistent tactile experience for users.
Smart Images

Figure CN121283307A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a motor driving method, chip, electronic device and storage medium. Background Technology
[0002] A linear motor, also known as a linear energy source, is a transmission device that converts electrical energy into mechanical energy in the form of "linear motion." Linear motors are widely used in electronic devices such as mobile phones, game controllers, and virtual reality devices. In human-computer interaction environments, linear motors generate vibrations to provide tactile feedback, transmitting mechanical energy to the user's fingers or other contact points to simulate realistic tactile sensations.
[0003] Linear motors have a specific resonant frequency. Using this specific resonant frequency as the drive signal frequency enables the linear motor to achieve relatively ideal working efficiency. As the linear motor operates over time, the performance of its components may change, or external environmental factors such as temperature and humidity may change, causing the resonant frequency of the linear motor to change. This results in poor consistency of the linear motor's vibration, which in turn affects the consistency of the user's tactile experience. Summary of the Invention
[0004] In view of the above problems, embodiments of this application provide a motor driving method, chip, electronic device and storage medium to solve the above-mentioned technical problems that are not conducive to improving vibration consistency at different temperatures.
[0005] In a first aspect, embodiments of this application provide a motor driving method applied to a motor driving chip, the motor driving method comprising:
[0006] Obtain the current measured resistance of the motor at the current temperature and the current standard resonant frequency of the motor at the current temperature and the motor's standard operating voltage;
[0007] The relationship curve between the acceleration compensation coefficient and the operating frequency of the motor at the current temperature is obtained based on the motor's acceleration frequency response curve and the current standard resonant frequency.
[0008] The method obtains the temperature compensation gain of the motor at the current temperature based on the relationship curve between the acceleration compensation coefficient and the operating frequency, as well as the current measuring resistor.
[0009] Secondly, embodiments of this application provide a chip, the chip including a control module, the control module being used to implement the above-described motor driving method.
[0010] Thirdly, embodiments of this application provide an electronic device, which includes the aforementioned chip.
[0011] Fourthly, embodiments of this application provide a computer-readable storage medium storing program instructions that, when executed by a processor, can implement the aforementioned motor driving method.
[0012] The motor driving method, chip, electronic device, and storage medium provided in this application embodiment obtain the current measured resistance of the motor at the current temperature and the current standard resonant frequency of the motor at the current temperature and the motor's standard operating voltage; obtain the relationship curve between the acceleration compensation coefficient and the operating frequency of the motor at the current temperature based on the motor's acceleration frequency response curve and the current standard resonant frequency; obtain the temperature compensation gain of the motor at the current temperature based on the relationship curve between the acceleration compensation coefficient and the operating frequency and the current measured resistance; through the above method, the relationship curve between the acceleration compensation coefficient and the operating frequency at the current temperature is constructed, and the temperature compensation gain at the current temperature is obtained, so that the acceleration amplitude of the driven motor is more consistent at different temperatures, achieving vibration consistency at different temperatures, thereby ensuring the consistency of the user's tactile experience.
[0013] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0014] Figure 1 A schematic flowchart of the motor driving method provided in an embodiment of this application is shown.
[0015] Figure 2 An example graph showing the relationship between the acceleration compensation coefficient and the operating frequency in the motor drive method provided in this application embodiment is shown.
[0016] Figure 3 A schematic diagram of the chip structure provided in an embodiment of this application is shown.
[0017] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown.
[0018] Figure 5 A schematic diagram of the structure of the storage medium provided in an embodiment of this application is shown. Detailed Implementation
[0019] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0020] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0021] In the embodiments of this application, it should be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0022] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0023] In the description of the embodiments of this application, the words "example" or "for example" are used to indicate exemplification, illustration, or description. Any embodiment or design described as "example" or "for example" in the embodiments of this application is not to be construed as being more preferred or having more advantages than another embodiment or design. The use of the words "example" or "for example" is intended to present relative concepts in a clear manner.
[0024] Furthermore, in the embodiments of this application, "multiple" refers to two or more. Therefore, in the embodiments of this application, "multiple" can also be understood as "at least two". "At least one" can be understood as one or more, such as one, two, or more. For example, including at least one means including one, two, or more, and is not limited to which ones are included. For example, including at least one of A, B, and C, then it could include A, B, C, A and B, A and C, B and C, or A and B and C.
[0025] It should be noted that in the embodiments of this application, "and / or" describes the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects before and after it are in an "or" relationship.
[0026] It should be noted that in the embodiments of this application, "connection" can be understood as electrical connection. The connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components.
[0027] In this article, the term "nominal resistance" refers to the DC resistance of the motor coil, typically measured at room temperature (e.g., 25°C). It is an important electrical parameter of the motor, used to calculate drive current and power.
[0028] In this article, the term "H-bridge on-resistance" refers to the sum of the resistances between the drain and source of the two diagonal MOSFETs (metal-oxide-semiconductor field-effect transistors) in an H-bridge circuit when they are in the on-state. For example, in the drive circuit of a linear motor, an H-bridge typically consists of four MOSFETs, divided into high-side (high-end) and low-side (low-end) MOSFETs.
[0029] In this article, the term "acceleration frequency response curve" refers to the curve showing the change in the amplitude of the oscillator acceleration of a linear motor with the driving frequency under constant voltage (or constant current) excitation. The acceleration frequency response curve is the core characterization of the vibration performance of a linear motor, directly determining the "strength, speed, and clarity" of tactile feedback.
[0030] One embodiment of this application provides a motor driving method that can be applied to a motor driver chip. For example, this motor driver chip can be installed in an electronic device having a linear motor. (See also...) Figure 1 As shown, the motor driving method includes the following steps S11 to S13:
[0031] Step S11: Obtain the current measured resistance of the motor at the current temperature and the current standard resonant frequency of the motor at the current temperature and the motor's standard operating voltage.
[0032] In this process, the temperature can be measured during the operation of the electronic device to obtain the current temperature. The motor can then be vibrated under its standard operating voltage, and the resonant frequency of the motor can be detected to obtain the current standard resonant frequency. For example, the current standard resonant frequency can be obtained through direct resonant frequency testing techniques (such as the residual vibration method or frequency sweep method) or indirect resonant frequency testing techniques. The standard operating voltage of the motor can be the operating voltage determined at the factory.
[0033] Step S12: Obtain the relationship curve between the acceleration compensation coefficient and the operating frequency of the motor at the current temperature based on the motor's acceleration frequency response curve and the current standard resonant frequency.
[0034] The curve showing the relationship between the acceleration compensation coefficient at the current temperature and the operating frequency is used to characterize how the acceleration compensation coefficient changes with the operating frequency at the current temperature.
[0035] Step S13: Obtain the temperature compensation gain of the motor at the current temperature based on the relationship curve between the acceleration compensation coefficient and the operating frequency and the current measured resistance.
[0036] Specifically, the motor's drive voltage can be adjusted based on the calculated temperature compensation gain at the current temperature. The motor is then driven to vibrate based on the drive signal generated by the adjusted drive voltage, so that the motor can achieve a more ideal working efficiency at the current temperature.
[0037] In this embodiment, by constructing the relationship curve between the acceleration compensation coefficient and the operating frequency at the current temperature and obtaining the temperature compensation gain at the current temperature, the acceleration amplitude of the drive motor is made more consistent at different temperatures, thus achieving vibration consistency at different temperatures and ensuring the consistency of the user's tactile experience.
[0038] As one implementation method, step S12 specifically includes the following steps:
[0039] Step S21: Normalize the acceleration frequency response curve of the motor to obtain the normalized acceleration compensation coefficient curve.
[0040] Specifically, the vertical and horizontal axes of the acceleration frequency response curve can be normalized. In particular, in the acceleration frequency response curve Acc(f1), the peak value of the oscillator acceleration amplitude of the linear motor is Acc. max Acc max The corresponding driving frequency is f0; the oscillator acceleration amplitude (vertical axis) of each linear motor in the acceleration frequency response curve Acc(f1) can be divided by Acc. max ,get This implements normalization of the ordinate of the acceleration frequency response curve; it can be achieved by dividing each driving frequency (horizontal axis) in the acceleration frequency response curve Acc(f1) by f0 to obtain... Normalize the abscissa of the acceleration frequency response curve; then use As the x-axis, with Plot the normalized acceleration compensation coefficient curve Acc with the vertical axis as the ordinate. norm (f2).
[0041] Step S22: Obtain the relationship curve between the acceleration compensation coefficient and the operating frequency of the motor at the current temperature based on the normalized acceleration compensation coefficient curve and the current standard resonant frequency.
[0042] Among them, the normalized acceleration compensation coefficient curve Acc can be adjusted. norm(f2) Taking the reciprocal, we obtain the normalized acceleration compensation coefficient curve. Then normalize the acceleration compensation coefficient curve K norm The horizontal axis in (f2) is multiplied by the current standard resonant frequency f0(T), that is, Plot the curve K(f) of the acceleration compensation coefficient versus the operating frequency, with f = f2 * f0(T) as the ordinate and f = f2 * f0(T) as the abscissa. For an example, please refer to [link to example]. Figure 2 The figure shows an example of the relationship curve K(f) between the acceleration compensation coefficient and the operating frequency. The acceleration compensation coefficient K(f) can be determined by the operating frequency f.
[0043] In this embodiment, the acceleration frequency response curve of the motor is normalized, and the reciprocal of the obtained normalized acceleration compensation coefficient curve is taken. Finally, the relationship curve between the acceleration compensation coefficient and the operating frequency at the current temperature is obtained based on the normalized acceleration compensation coefficient curve obtained by taking the reciprocal and the current standard resonant frequency obtained in step S11. This relationship curve is related to both the vibration acceleration amplitude and the current temperature. In the subsequent calculation of the temperature compensation gain, the accuracy of the temperature compensation gain calculation at the current temperature can be improved.
[0044] As one implementation method, step S13 specifically includes the following steps:
[0045] Step S32: Calculate the amplitude offset value of the motor at the current target operating frequency based on the relationship curve between the acceleration compensation coefficient and the operating frequency, the current measured resistance, and the current target operating frequency.
[0046] The current target operating frequency is, for example, obtained based on the motor's preset operating frequency.
[0047] Step S33: Calculate the motor compensation gain value at the current target operating frequency based on the relationship curve between the acceleration compensation coefficient and the operating frequency, the current target operating frequency, and the amplitude offset value at the current target operating frequency.
[0048] Step S36: Determine the temperature compensation gain of the motor at the current temperature based on the compensation gain value of the motor at the current target operating frequency.
[0049] The preset operating frequency of a motor can be related to its resonant frequency. Generally, the preset operating frequency of a motor is near its resonant frequency to achieve maximum vibration output and energy efficiency.
[0050] In some implementations, the temperature compensation gain of the motor at the current temperature can be obtained based on a preset compensation algorithm, according to the relationship curve between the acceleration compensation coefficient and the operating frequency, and the currently measured resistance. This preset compensation algorithm is used to calculate the temperature compensation gain at the current temperature. The preset compensation algorithm includes an amplitude offset value calculation model, a compensation gain value calculation model, and a resonant frequency compensation coefficient calculation model. The preset compensation algorithm can perform iterative calculations based on an initial target operating frequency.
[0051] In step S32, the amplitude offset value of the motor at the current target operating frequency is calculated based on the relationship curve between the acceleration compensation coefficient and the operating frequency, the current measured resistance, the current target operating frequency, the nominal resistance of the motor, the H-bridge operating voltage of the motor driver chip, and the H-bridge on-resistance of the motor driver chip, according to the amplitude offset value calculation model.
[0052] In step S33, the compensation gain value of the motor at the current target operating frequency is calculated based on the relationship curve between the acceleration compensation coefficient and the operating frequency, the current target operating frequency, the amplitude offset value at the current target operating frequency, and the preset operating waveform amplitude, according to the compensation gain value calculation model.
[0053] The following steps are included after step S33:
[0054] Step S34: Calculate the resonant frequency compensation coefficient based on the compensation gain value at the current target operating frequency, the standard operating voltage of the motor, and the preset operating waveform amplitude according to the resonant frequency compensation coefficient calculation model.
[0055] Step S35: Calculate the next target operating frequency based on the resonant frequency compensation coefficient at the current target operating frequency and the current target operating frequency.
[0056] Repeat steps S32 to S35 until the number of iterations is the preset number of iterations.
[0057] In other words, step S13 can specifically include the following steps:
[0058] Step S31: Obtain the initial target operating frequency of the motor at the current temperature.
[0059] For example, the preset operating frequency of the motor can be used as the initial target operating frequency at the current temperature, that is, in the first iteration calculation, the current target operating frequency is the initial target operating frequency.
[0060] Step S32: Calculate the amplitude offset value of the motor at the current target operating frequency based on the relationship curve between the acceleration compensation coefficient and the operating frequency, the current measured resistance, the current target operating frequency, the nominal resistance of the motor, the H-bridge operating voltage of the motor driver chip, and the H-bridge on-resistance of the motor driver chip.
[0061] Specifically, the acceleration compensation coefficient can be obtained from the relationship curve between the current target operating frequency and the acceleration compensation coefficient. Then, the amplitude offset value of the motor at the current target operating frequency can be calculated based on the current measured resistance, the acceleration compensation coefficient at the current target operating frequency, the nominal resistance of the motor, and the H-bridge conduction resistance of the motor driver chip.
[0062] Specifically, when obtaining the acceleration compensation coefficient, if the current target operating frequency is located at... Figure 2 Outside the frequency range shown (140Hz~200Hz), the corresponding acceleration compensation coefficients can be obtained using linear extrapolation. For example, if the current target operating frequency is 210Hz, the acceleration compensation coefficients can be obtained based on linear extrapolation. Figure 2 Calculate the acceleration compensation coefficients for data points A and B shown in the figure.
[0063] Specifically, when obtaining the acceleration compensation coefficient, if the current target operating frequency is located at... Figure 2 When there are no directly corresponding data points within the indicated frequency range (140Hz~200Hz), linear interpolation can be used to calculate the corresponding acceleration compensation coefficient based on the adjacent data points to the left and right of the current target operating frequency. For example, if the current target operating frequency is 159Hz, the acceleration compensation coefficient can be calculated based on the linear interpolation method. Figure 2 Calculate the acceleration compensation coefficients for data points C and D shown in the figure.
[0064] For example, the amplitude offset value calculation model is as follows: Among them, Amp offset (f n R represents the amplitude offset value at the current target operating frequency. T For the current measured resistance, R ds-on R is the on-resistance of the H-bridge of the motor driver chip. norm The nominal resistance of the motor, AV offset V is the voltage amplitude offset constant. BST f is the operating voltage of the H-bridge of the motor driver chip. n For the current target operating frequency, K(f) n ) represents the acceleration compensation coefficient at the current target operating frequency, n represents the current iteration number, and K(f) represents the relationship curve between the acceleration compensation coefficient and the operating frequency at the current temperature.
[0065] Among them, the voltage amplitude offset constant AV offset It can be set based on empirical values, or it can be obtained by training a preset compensation algorithm with a large number of data samples.
[0066] In this step, when constructing the amplitude offset calculation model, the current measured resistance, the acceleration compensation coefficient at the current target operating frequency, the nominal resistance of the motor, and the H-bridge on-resistance of the motor driver chip are included in the calculation of the amplitude offset value at the current target operating frequency, which can improve the calculation accuracy of the temperature compensation gain at the current temperature.
[0067] Step S33: Based on the compensation gain value calculation model, calculate the motor's compensation gain value at the current target operating frequency according to the relationship curve between acceleration compensation coefficient and operating frequency, the current target operating frequency, the amplitude offset value at the current target operating frequency, and the preset operating waveform amplitude.
[0068] Specifically, the acceleration compensation coefficient can be obtained based on the relationship curve between the current target operating frequency and the acceleration compensation coefficient, and the maximum value of the preset operating waveform amplitude and the acceleration compensation coefficient can be obtained. For example, the maximum value of the acceleration compensation coefficient within a preset frequency range can be obtained. The preset frequency range can be, for example, [missing information - likely a range of frequencies]. Figure 2 The frequency range shown is 140Hz to 200Hz, or, for example, a preset frequency range. Figure 2 The frequency range is 150Hz to 180Hz. Then, based on the acceleration compensation coefficient at the current target operating frequency, the amplitude offset value at the current target operating frequency, the maximum value of the obtained acceleration compensation coefficient, and the obtained waveform amplitude, the compensation gain value of the motor at the current target operating frequency is calculated.
[0069] For example, the compensation gain value calculation model is as follows: Among them, Gain(f n ) represents the compensation gain value at the current target operating frequency, Amp represents the preset operating waveform amplitude, Amp0 represents the waveform amplitude constant, and Amp offset (f n f is the amplitude offset value at the current target operating frequency. n For the current target operating frequency, K(f) n K(f) represents the acceleration compensation coefficient at the current target operating frequency, n represents the current iteration number, and K(f) represents the relationship curve between the acceleration compensation coefficient and the operating frequency at the current temperature. max This refers to the maximum value of the acceleration compensation coefficient in the curve showing the relationship between the acceleration compensation coefficient and the operating frequency within the preset frequency range.
[0070] Among them, the waveform amplitude constant Amp0 is generally the maximum value within the range of waveform data bit width.
[0071] In this step, when constructing the compensation gain calculation model, the maximum value of the acceleration compensation coefficient in the curve of the relationship between the preset working waveform amplitude, the current target working frequency, and the working frequency within the preset frequency range is used to calculate the compensation gain value at the current target working frequency, which can improve the accuracy of the temperature compensation gain calculation at the current temperature.
[0072] Step S34: Calculate the resonant frequency compensation coefficient based on the compensation gain value at the current target operating frequency, the standard operating voltage of the motor, and the preset operating waveform amplitude according to the resonant frequency compensation coefficient calculation model.
[0073] For example, the resonant frequency compensation coefficient calculation model is as follows: Wherein Kr(f n Gain(f) is the resonant frequency compensation coefficient at the current target operating frequency. n V represents the compensation gain value at the current target operating frequency. norm The standard operating voltage of the motor is given, Amp is the preset operating waveform amplitude, and Gain(f) is the voltage at which the motor operates. n ) represents the compensation gain value at the current target operating frequency, Amp0 is the waveform amplitude constant, and V b V is the associated offset voltage constant of the resonant frequency coefficient, Gain0 is the preset gain constant, and V BST f is the operating voltage of the H-bridge of the motor driver chip. n is the current target operating frequency, and n is the current iteration number.
[0074] Among them, the waveform amplitude constant Amp0 is generally the maximum value within the range of waveform data bit width.
[0075] Among them, the associated offset voltage constant V of the resonant frequency coefficient b It can be set based on empirical values, or it can be obtained by training a preset compensation algorithm with a large number of data samples.
[0076] In this step, when constructing the resonant frequency compensation coefficient calculation model, the relationship curve between the motor's standard operating voltage and acceleration compensation coefficient and operating frequency is included in the calculation of the resonant frequency compensation coefficient at the current target operating frequency, which can improve the calculation accuracy of the temperature compensation gain at the current temperature.
[0077] Step S35: Calculate the next target operating frequency based on the resonant frequency compensation coefficient at the current target operating frequency and the current target operating frequency.
[0078] Among these, the product of the resonant frequency compensation coefficient at the current target operating frequency and the current target operating frequency can be used as the next target operating frequency, i.e., f. n+1 =Kr(f n )*f n , where f n+1 For the next target operating frequency, f n For the current target operating frequency, Kr(f) n ) represents the resonant frequency compensation coefficient at the current target operating frequency.
[0079] Repeat steps S32 to S35 until the number of iterations is the preset number of iterations. The preset number of iterations is greater than or equal to 1, and the first current target working frequency is the initial target working frequency.
[0080] Step S36: Use the last compensation gain value as the temperature compensation gain of the motor at the current temperature.
[0081] Specifically, steps S32 to S35 are repeated for the (n+1)th iteration until the number of iterations is the preset number of iterations. The compensation gain value calculated in the last iteration is used as the temperature compensation gain of the motor at the current temperature.
[0082] In this embodiment, a preset compensation algorithm is constructed and the temperature compensation gain at the current temperature is obtained through iterative calculation, which can improve the calculation accuracy of the temperature compensation gain at the current temperature.
[0083] In one implementation, after step S13, the following steps are also included:
[0084] Step S41: Correct the temperature compensation gain at the current temperature and obtain the target temperature compensation gain at the current temperature.
[0085] Among these, the temperature compensation gain can be modified according to the relationship between temperature and driving gain, so that the target temperature compensation gain is more suitable for the current temperature.
[0086] Step S42: Adjust the motor drive voltage according to the target temperature compensation gain, and drive the motor to vibrate according to the drive signal generated by the adjusted drive voltage.
[0087] In this embodiment, by correcting the temperature compensation gain, the acceleration amplitude of the drive motor is made more consistent at different temperatures, thus achieving vibration consistency at different temperatures and ensuring the consistency of the user's tactile experience.
[0088] In some implementations, step S41 may specifically include the following steps:
[0089] Step S51: Based on the target temperature compensation gain calculation model, calculate the target temperature compensation gain at the current temperature according to the current measured resistance, the nominal resistance of the motor, the H-bridge on-resistance of the motor driver chip, and the temperature compensation gain at the current temperature.
[0090] The target temperature compensation gain calculation model is constructed based on the relationship between the motor's resistance, drive gain, and temperature, assuming the same resonant frequency. During the pre-shipment testing of electronic equipment, the drive gain required for the motor to achieve the same resonant frequency at different temperatures can be calculated. Based on the calculation results, the relationship between the motor's resistance, drive gain, and temperature can be obtained, thereby constructing the target temperature compensation gain calculation model. At least one preset parameter in the target temperature compensation gain calculation model is related to both the preset standard temperature and the motor model.
[0091] For example, the target temperature compensation gain calculation model is as follows: △T is the temperature difference between the current temperature T and the preset standard temperature T0, and Gain is the target temperature compensation gain at the current temperature. Gain(f n R represents the compensation gain value at the current target operating frequency. T For the current measured resistance, R ds-on R is the on-resistance of the H-bridge of the motor driver chip. norm K is the nominal resistance of the motor, and K5 is the preset standard temperature correlation constant.
[0092] Among them, the preset standard temperature correlation constant K5 is related to the preset standard temperature T0. The preset standard temperature correlation constant K5 can be set by empirical value, or it can be set according to the test data generated during the test process.
[0093] In this embodiment, when constructing the target temperature compensation gain calculation model, the current temperature, the current measured resistance, the H-bridge on-resistance of the motor driver chip, and the nominal resistance of the motor are included in the calculation of the target temperature compensation gain at the current temperature, which can improve the calculation accuracy of the target temperature compensation gain at the current temperature.
[0094] One embodiment of this application provides a chip 300; please refer to [link / reference]. Figure 3 As shown, the chip 300 includes a control module, which is used to implement the motor drive method described above.
[0095] A chip (Integrated Circuit, IC) is also called a chip. The chip can be, but is not limited to, a System-on-Chip (SoC) chip or a System-in-Package (SIP) chip.
[0096] The chip in this embodiment constructs a curve showing the relationship between the acceleration compensation coefficient and the operating frequency at the current temperature, and obtains the temperature compensation gain at the current temperature. This makes the acceleration amplitude of the drive motor more consistent at different temperatures, achieving vibration consistency at different temperatures, and thus ensuring the consistency of the user's tactile experience.
[0097] This application also provides an electronic device 400, please refer to... Figure 4 As shown, the electronic device 400 includes a device body and a chip 300 as described above disposed within the device body. The electronic device can be, but is not limited to, a weight scale, body fat scale, nutrition scale, pulse oximeter, body composition analyzer, display, USB (Universal Serial Bus) docking station, automobile, smart wearable device, mobile terminal, smart home device, and virtual reality device. Virtual reality devices can be AR glasses, and smart wearable devices include, but are not limited to, smartwatches, smart bracelets, and neck massagers. Mobile terminals include, but are not limited to, smartphones, laptops, tablets, and POS (point of sales terminal) machines. Smart home devices include, but are not limited to, smart sockets, smart rice cookers, smart robot vacuums, and smart lights.
[0098] The electronic device in this embodiment obtains the temperature compensation gain at the current temperature by constructing the relationship curve between the acceleration compensation coefficient and the operating frequency at the current temperature. This makes the acceleration amplitude of the drive motor more consistent at different temperatures, achieving vibration consistency at different temperatures, and thus ensuring the consistency of the user's tactile experience.
[0099] See Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer-readable storage medium 50 according to an embodiment of this application. The storage medium 50 of this embodiment stores program instructions 51 capable of implementing all the methods described above. The storage medium can be non-volatile or volatile. The program instructions 51 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.
[0100] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0101] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0102] The above description is merely an embodiment of this application. It should be noted that those skilled in the art can make improvements without departing from the inventive concept of this application, but these improvements all fall within the protection scope of this application.
Claims
1. A method of driving a motor, characterized by, The motor driving method is applied to a motor driving chip, and the motor driving method comprises the following steps: obtaining a current measured resistance of the motor at a current temperature and a current standard resonant frequency of the motor at the current temperature and a standard working voltage of the motor; obtaining an acceleration compensation coefficient and working frequency relationship curve of the motor at the current temperature according to an acceleration frequency response curve of the motor and the current standard resonant frequency; obtaining a temperature compensation gain of the motor at the current temperature according to the acceleration compensation coefficient and working frequency relationship curve and the current measured resistance.
2. The motor drive method according to claim 1, characterized by, The acceleration compensation coefficient and working frequency relationship curve of the motor at the current temperature is obtained according to the acceleration frequency response curve of the motor and the current standard resonant frequency, and the acceleration compensation coefficient and working frequency relationship curve of the motor at the current temperature comprises the following steps: normalizing the acceleration frequency response curve of the motor to obtain a normalized acceleration compensation coefficient curve; obtaining the acceleration compensation coefficient and working frequency relationship curve of the motor at the current temperature according to the normalized acceleration compensation coefficient curve and the current standard resonant frequency.
3. The motor drive method according to claim 1, characterized by, The temperature compensation gain of the motor at the current temperature is obtained according to the acceleration compensation coefficient and working frequency relationship curve and the current measured resistance, and the temperature compensation gain of the motor at the current temperature comprises the following steps: calculating an amplitude offset value of the motor at a current target working frequency according to the acceleration compensation coefficient and working frequency relationship curve, the current measured resistance and the current target working frequency; calculating a compensation gain value of the motor at the current target working frequency according to the acceleration compensation coefficient and working frequency relationship curve, the current target working frequency and the amplitude offset value of the motor at the current target working frequency; determining the temperature compensation gain of the motor at the current temperature according to the compensation gain value of the motor at the current target working frequency.
4. The motor drive method according to claim 3, characterized by, The temperature compensation gain of the motor at the current temperature is obtained according to the acceleration compensation coefficient and working frequency relationship curve and the current measured resistance, and the temperature compensation gain of the motor at the current temperature comprises the following steps: obtaining an initial target working frequency of the motor at the current temperature; calculating an amplitude offset value of the motor at a current target working frequency according to the acceleration compensation coefficient and working frequency relationship curve, the current measured resistance, the current target working frequency, a nominal resistance of the motor, an H-bridge working voltage of a motor driving chip and an H-bridge on-resistance of the motor driving chip based on an amplitude offset value calculation model; calculating a compensation gain value of the motor at the current target working frequency according to the acceleration compensation coefficient and working frequency relationship curve, the current target working frequency, the amplitude offset value of the motor at the current target working frequency and a preset working waveform amplitude based on a compensation gain value calculation model; calculating a resonant frequency compensation coefficient at the current target working frequency according to the compensation gain value at the current target working frequency, the standard working voltage of the motor and the preset working waveform amplitude based on a resonant frequency compensation coefficient calculation model; calculating a next target working frequency according to the resonant frequency compensation coefficient at the current target working frequency and the current target working frequency. The above steps are repeated until the iteration number is a preset iteration number, and the last compensation gain value is taken as the temperature compensation gain of the motor at the current temperature, the preset iteration number being greater than or equal to 1, and the first current target operating frequency being the initial target operating frequency.
5. The motor drive method according to claim 4, characterized by, The amplitude offset value calculation model is Wherein, Amp offset (f n ) is the amplitude offset value under the current target working frequency, R T is the current measured resistance, R ds-on is the H-bridge on-resistance of the motor driving chip, R norm is the nominal resistance of the motor, AV offset is the voltage amplitude imbalance constant, V BST is the H-bridge working voltage of the motor driving chip, f n is the current target working frequency, K(f n ) is the acceleration compensation coefficient under the current target working frequency, n is the current iteration number, and K(f) is the relationship curve between the acceleration compensation coefficient and the working frequency at the current temperature.
6. The motor drive method of claim 4, wherein, The compensation gain value calculation model is Wherein, Gain(f n ) is the compensation gain value under the current target working frequency, Amp is the preset working waveform amplitude, Amp0 is the waveform amplitude constant, Amp offset (f n ) is the amplitude offset value under the current target working frequency, f n is the current target working frequency, K(f n ) is the acceleration compensation coefficient under the current target working frequency, n is the current iteration number, K(f) is the relationship curve of the acceleration compensation coefficient and the working frequency under the current temperature, K max is the maximum value of the acceleration compensation coefficient in the relationship curve of the acceleration compensation coefficient and the working frequency in the preset frequency range.
7. The motor drive method according to claim 4, characterized by, The resonance frequency compensation coefficient calculation model is Wherein, Kr(f n ) is the resonance frequency compensation coefficient under the current target working frequency, Gain(f n ) is the compensation gain value under the current target working frequency, V norm is the standard working voltage of the motor, Amp is the preset working waveform amplitude, Gain(f n ) is the compensation gain value under the current target working frequency, Amp0 is the waveform amplitude constant, V b is the associated misadjustment voltage constant of the resonance frequency coefficient, Gain0 is the preset gain constant, V BST is the H-bridge working voltage of the motor driving chip, f n is the current target working frequency, and n is the current iteration number.
8. The motor drive method of claim 1, wherein, After the temperature compensation gain of the motor at the current temperature is obtained according to the relationship curve between the acceleration compensation coefficient and the operating frequency and the current measured resistance, the method further comprises: correcting the temperature compensation gain at the current temperature to obtain a target temperature compensation gain at the current temperature; adjusting the driving voltage of the motor according to the target temperature compensation gain, and driving the motor to vibrate according to a driving signal generated based on the adjusted driving voltage.
9. The motor drive method according to claim 8, characterized by, The correcting of the temperature compensation gain at the current temperature to obtain the target temperature compensation gain at the current temperature comprises: calculating the target temperature compensation gain at the current temperature based on a target temperature compensation gain calculation model according to the current measured resistance, the nominal resistance of the motor, the H-bridge conduction resistance of the motor driving chip, and the temperature compensation gain at the current temperature.
10. The motor drive method of claim 9, wherein, The target temperature compensation gain calculation model is △t is the temperature difference between the current temperature T and the preset standard temperature T0, Gain is the target temperature compensation gain at the current temperature, Gain(f n ) is the compensation gain value at the current target working frequency, R T is the current measured resistance, R ds-on is the H-bridge conduction resistance of the motor driving chip, R norm is the nominal resistance of the motor, and K5 is a preset standard temperature correlation constant.
11. A chip, characterized by The chip comprises a control module, and the control module is configured to implement the motor driving method according to any one of claims 1 to 10.
12. An electronic device, comprising: The chip comprises a motor and the chip according to claim 11.
13. A computer-readable storage medium, characterized in that, The storage medium stores program instructions, and the program instructions are executed by the processor to implement the motor driving method according to any one of claims 1 to 10. The storage medium stores program instructions, and the program instructions are executed by the processor to implement the motor driving method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method for improving vibration consistency of linear motors
CN110729943A
Linear motor driving waveform adjusting and driving method and driving control circuit
CN112117953A
Driving compensation method, system, device and equipment of linear motor and storage medium
CN117978037A
Motor driving method, medium, chip and electronic equipment
CN118214336A
Circuit and Method for Fitting the Output of a Sensor to a Predetermined Linear Relationship
US20090063070A1
