CN113708704B - Motor shock sensation control method and device, electronic equipment and storage medium - Google Patents
Motor shock sensation control method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113708704B CN113708704B CN202010443708.XA CN202010443708A CN113708704B CN 113708704 B CN113708704 B CN 113708704B CN 202010443708 A CN202010443708 A CN 202010443708A CN 113708704 B CN113708704 B CN 113708704B
- Authority
- CN
- China
- Prior art keywords
- vibration intensity
- candidate input
- motor
- target
- input waveform
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 230000035939 shock Effects 0.000 title claims description 13
- 230000035807 sensation Effects 0.000 title description 2
- 238000004590 computer program Methods 0.000 claims description 10
- 238000001514 detection method Methods 0.000 claims description 3
- 230000010355 oscillation Effects 0.000 abstract description 23
- 230000000694 effects Effects 0.000 abstract description 8
- 238000004891 communication Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 5
- 230000005236 sound signal Effects 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P25/00—Arrangements or methods for the control of AC motors characterised by the kind of AC motor or by structural details
- H02P25/02—Arrangements or methods for the control of AC motors characterised by the kind of AC motor or by structural details characterised by the kind of motor
- H02P25/06—Linear motors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04847—Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P25/00—Arrangements or methods for the control of AC motors characterised by the kind of AC motor or by structural details
- H02P25/02—Arrangements or methods for the control of AC motors characterised by the kind of AC motor or by structural details characterised by the kind of motor
- H02P25/032—Reciprocating, oscillating or vibrating motors
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P7/00—Arrangements for regulating or controlling the speed or torque of electric DC motors
- H02P7/02—Arrangements for regulating or controlling the speed or torque of electric DC motors the DC motors being of the linear type
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/12—Classification; Matching
- G06F2218/16—Classification; Matching by matching signal segments
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Apparatuses For Generation Of Mechanical Vibrations (AREA)
Abstract
The present disclosure relates to a motor vibration control method and apparatus, an electronic device, and a storage medium. The method comprises the following steps: acquiring target vibration intensity of a motor; selecting a candidate input waveform with vibration intensity matched with the target vibration intensity from a plurality of candidate input waveforms based on the target vibration intensity; the candidate input waveforms have different oscillation starting periods, and the candidate input waveforms are used as initial input waveforms; the motor is driven to vibrate based on the candidate input waveform. Thus, in this embodiment, the oscillation starting period of the input waveform can be adjusted by selecting the input waveform, so as to achieve the effect of controlling the vibration intensity and the vibration period, and facilitate improving the accuracy of adjusting the vibration intensity.
Description
Technical Field
The disclosure relates to the technical field of control, and in particular relates to a motor shock control method and device, electronic equipment and a storage medium.
Background
At present, a linear motor is arranged in the electronic equipment, and the effect of vibrating the electronic equipment is achieved by utilizing the sudden start and the sudden stop of the linear motor, so that the user experience can be improved.
In practical application, the electronic device is provided with a sliding bar in the user interface, and a user adjusts the vibration intensity of the linear motor by moving the position of the sliding block on the sliding bar, namely when the sliding block moves towards one direction, the input voltage of the linear motor can be increased, and at the moment, the vibration intensity of the linear motor is increased; when moving in the other direction, the input voltage of the linear motor can be reduced, and the vibration intensity of the linear motor is weakened.
However, in the related art, only the magnitude of the input voltage is adjusted, and when the vibration intensity is weakened to a certain extent, the vibration feeling is tugged due to unchanged vibration period, so that the use experience of the user is affected.
Disclosure of Invention
The present disclosure provides a motor vibration control method and apparatus, an electronic device, and a storage medium, to solve the deficiencies of the related art.
According to a first aspect of embodiments of the present disclosure, there is provided a motor vibration control method including:
Acquiring target vibration intensity of a motor;
Selecting one candidate input waveform with vibration intensity matched with the target vibration intensity from a plurality of candidate input waveforms according to the target vibration intensity; the plurality of candidate input waveforms have different start-up periods;
The motor is driven to vibrate based on the candidate input waveform.
Optionally, driving the motor to vibrate based on the candidate input waveform includes:
when the target vibration intensity is determined to be different from the vibration intensity corresponding to the candidate input waveform, adjusting the voltage value of the candidate input waveform based on the target vibration intensity;
driving the motor to vibrate based on the target input waveform so that the vibration intensity of the motor is the target vibration intensity.
Optionally, acquiring the target vibration intensity of the motor includes:
detecting the relative position of a sliding block on a sliding bar in a user interface in electronic equipment;
Based on the corresponding relation between the relative position and the vibration intensity, the vibration intensity corresponding to the relative position is obtained, and the vibration intensity is used as the target vibration intensity of the motor.
Optionally, selecting one candidate input waveform with vibration intensity matching the target vibration intensity from a plurality of candidate input waveforms according to the target vibration intensity, including:
Acquiring the number of the starting periods in an input waveform according to the target vibration intensity based on a preset relation between the vibration intensity and the number of the starting periods;
One candidate input waveform having the number of start-up periods is selected from a plurality of candidate input waveforms, and the candidate input waveform is taken as the candidate input waveform having the vibration intensity closest to the target vibration intensity.
Optionally, each candidate input waveform in the plurality of candidate input waveforms further includes a vibration stopping period matched with the vibration starting period.
Optionally, each candidate input waveform corresponds to a vibration intensity range, and there is a coincidence intensity between the vibration intensity ranges of two candidate input waveforms adjacent to each other in the number of the starting periods.
According to a second aspect of embodiments of the present disclosure, there is provided a motor vibration control device including:
the intensity acquisition module is used for acquiring the target vibration intensity of the motor;
The waveform acquisition module is used for selecting one candidate input waveform with vibration intensity matched with the target vibration intensity from a plurality of candidate input waveforms according to the target vibration intensity; the plurality of candidate input waveforms have different start-up periods;
And the motor driving module is used for driving the motor to vibrate based on the candidate input waveform.
Optionally, the motor driving module includes:
A target waveform obtaining unit configured to adjust a voltage value of the candidate input waveform based on the target vibration intensity when it is determined that the target vibration intensity is different from a vibration intensity corresponding to the candidate input waveform;
and a motor driving unit for driving the motor to vibrate based on the target input waveform so that the vibration intensity of the motor is the target vibration intensity.
Optionally, the target intensity acquisition module includes:
The relative position detection unit is used for detecting the relative position of the sliding block on the sliding bar in the user interface in the electronic equipment;
A target intensity obtaining unit, configured to obtain a vibration intensity corresponding to a relative position based on a correspondence between the relative position and the vibration intensity, and take the vibration intensity as a target vibration intensity of the motor.
Optionally, the waveform acquisition module includes:
the vibration starting number acquisition unit is used for acquiring the number of vibration starting periods in an input waveform according to the target vibration intensity based on a preset relation between the vibration intensity and the number of vibration starting periods;
An initial waveform selection unit for selecting one candidate input waveform having the number of start periods from a plurality of candidate input waveforms, and taking the candidate input waveform as a candidate input waveform whose vibration intensity matches the target vibration intensity.
Optionally, each candidate input waveform in the plurality of candidate input waveforms further includes a vibration stopping period matched with the vibration starting period.
Optionally, each candidate input waveform corresponds to a vibration intensity range, and there is a coincidence intensity between the vibration intensity ranges of two candidate input waveforms adjacent to each other in the number of the starting periods.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
A processor;
A memory for storing a computer program executable by the processor;
The processor is configured to execute a computer program in the memory to implement the steps of the method described above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a readable storage medium having stored thereon an executable computer program which when executed performs the steps of the method described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
as can be seen from the above embodiments, in the embodiments of the present disclosure, the target vibration intensity of the motor may be obtained; selecting one candidate input waveform with vibration intensity matched with the target vibration intensity from a plurality of candidate input waveforms based on the target vibration intensity; the plurality of candidate input waveforms have different start-up periods; the motor is driven to vibrate based on the candidate input waveform. Thus, in this embodiment, the oscillation starting period of the input waveform can be adjusted by selecting the input waveform, so as to achieve the effect of controlling the vibration intensity and the vibration period, and facilitate improving the accuracy of adjusting the vibration intensity.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a motor shock control method according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a method of acquiring a target vibration intensity according to an exemplary embodiment.
Fig. 3 is a flow chart illustrating one method of acquiring candidate input waveforms according to an exemplary embodiment.
Fig. 4 is a flow chart illustrating a method of acquiring a target input waveform according to an exemplary embodiment.
Fig. 5 (a) is a schematic diagram of an input waveform 1 shown according to an exemplary embodiment, respectively.
Fig. 5 (b) is a schematic diagram of the motor output waveform at the time of the input waveform driving shown in fig. 5 (a).
Fig. 6 (a) is a schematic diagram of input waveforms 2, respectively, shown according to an exemplary embodiment.
Fig. 6 (b) is a schematic diagram of the motor output waveform at the time of the input waveform driving shown in fig. 6 (a).
Fig. 7 is a schematic diagram of an application scenario, according to an example embodiment.
Fig. 8 is a block diagram illustrating a motor shock control device according to an exemplary embodiment.
Fig. 9 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described by way of example below are not representative of all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus consistent with some aspects of the disclosure as detailed in the accompanying claims.
At present, a linear motor is arranged in the electronic equipment, and the effect of vibrating the electronic equipment is achieved by utilizing the sudden start and the sudden stop of the linear motor, so that the user experience can be improved.
In practical application, the electronic device is provided with a sliding bar in the user interface, and a user adjusts the vibration intensity of the linear motor by moving the position of the sliding block on the sliding bar, namely when the sliding block moves towards one direction, the input voltage of the linear motor can be increased, and at the moment, the vibration intensity of the linear motor is increased; when moving in the other direction, the input voltage of the linear motor can be reduced, and the vibration intensity of the linear motor is weakened.
However, in the related art, only the magnitude of the input voltage is adjusted, and when the vibration intensity is weakened to a certain extent, the vibration feeling is tugged due to unchanged vibration period, so that the use experience of the user is affected.
In order to solve the above technical problems, embodiments of the present disclosure provide a motor vibration control method, which uses input waveforms having different vibration starting periods to achieve adjustment of vibration intensity of a motor. Thus, the vibration sensing effect of the motor is controlled by being beneficial to the different numbers of the vibration starting periods.
Fig. 1 is a flowchart illustrating a motor shock control method according to an exemplary embodiment, which may be adapted to an electronic device provided with a motor. The motor may be one of a linear motor, a voice coil motor, and a vibration motor, which is not limited herein. Referring to fig. 1, a motor vibration control method includes steps 11 to 13, wherein:
In step 11, a target vibration intensity of the motor is acquired.
In this embodiment, a user interface may be provided in the electronic device, where the user interface includes a slider, so that a user may move a slider on the slider to adjust the vibration intensity of the motor. Referring to fig. 2, in step 21, the electronic device may detect a relative position of a slider on a slider bar within a user interface. For example, the maximum length of the slider corresponds to the maximum vibration intensity of the motor, and the ratio of the distance of the slider from one end of the slider to the maximum length may be regarded as the relative position of the slider. In step 22, the electronic device may obtain a preset correspondence between the relative position and the vibration intensity, and obtain the vibration intensity corresponding to the relative position, and use the vibration intensity as the target vibration intensity of the motor. For example, if the maximum length of the slider corresponds to a vibration intensity of 0.6G and the relative position of the slider is 67%, a vibration intensity corresponding to the relative position of 0.4G can be obtained.
In practical application, a user interface can be set in the electronic device, an input box can be included in the user interface, and a user can directly or indirectly input the target vibration intensity in the input box according to the prompt information, so that the corresponding scheme falls into the protection scope of the disclosure.
In step 12, selecting a candidate input waveform with vibration intensity matched with the target vibration intensity from a plurality of candidate input waveforms according to the target vibration intensity; the plurality of candidate input waveforms have different start-up periods.
In this embodiment, a plurality of candidate input waveforms may be preset in the electronic device. Each candidate input waveform in the plurality of candidate input waveforms comprises a preset number of oscillation starting periods and oscillation stopping periods matched with the oscillation starting periods; the number of start-up periods varies from one candidate input waveform to another. It is understood that, in the case where the voltage values are the same, the greater the number of start-up periods, the greater the vibration intensity of the motor, and therefore the vibration intensities of the motors corresponding to the plurality of candidate input waveforms are also different. Therefore, a preset relationship between the vibration intensity and the number of the start-up periods may be preset in the electronic device. In one example, each candidate input waveform may correspond to a vibration intensity range, e.g., 3 start cycles correspond to a vibration intensity range of [0.6G,0.4G ], and 2 start cycles correspond to [0.4G,0.2G ]. Thus, the vibration intensity ranges of two candidate input waveforms with adjacent vibration starting periods have a superposition intensity, for example, the vibration intensity ranges of 3 vibration starting periods and 2 vibration starting periods can correspond to a superposition intensity of 0.4G, so that sudden jump of the vibration intensity is avoided.
In this embodiment, the slider may be divided into a plurality of regions, each region corresponding to one candidate input waveform. Thus, the electronic device can determine a candidate input waveform as a candidate input waveform matching the target vibration intensity according to the region in which the position of the slider is located.
In this embodiment, referring to fig. 3, in step 31, the preset relationship between the vibration intensity and the number of vibration starting periods may be obtained in the electronic device, and the number (N) of vibration starting periods in the input waveform is obtained according to the target vibration intensity, that is, when the motor is driven to vibrate by how many vibration starting periods, the vibration intensity of the motor can reach the target vibration intensity. In step 32, the electronic device may select one candidate input waveform having N oscillation starting periods from the plurality of candidate input waveforms according to the number of oscillation starting periods, and use the candidate obtained initial input waveform as the candidate input waveform having the oscillation intensity matching the target oscillation intensity. That is, the candidate input waveform has N oscillation starting periods, so that the oscillation intensity of the motor can be matched with the target oscillation intensity, wherein the matching means that the oscillation intensity is the same as the target oscillation intensity or the difference value between the oscillation intensity and the target oscillation intensity is within a set range.
In step 13, the motor is driven to vibrate based on the candidate input waveform.
In this embodiment, the electronic device may drive the motor to vibrate based on the candidate input waveform, so that the vibration intensity of the motor matches the target vibration intensity, and is particularly suitable for a scenario in which the target vibration intensity is one end point of the vibration intensity range corresponding to the candidate input waveform.
It should be noted that, since there is one key vibration intensity of two candidate input waveforms adjacent to each other in the number of the oscillation start periods, the following may be selected: one candidate input waveform is randomly selected, and the candidate input waveform with smaller number of starting periods is selected.
In an embodiment, referring to fig. 4, in step 41, the electronic device may further compare the target vibration intensity with the vibration intensity corresponding to the candidate input waveform, and adjust the voltage value of the candidate input waveform based on the target vibration intensity when the target vibration intensity and the candidate input waveform are different (i.e. the difference value of the target vibration intensity and the candidate input waveform exceeds the set range). In step 42, the motor is driven to vibrate based on the target input waveform so that the vibration intensity of the motor is the target vibration intensity. For example, when the vibration intensity exceeds the target vibration intensity, the voltage value may be increased in a set step; when the vibration intensity is smaller than the target vibration intensity, the voltage value can be reduced according to the set step length until the vibration intensity of the motor is the same as the target vibration intensity, so that the target input waveform is obtained. Thus, in the subsequent process, if the user operates the electronic device, for example, clicks a button, the electronic device can drive the motor to vibrate according to the target input waveform, so that the motor vibrates to the target vibration intensity.
Thus, the target vibration intensity of the motor can be obtained in the embodiment of the disclosure; selecting one candidate input waveform with vibration intensity matched with the target vibration intensity from a plurality of candidate input waveforms based on the target vibration intensity; the plurality of candidate input waveforms have different start-up periods; the motor is driven to vibrate based on the candidate input waveform. Thus, in this embodiment, the oscillation starting period of the input waveform can be adjusted by selecting the input waveform, so as to achieve the effect of controlling the vibration intensity and the vibration period, and facilitate improving the accuracy of adjusting the vibration intensity.
A motor shock control method is described below in connection with a specific scenario. Fig. 5 (a) provides a candidate input waveform 1, the candidate input waveform 1 including 2 start-up periods (about 0-230 ms) and 1.5 stop-vibration periods (230-410 ms), the motor output waveform being as shown in fig. 5 (b). Fig. 6 (a) provides a candidate input waveform 2, which candidate input waveform 2 includes 3 start-up cycles (about 0-350 ms) and 3 stop-vibration cycles (about 350-640 ms), and the motor output waveform is as shown in fig. 6 (b).
In addition, during the process of reversely driving the motor in the vibration stopping period, the motor may vibrate reversely, so that 410 to 550ms in fig. 5 (a) is further provided with one vibration stopping period, 640 to 700ms in fig. 6 (a) is further provided with 0.5 vibration stopping periods, so that the effect of stopping the motor as soon as possible can be set according to a specific scene, and the vibration stopping effect is not limited herein.
In the default state, the vibration intensity of the motor is the maximum vibration intensity, such as 0.6G, and the input waveform 2 is adopted to drive the motor to vibrate. During the use, the user finds that the vibration intensity is too large, so that the user can find the control sliding bar for controlling the motor vibration sense through the menu. The user can press the slider and move the slider toward the starting point (position). The electronic device can acquire the relative position of the sliding block and determine the target vibration intensity. Assuming that the target vibration intensity exceeds 0.4G (e.g., 0.45G), the electronic device still drives the motor with the input waveform 2, but at this time, the voltage value of the input waveform 2 needs to be adjusted to make the current vibration intensity reach 0.45G.
Assuming that the target vibration intensity is equal to 0.4G, either one of the input waveform 2 and the input waveform 1 may be selected. Or comparing the oscillation starting periods of the two candidate input waveforms, for example, considering that the oscillation starting period of the input waveform 1 is smaller than the oscillation starting period of the input waveform 2, the input waveform 1 may be selected in this embodiment, so as to shorten the oscillation period.
Assuming that the target vibration intensity is less than 0.4G (e.g., 0.35G), the electronic device may switch from the current input waveform 2 to the input waveform 1 to drive the motor, and since the number of start-up periods of the input waveform 1 is less than the number of start-up periods of the input waveform 2, the vibration intensity of the motor may be reduced, and then the voltage value of the input waveform 1 may be adjusted, so that the vibration intensity of the motor is equal to or close to the target vibration intensity.
In other words, referring to fig. 7, the relative position of the slider may vary from 100% to 1% as the slider moves from right to left. The motor is driven with an input waveform 2 when the target vibration intensity is between 100% and 50% (i.e., the target vibration intensity exceeds 0.4G), and with an input waveform 1 when the target vibration intensity is between 50% and 1% (i.e., the target vibration intensity is less than 0.4G). The vibration sense of the motor is controlled by different input waveforms with different numbers of starting vibration periods, and if the vibration intensity of the input waveforms corresponding to the motor is not matched with the target vibration intensity, the vibration intensity of the motor can be the same by adjusting the voltage value of the input waveforms.
Fig. 8 is a block diagram illustrating a motor shock control device according to an exemplary embodiment. Referring to fig. 8, a motor vibration control apparatus includes:
an intensity acquisition module 81 for acquiring a target vibration intensity of the motor;
a waveform obtaining module 82, configured to select, according to the target vibration intensity, a candidate input waveform with a vibration intensity matching the target vibration intensity from a plurality of candidate input waveforms; the plurality of candidate input waveforms have different start-up periods;
a motor driving module 83 for driving the motor to vibrate based on the candidate input waveform.
In one embodiment, the motor driving module includes:
A target waveform obtaining unit configured to adjust a voltage value of the candidate input waveform based on the target vibration intensity when it is determined that the target vibration intensity is different from a vibration intensity corresponding to the candidate input waveform;
and a motor driving unit for driving the motor to vibrate based on the target input waveform so that the vibration intensity of the motor is the target vibration intensity.
In one embodiment, the target intensity acquisition module includes:
The relative position detection unit is used for detecting the relative position of the sliding block on the sliding bar in the user interface in the electronic equipment;
A target intensity obtaining unit, configured to obtain a vibration intensity corresponding to a relative position based on a correspondence between the relative position and the vibration intensity, and take the vibration intensity as a target vibration intensity of the motor.
In one embodiment, the waveform acquisition module includes:
the vibration starting number acquisition unit is used for acquiring the number of vibration starting periods in an input waveform according to the target vibration intensity based on a preset relation between the vibration intensity and the number of vibration starting periods;
An initial waveform selection unit for selecting one candidate input waveform having the number of start periods from a plurality of candidate input waveforms, and taking the candidate input waveform as a candidate input waveform whose vibration intensity matches the target vibration intensity.
In an embodiment, each candidate input waveform of the plurality of candidate input waveforms further includes a vibration stopping period matched with the vibration starting period.
In an embodiment, each candidate input waveform corresponds to a vibration intensity range, and there is a coincidence of the vibration intensity ranges of two candidate input waveforms adjacent to each other in the number of start periods.
It can be understood that the apparatus provided in the embodiments of the present disclosure corresponds to the above method embodiments, and specific content may refer to content of each embodiment of the method, which is not described herein again.
Fig. 9 is a block diagram of an electronic device, according to an example embodiment. For example, electronic device 900 may be a smart phone, computer, digital broadcast terminal, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 9, an electronic device 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input/output (I/O) interface 912, a sensor component 914, a communication component 916, and an image acquisition component 918.
The processing component 902 generally operates overall operation of the electronic device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 902 can include one or more sets of processors 920 to execute computer programs. In addition, the processing component 902 can include one or more sets of modules that facilitate interaction between the processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operations at the electronic device 900. Examples of such data include computer programs, contact data, phonebook data, messages, pictures, videos, and the like for any application or method operating on electronic device 900. The memory 904 may be implemented by any type of volatile or nonvolatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 906 provides power to the various components of the electronic device 900. Power supply components 906 may include a power management system, one or more sets of power supplies, and other components associated with generating, managing, and distributing power for electronic device 900. The power component 906 may include a power chip and the controller may communicate with the power chip to control the power chip to turn on or off the switching device to power the motherboard circuit with or without the battery.
The multimedia component 908 includes a screen between the electronic device 900 and the target object that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a target object. The touch panel includes one or more sets of touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation.
The audio component 910 is configured to output and/or input audio signals. For example, the audio component 910 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 900 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 further includes a speaker for outputting audio signals.
The I/O interface 912 provides an interface between the processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc.
The sensor assembly 914 includes one or more sets of sensors for providing status assessment of various aspects of the electronic device 900. For example, the sensor assembly 914 may detect an on/off state of the electronic device 900, a relative positioning of the components, such as a display and keypad of the electronic device 900, the sensor assembly 914 may also detect a change in position of the electronic device 900 or one of the components, the presence or absence of a target object in contact with the electronic device 900, an orientation or acceleration/deceleration of the electronic device 900, and a change in temperature of the electronic device 900.
The communication component 916 is configured to facilitate communication between the electronic device 900 and other devices, either wired or wireless. The electronic device 900 may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 916 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 900 may be implemented by one or more sets of Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements.
In an exemplary embodiment, a non-transitory readable storage medium is also provided, such as memory 904, including instructions, including an executable computer program executable by a processor. The readable storage medium may be, among other things, ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (14)
1. A motor shock control method, comprising:
Acquiring target vibration intensity of a motor;
Selecting one candidate input waveform with vibration intensity matched with the target vibration intensity from a plurality of candidate input waveforms according to the target vibration intensity; the plurality of candidate input waveforms have different start-up periods;
The motor is driven to vibrate based on the candidate input waveform.
2. The method of claim 1, wherein driving the motor vibration based on the candidate input waveform comprises:
when the target vibration intensity is determined to be different from the vibration intensity corresponding to the candidate input waveform, adjusting the voltage value of the candidate input waveform based on the target vibration intensity;
driving the motor to vibrate based on the target input waveform so that the vibration intensity of the motor is the target vibration intensity.
3. The method of claim 1, wherein obtaining a target vibration intensity of the motor comprises:
detecting the relative position of a sliding block on a sliding bar in a user interface in electronic equipment;
Based on the corresponding relation between the relative position and the vibration intensity, the vibration intensity corresponding to the relative position is obtained, and the vibration intensity is used as the target vibration intensity of the motor.
4. The method of claim 1, wherein selecting a candidate input waveform from a plurality of candidate input waveforms having a shock intensity matching the target shock intensity based on the target shock intensity, comprises:
Acquiring the number of the starting periods in an input waveform according to the target vibration intensity based on a preset relation between the vibration intensity and the number of the starting periods;
One candidate input waveform having the number of start-up periods is selected from a plurality of candidate input waveforms, and the candidate input waveform is taken as the candidate input waveform having the vibration intensity closest to the target vibration intensity.
5. The method of any one of claims 1-4, wherein each of the plurality of candidate input waveforms further comprises a de-ringing period that matches the ringing period.
6. The method of any one of claims 1-4, wherein each candidate input waveform corresponds to a vibration intensity range, and wherein there is a coincidence of the vibration intensity ranges of two candidate input waveforms having adjacent number of onset periods.
7. A motor shock control device, comprising:
the intensity acquisition module is used for acquiring the target vibration intensity of the motor;
The waveform acquisition module is used for selecting one candidate input waveform with vibration intensity matched with the target vibration intensity from a plurality of candidate input waveforms according to the target vibration intensity; the plurality of candidate input waveforms have different start-up periods;
And the motor driving module is used for driving the motor to vibrate based on the candidate input waveform.
8. The apparatus of claim 7, wherein the motor drive module comprises:
A target waveform obtaining unit configured to adjust a voltage value of the candidate input waveform based on the target vibration intensity when it is determined that the target vibration intensity is different from a vibration intensity corresponding to the candidate input waveform;
and a motor driving unit for driving the motor to vibrate based on the target input waveform so that the vibration intensity of the motor is the target vibration intensity.
9. The apparatus of claim 7, wherein the intensity acquisition module comprises:
The relative position detection unit is used for detecting the relative position of the sliding block on the sliding bar in the user interface in the electronic equipment;
A target intensity obtaining unit, configured to obtain a vibration intensity corresponding to a relative position based on a correspondence between the relative position and the vibration intensity, and take the vibration intensity as a target vibration intensity of the motor.
10. The apparatus of claim 7, wherein the waveform acquisition module comprises:
the vibration starting number acquisition unit is used for acquiring the number of vibration starting periods in an input waveform according to the target vibration intensity based on a preset relation between the vibration intensity and the number of vibration starting periods;
An initial waveform selection unit for selecting one candidate input waveform having the number of start periods from a plurality of candidate input waveforms, and taking the candidate input waveform as a candidate input waveform whose vibration intensity matches the target vibration intensity.
11. The apparatus of any of claims 7-10, wherein each candidate input waveform of the plurality of candidate input waveforms further comprises a de-ringing period that matches the ringing period.
12. The apparatus of any one of claims 7 to 10, wherein each candidate input waveform corresponds to a vibration intensity range, and wherein there is a coincidence of the vibration intensity ranges of two candidate input waveforms having adjacent number of start cycles.
13. An electronic device, comprising:
A processor;
A memory for storing a computer program executable by the processor;
the processor is configured to execute a computer program in the memory to implement the steps of the method of any of claims 1 to 6.
14. A readable storage medium having stored thereon an executable computer program, characterized in that the computer program when executed implements the steps of the method according to any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010443708.XA CN113708704B (en) | 2020-05-22 | 2020-05-22 | Motor shock sensation control method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010443708.XA CN113708704B (en) | 2020-05-22 | 2020-05-22 | Motor shock sensation control method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113708704A CN113708704A (en) | 2021-11-26 |
CN113708704B true CN113708704B (en) | 2024-05-28 |
Family
ID=78646458
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010443708.XA Active CN113708704B (en) | 2020-05-22 | 2020-05-22 | Motor shock sensation control method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113708704B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115933941A (en) * | 2022-11-23 | 2023-04-07 | 瑞声开泰声学科技(上海)有限公司 | Motor control method, terminal device and computer storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102177653A (en) * | 2008-10-22 | 2011-09-07 | 意美基斯技术有限公司 | Vibration motor driving apparatus using a serial interface |
CN103167162A (en) * | 2012-10-09 | 2013-06-19 | 深圳市金立通信设备有限公司 | User-defined vibration system and method of mobile phone motor |
CN109379485A (en) * | 2018-09-26 | 2019-02-22 | 腾讯数码(天津)有限公司 | Feedback method, device, terminal and the storage medium of application program |
CN109710067A (en) * | 2018-12-20 | 2019-05-03 | 上海艾为电子技术股份有限公司 | A kind of linear resonance device and its brake method |
CN110707982A (en) * | 2019-09-05 | 2020-01-17 | Oppo(重庆)智能科技有限公司 | Control method, device and equipment of electronic equipment and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3540311B2 (en) * | 2002-05-31 | 2004-07-07 | 松下電器産業株式会社 | Motor drive control device |
-
2020
- 2020-05-22 CN CN202010443708.XA patent/CN113708704B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102177653A (en) * | 2008-10-22 | 2011-09-07 | 意美基斯技术有限公司 | Vibration motor driving apparatus using a serial interface |
CN103167162A (en) * | 2012-10-09 | 2013-06-19 | 深圳市金立通信设备有限公司 | User-defined vibration system and method of mobile phone motor |
CN109379485A (en) * | 2018-09-26 | 2019-02-22 | 腾讯数码(天津)有限公司 | Feedback method, device, terminal and the storage medium of application program |
CN109710067A (en) * | 2018-12-20 | 2019-05-03 | 上海艾为电子技术股份有限公司 | A kind of linear resonance device and its brake method |
CN110707982A (en) * | 2019-09-05 | 2020-01-17 | Oppo(重庆)智能科技有限公司 | Control method, device and equipment of electronic equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
一种新型非共振压电直线电机的设计;黄卫清 等;《中国机械工程》;第20卷(第14期);第1717-1721页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113708704A (en) | 2021-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3306441A1 (en) | Temperature control method and apparatus | |
CN110796988B (en) | Backlight adjusting method and device | |
CN107102772B (en) | Touch control method and device | |
CN112114674A (en) | Vibration intensity control method and device, electronic equipment and storage medium | |
CN104881104A (en) | Intelligent equipment, intelligent equipment performance improvement method and intelligent equipment performance improvement device | |
CN105288941A (en) | Treadmill speed regulating method and device | |
CN104484795B (en) | Information cuing method and device | |
CN109862169B (en) | Electronic equipment control method, device and storage medium | |
CN110399082B (en) | Terminal attribute control method and device, electronic equipment and medium | |
CN113708704B (en) | Motor shock sensation control method and device, electronic equipment and storage medium | |
CN108766427B (en) | Voice control method and device | |
CN105607319B (en) | The automatic method and device for improving light leakage of the screen | |
CN107787097A (en) | Flash lamp control method and device | |
CN113365188B (en) | Speaker control method, speaker control device, and storage medium | |
EP3848780B1 (en) | Electronic device | |
CN109213264A (en) | Electronic equipment, volume adjusting method and device, computer readable storage medium | |
CN114337242A (en) | Method and apparatus for determining a switching current threshold of a power factor correction module | |
CN108804009B (en) | Gesture recognition method and device | |
CN113885693A (en) | Touch feedback module and method, electronic equipment and computer storage medium | |
CN113763652A (en) | Mobile terminal, charging prompting method, charging prompting device and storage medium | |
CN112448052A (en) | Battery charging control method and device | |
CN117251404B (en) | Control method and device, electronic equipment and storage medium | |
CN111509320A (en) | Charging method and device | |
CN114161941B (en) | Vehicle running control method and device, electronic equipment and storage medium | |
CN113835503B (en) | Method and device for controlling display mode switching, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |