Motor control method and device and electronic equipment
By detecting the working scene of the speaker and controlling the motor to adjust the vibration, the problem of insufficient or excessive vibration of the speaker in different scenarios is solved, achieving a better user experience and reminder effect.
Patent Information
- Application Number
- CN202411843281.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-03-25
AI Technical Summary
The speaker will drive the vibration of the mobile terminal in sound-producing scenes such as calling and listening to audio, causing vibration and affecting the user experience; while in scenes such as notification ringtones and alarm clocks, the vibration may be insufficient and the reminder effect is poor.
By detecting the working scene of the speaker, the motor is controlled to suppress the vibration generated by the speaker in the first working scene (such as call, audio playback) to reduce the vibration generated by the speaker in the second working scene (such as notification ringtones, alarm clocks) to control the motor to enhance the vibration generated by the speaker in the second working scene (such as notification ringtones, alarm clocks) to improve the reminder effect.
It realizes that the vibration of the speaker is adjusted according to needs in different scenarios, reduces the vibration, improves the user experience, and improves the reminder effect.
Smart Images

Figure CN119697316A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a motor control method, device and electronic equipment. Background Art
[0002] With the development of technology, mobile terminals can be used as a payment tool, communication tool, entertainment tool and other equipment, which are very popular among users. Speakers, as a sound-generating element that can convert electrical signals into sound signals, are important components in mobile terminals.
[0003] However, in sound-generating scenarios such as making calls and listening to audio, the speaker's own vibration will drive the shell of the mobile terminal, especially the back cover of the mobile terminal, to vibrate, so that the mobile terminal has a certain sense of vibration, causing the user to feel a shaking hand, affecting the user experience. However, in sound-generating scenarios such as notification ringtones and alarm clocks, the speaker may have insufficient vibration and poor reminder effect. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a motor control method, device and electronic equipment, which can solve the vibration problem of current speakers.
[0005] In a first aspect, an embodiment of the present application provides a motor control method, the method comprising:
[0006] When the speaker is in a sounding state, detecting a working scene of the speaker;
[0007] When the working scene is the first working scene, controlling the motor to suppress vibration generated by the sound of the speaker;
[0008] When the working scene is the second working scene, the motor is controlled to enhance the vibration generated by the sound of the speaker, wherein the speaker triggers non-functional vibration in the first working scene and triggers functional vibration in the second working scene.
[0009] In a second aspect, an embodiment of the present application provides a motor control device, the device comprising:
[0010] A detection module, used for detecting a working scene of the speaker when the speaker is in a sounding state;
[0011] The control module is used to control the motor to suppress the vibration generated by the sound of the speaker when the working scene is a first working scene; and is also used to control the motor to enhance the vibration generated by the sound of the speaker when the working scene is a second working scene, wherein the speaker triggers non-functional vibration in the first working scene and triggers functional vibration in the second working scene.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0013] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0014] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0015] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0016] In an embodiment of the present application, when the speaker is in a sounding state, the working scene of the speaker is detected, and when the working scene of the speaker is a first working scene, the motor is controlled to suppress the vibration generated by the sound of the speaker; when the working scene of the speaker is a second working scene, the motor is controlled to enhance the vibration generated by the sound of the speaker. In this technical solution, when the speaker is in a sounding state, the motor can be controlled to achieve suppression or enhancement of the vibration generated by the sound of the speaker in different scenarios. For example, in sounding scenes such as making calls and listening to audio, the vibration generated by the sound of the speaker can be suppressed by controlling the motor to reduce the vibration generated by the sound of the speaker in the electronic device and improve the user experience. In sounding scenes such as notification ringtones and alarm clocks, the vibration generated by the sound of the speaker can be enhanced by controlling the motor to avoid the problem of insufficient vibration and improve the reminder effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0018] Figure 2 is a schematic diagram of the structure of a motor provided in an embodiment of the present application;
[0019] Figure 3 is a schematic diagram of a frequency-acceleration curve of a motor provided in an embodiment of the present application;
[0020] Figure 4 is a flow chart of a motor control method provided by an embodiment of the present application;
[0021] Figure 5 It is a schematic diagram of the principle of inhibition and enhancement provided by an embodiment of the present application;
[0022] Figure 6 is a flow chart of another motor control method provided by an embodiment of the present application;
[0023] Figure 7 is a flow chart of a motor control method provided by another embodiment of the present application;
[0024] Figure 8 is a flow chart of another motor control method provided by another embodiment of the present application;
[0025] Fig. 9 is a block diagram of a motor control device provided in an embodiment of the present application;
[0026] Fig.10 is a block diagram of an electronic device provided in an embodiment of the present application;
[0027] Fig.11 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0028] Fig.12 This is a working state waveform diagram of a motor provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0031] The motor control method, device and electronic device provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0032] The embodiment of the present application provides a motor control method, which can be applied to the electronic device provided in the embodiment of the present application. The electronic device may include a motor, and the motor may support vibrations in at least two vibration directions. In some embodiments, the electronic device may also include a target device, and the output data of the target device indicates the vibration amount of the vibration generated by the sound of the speaker.
[0033] In an optional case, the target device may be a microphone. The microphone is used to collect audio data emitted when the motor vibrates. The audio data has sound intensity indication data, and the sound intensity indication data indicates the sound intensity of the audio data. Therefore, the sound intensity of the audio data emitted when the motor vibrates can indicate the vibration amount of the motor. The greater the sound intensity, the greater the vibration amount of the motor.
[0034] In another optional case, the target device may be an acceleration sensor, such as a gravity acceleration sensor (G-sensor). The acceleration sensor may be used to directly measure the vibration acceleration of the motor, that is, the vibration amount of the motor.
[0035] Based on this, in some embodiments, the present application provides a method such as Figure 1 The electronic device 1 includes: a middle frame and a screen 10, a sound unit (BOX) 20, a battery cover 30, a mainboard bracket 40, a receiver 50, a printed circuit board (PCB) 60, a gravity acceleration sensor 70, a camera 80, a dual-axis linear motor 90, a microphone 100, etc.
[0036] Among them, PCB60 may include a driver IC. The driver IC is used to drive the dual-axis linear motor 90 to vibrate. The gravity acceleration sensor 70 is arranged on the PCB, and can be directly used to measure the vibration acceleration of the motor, that is, the vibration amount of the motor. The dual-axis linear motor 90 supports two vibration directions, and the two vibration directions usually refer to the X-axis direction and the Z-axis direction. Among them, since the motor relies on reciprocating motion to achieve vibration. Therefore, the vibration direction in the X-axis direction can also be understood as the Y-axis direction. It should be noted that the X-axis direction, the Y-axis direction and the Z-axis direction all refer to the directions of the axes in the coordinate system of the electronic device.
[0037] In an optional implementation, the structure of the dual-axis linear motor 90 can be as follows: Figure 2 As shown, the dual-axis linear motor 90 includes: an upper shell 901, a lower shell 902, a flexible printed circuit (FPC) 903, a mass block 904, a spring 905, a coil 906, a Si 907, a magnet 908, a baffle 909 and a limit block 910.
[0038] Among them, the upper shell 901 and the lower shell 902 are used to support and protect the internal structure. Sihua 907 and magnet 908 are used to provide a magnetic field so that the energized coil 906 can move under the action of force. Coil 906 is fixed on the mass block 904, and is used to drive the mass block 904 to reciprocate in the X-axis direction to achieve vibration in the X-axis direction under the action of the magnetic field provided by Sihua 907 and magnet 908 after power is turned on; or, drive the mass block 904 to reciprocate in the Z-axis direction to achieve vibration in the Z-axis direction. Shrapnel 905 is used to provide a rebound force for coil 906 and mass block 904, so that the vibrating coil 906 and mass block 904 return to the default position. Baffle 909 and limit block 910 are used to limit the movement position of mass block 904. FPC903 is used to connect to the power supply module to power coil 906.
[0039] Please refer to Figure 3 , which shows a frequency-acceleration curve diagram of a dual-axis linear motor 90 provided by the related art. Figure 3 In FIG. 1 , the horizontal axis is the vibration frequency (f) of the dual-axis linear motor 90 , and the vertical axis is the vibration acceleration (Grms) of the dual-axis linear motor 90 . Figure 3 3 shows a curve 301 showing a change in vibration acceleration versus vibration frequency when the motor vibrates in the X-axis direction, and a curve 302 showing a change in vibration acceleration versus vibration frequency when the motor vibrates in the Y-axis direction.
[0040] Depend on Figure 3It can be seen that the vibration frequency of the motor is mainly concentrated below 500Hz, and the main vibration intensity is concentrated at lower vibration frequencies. At lower vibration frequencies, the vibration acceleration of the motor in the X-axis direction is greater than the vibration acceleration in the Y-axis direction, that is, the vibration intensity of the motor in the X-axis direction is greater than the vibration intensity in the Y-axis direction.
[0041] Please refer to Figure 4 , which shows a flow chart of a motor control method provided in an embodiment of the present application. The motor control method can be applied to the electronic device provided in an embodiment of the present application. Optionally, the motor control method can be applied to Figure 1 The electronic device shown in the figure, and the motor included in the electronic device can be Figure 2 In addition, the motor control method can be executed by a component in an electronic device. The following takes the motor control method executed by a processing device in an electronic device as an example. Figure 4 As shown, the motor control method includes:
[0042] Step 401: When the speaker is in a sounding state, detect the working scene of the speaker.
[0043] In an embodiment of the present application, the processing device can determine whether the speaker is in a sound-emitting state, so that when the speaker is not in a sound-emitting state, the detection processing of the speaker's working scene is not performed; when the speaker is in a sound-emitting state, the detection processing of the speaker's working scene is performed.
[0044] Optionally, the processing device may determine whether the speaker is connected to a working signal, so that when the speaker is connected to a working signal, the speaker is determined to be in a sounding state; and when the speaker is not connected to a working signal, the speaker is determined to be not in a sounding state. For example, the processing device may determine whether the power amplifier of the speaker is started to work, so that when the power amplifier of the speaker is started to work, indicating that the speaker is connected to a working signal, the speaker is determined to be in a sounding state; and when the power amplifier of the speaker is not started to work, indicating that the speaker is not connected to a working signal, the speaker is determined to be not in a sounding state.
[0045] In some embodiments, the speaker has a first working scene and a second working scene. The processing device can detect the working scene of the speaker to determine whether the speaker is in the first working scene or the second working scene. Among them, the speaker will trigger non-functional vibration in the first working scene, and non-functional vibration can be understood as vibration that is not needed by the electronic device. Therefore, the first working scene may refer to a scene where the vibration generated by the speaker's sound needs to be suppressed. For example, the first working scene refers to a call scene, an audio playback scene, etc., and non-functional vibration refers to some fragmented resonances, noises, or vibrations of the shell caused by the speaker during normal operation. The speaker will trigger functional vibrations in the second working scene, and functional vibrations can be understood as vibrations with functional effects generated when the electronic device performs a task. For example, the electronic device implements call reminders, message reminders, vibration reminders, etc. based on the speaker, that is, it is necessary to achieve the reminder function effect for the user through the vibration of the speaker. Therefore, the second working scene may refer to a scene where the vibration generated by the speaker's sound needs to be enhanced. For example, the second working scene refers to notification scenes such as phone ringtones, SMS ringtones, notification ringtones of applications (APPs), and alarm playback scenes.
[0046] Optionally, the processing device may detect the working scene of the speaker by setting an application whitelist. Specifically, optionally, a first application list corresponding to the first working scene may be set, and the first application list may record the name of the application, the function name of the application, etc. When a program in the first application list is started, it is determined that the speaker is currently in the first working scene. Similarly, a second application list corresponding to the second working scene may be set, and the second application list may record the name of the application, the function name of the application, etc. When a program in the second application list is started, it is determined that the speaker is currently in the second working scene.
[0047] For example, the first application list may include the names of music player applications and video player applications in audio playback scenarios, and the names of communication functions of communication applications in call scenarios, etc. The second application list may include the names of ring functions of communication applications, the names of alarm clock applications, and the names of notification functions in memo applications, etc.
[0048] It should be noted that the first application list and the second application list can be automatically updated by the processing device according to the user's applicable situation with the user's authorization. Alternatively, the first application list and the second application list can also be pre-set list data. In addition, the first application list and the second application list can also support user-defined settings. In addition, the way in which the processing device detects the working scene of the speaker can also have other implementation methods, such as a scene detection model, etc., which is not limited in the embodiments of the present application.
[0049] Step 402: When the working scene is the first working scene, control the motor to suppress the vibration generated by the speaker.
[0050] In some embodiments of the present application, the vibration generated by the speaker is a vibration in the first direction. Based on this, the process of the processing device controlling the motor to suppress the vibration generated by the speaker may include steps 4021 to 4023.
[0051] In step 4021, a vibration signal of the electronic device when the speaker is in a sounding state is obtained.
[0052] In an optional implementation, the electronic device is provided with a vibration sensor, and the vibration sensor is used to collect vibration signals of the electronic device. For example, the vibration of the speaker itself usually drives the housing of the electronic device, especially the back cover of the electronic device to vibrate. The vibration sensor can be used to collect vibration signals of the back cover of the electronic device when the speaker is in a sounding state. The processing device can obtain the vibration signal of the electronic device when the speaker is in a sounding state through the vibration sensor.
[0053] In another optional implementation, the electronic device is provided with a target device, and the output data of the target device indicates the vibration amount of the vibration generated by the speaker. The motor control method further includes: acquiring the output data of the target device. Based on this, the process of the processing device acquiring the vibration signal of the electronic device when the speaker is in the sounding state may include: acquiring the output data of the target device, and converting the output data of the target device into the vibration signal of the electronic device.
[0054] Optionally, when the output data is positively correlated with the vibration signal of the electronic device when the speaker is in the sounding state, the output data of the target device can be directly used as the vibration signal of the electronic device. When the output data is negatively correlated with the vibration signal of the electronic device when the speaker is in the sounding state, the reverse signal of the output data of the target device can be used as the vibration signal of the electronic device.
[0055] As an example, the target device may be a microphone, and its output data is audio data collected by the microphone when the speaker vibrates in a sounding state. The audio data is usually positively correlated with the vibration signal of the electronic device, and the processing device may use the audio data collected by the microphone as the vibration signal of the electronic device.
[0056] By way of further example, since the microphone may receive environmental noise, the audio data collected by the microphone may include environmental noise and the vibration sound (i.e., self-sound) of the electronic device when the speaker is in the sounding state. Therefore, the environmental noise in the audio data can be filtered out first, and then the filtered audio data can be used as the vibration signal of the electronic device to effectively ensure the accuracy of the collection of the vibration signal of the electronic device.
[0057] As another example, the target device may be an acceleration sensor, whose output data is acceleration data of the electronic device vibrating when the speaker is in a sounding state detected by the acceleration sensor, that is, the vibration acceleration of the electronic device vibrating when the speaker is in a sounding state. Therefore, the processing device may directly use the acceleration data detected by the acceleration sensor as the vibration signal of the electronic device.
[0058] In step 4022, a first direction signal is generated, and a first excitation signal is generated according to the vibration signal.
[0059] The first direction signal is used to drive the motor to vibrate in the first direction. The first excitation signal is used to drive the motor to vibrate at the frequency and phase of the first excitation signal. That is, the vibration frequency and vibration phase of the motor are the frequency and phase of the first excitation signal respectively.
[0060] For the first excitation signal, when the frequencies of the first excitation signal and the vibration signal are equal, the phases of the first excitation signal and the vibration signal are not equal. It is not difficult to understand that the first excitation signal can be a signal other than the first target signal, and the first target signal and the vibration signal have the same frequency and the same phase.
[0061] like Figure 5 As shown, Figure 5 The waveform L1 of the vibration signal of the electronic device when the speaker is in the sounding state is shown. Obviously, when the first excitation signal is not the first target signal (equal to the frequency and the same phase as the vibration signal), the first excitation signal drives the motor to vibrate, which can offset at least part of the vibration of the electronic device when the speaker is in the sounding state, thereby realizing the suppression effect of the motor on the vibration generated by the speaker.
[0062] Optionally, the process of the processing device generating the first excitation signal according to the vibration signal may include: generating the first excitation signal according to the frequency and phase of the vibration signal. The first excitation signal has a frequency equal to that of the vibration signal and a phase opposite thereto. The vibration waveform generated when the motor vibrates in response to the first excitation signal may have a frequency equal to that of a waveform generated when the electronic device vibrates when the speaker is in a sounding state and a phase opposite thereto.
[0063] Please continue to refer to Figure 5 , Figure 5 The vibration waveform L2 generated when the motor vibrates in the first direction in response to the first excitation signal is shown. The vibration waveform L2 has the same frequency and opposite phase to the waveform of the vibration signal of the electronic device when the speaker is in the sounding state. The waveform of the vibration of the electronic device and the vibration of the motor in the first direction in response to the first excitation signal after superposition can be Figure 5 Waveform L3 after anti-phase cancellation. Obviously, when the motor is excited by the first excitation signal with the same frequency and opposite phase as the vibration signal, the vibration generated by the motor has an anti-phase cancellation effect on the vibration of the electronic device when the speaker is in the sounding state, and the cancellation effect is optimal, which can maximize the suppression effect of the motor on the vibration generated by the speaker and reduce the vibration of the electronic device.
[0064] Further optionally, the process of the processing device generating the first excitation signal according to the vibration signal may further include: filtering the signal except the target frequency range in the vibration signal to obtain a processed vibration signal. Then, the first excitation signal may be generated according to the processed vibration signal.
[0065] Among them, the target frequency range is the vibration frequency range of the motor. By filtering the signals in the vibration signal except the target frequency range, the vibration signal of the electronic device within the vibration frequency range of the motor can be obtained. Determining the first excitation signal based on the vibration signal of the electronic device within the vibration frequency range of the motor is conducive to determining the first excitation signal that can effectively drive the motor, avoiding the first excitation signal determined based on the vibration signal of the electronic device outside the vibration frequency range of the motor, because it exceeds the vibration frequency range of the motor, and cannot effectively drive the motor to vibrate, generating an invalid first excitation signal, thereby improving the accuracy of determining the first excitation signal.
[0066] For example, the target frequency range of the motor is usually below 500 Hz, and the processing device can filter out the signal with a frequency above 500 Hz in the vibration signal to obtain a processed vibration signal. Further, based on the processed vibration signal, a first excitation signal with the same frequency and opposite phase as the vibration signal is generated.
[0067] In step 4023, a first direction signal and a first excitation signal are sent to the motor.
[0068] The first direction signal is used to drive the motor to vibrate in the first direction. The first excitation signal is used to drive the motor to vibrate according to the frequency and phase of the first excitation signal. Optionally, the processing device can send the first direction signal and the first excitation signal to the motor through the driver IC of the motor to drive the motor to vibrate in the first direction according to the frequency and phase of the first excitation signal, thereby suppressing the vibration of the electronic device when the speaker is in the sounding state.
[0069] It should be noted that in some embodiments, when the working scene is the first working scene, the processing device can also control the motor to vibrate in the opposite direction to the vibration of the speaker to suppress the vibration generated by the sound of the speaker. The embodiments of the present application are not limited to this.
[0070] In step 403, when the working scene is the second working scene, the motor is controlled to enhance the vibration generated by the sound of the speaker.
[0071] In some embodiments of the present application, the vibration generated by the speaker is a vibration in the first direction. Based on this, the process of the processing device controlling the motor to enhance the vibration generated by the speaker may include steps 4031 to 4033.
[0072] In step 4031, a vibration signal of the electronic device when the speaker is in a sounding state is obtained.
[0073] In an optional implementation, the electronic device is provided with a vibration sensor, and the vibration sensor is used to collect vibration signals of the electronic device. For example, the vibration of the speaker itself usually drives the housing of the electronic device, especially the back cover of the electronic device to vibrate. The vibration sensor can be used to collect vibration signals of the back cover of the electronic device when the speaker is in a sounding state. The processing device can obtain the vibration signal of the electronic device when the speaker is in a sounding state through the vibration sensor.
[0074] In another optional implementation, the electronic device is provided with a target device, and the output data of the target device indicates the vibration amount of the vibration generated by the speaker. The motor control method further includes: acquiring the output data of the target device. Based on this, the process of the processing device acquiring the vibration signal of the electronic device when the speaker is in the sounding state may include: acquiring the output data of the target device, and converting the output data of the target device into the vibration signal of the electronic device.
[0075] Optionally, when the output data is positively correlated with the vibration signal of the electronic device when the speaker is in the sounding state, the output data of the target device can be directly used as the vibration signal of the electronic device. When the output data is negatively correlated with the vibration signal of the electronic device when the speaker is in the sounding state, the reverse signal of the output data of the target device can be used as the vibration signal of the electronic device.
[0076] As an example, the target device may be a microphone, and its output data is audio data collected by the microphone when the speaker vibrates in a sounding state. The audio data is usually positively correlated with the vibration signal of the electronic device, and the processing device may use the audio data collected by the microphone as the vibration signal of the electronic device.
[0077] By way of further example, since the microphone may receive environmental noise, the audio data collected by the microphone may include environmental noise and the vibration sound (i.e., self-sound) of the electronic device when the speaker is in the sounding state. Therefore, the environmental noise in the audio data can be filtered out first, and then the filtered audio data can be used as the vibration signal of the electronic device to effectively ensure the accuracy of the collection of the vibration signal of the electronic device.
[0078] As another example, the target device may be an acceleration sensor, whose output data is acceleration data of the electronic device vibrating when the speaker is in a sounding state detected by the acceleration sensor, that is, the vibration acceleration of the electronic device vibrating when the speaker is in a sounding state. Therefore, the processing device may directly use the acceleration data detected by the acceleration sensor as the vibration signal of the electronic device.
[0079] In step 4032, a second direction signal is generated, and a second excitation signal is generated according to the vibration signal.
[0080] The second direction signal is used to drive the motor to vibrate in the first direction or the second direction, and the second direction is different from the first direction. The second excitation signal is used to drive the motor to vibrate at the frequency and phase of the second excitation signal. That is, the vibration frequency and vibration phase of the motor are the frequency and phase of the second excitation signal, respectively.
[0081] For the second excitation signal, when the second direction signal controls the motor to vibrate in the first direction, if the frequencies of the second excitation signal and the vibration signal are equal, the second excitation signal and the vibration signal are not opposite in phase. It is not difficult to understand that when the second direction signal controls the motor to vibrate in the first direction, the second excitation signal may be a signal other than the second target signal, and the second target signal and the vibration signal have the same frequency and opposite phase. When the second direction signal controls the motor to vibrate in the second direction, the second excitation signal may be any signal, which can enhance the vibration of the electronic device when the speaker is in the sounding state.
[0082] like Figure 5 As shown, Figure 5The waveform L1 of the vibration signal of the electronic device when the speaker is in the sounding state is shown. Obviously, when the second direction signal controls the motor to vibrate in the first direction, and the second excitation signal is not the second target signal (equal to the frequency of the vibration signal and opposite in phase), the second excitation signal drives the motor to vibrate, which can enhance the vibration of at least part of the electronic device when the speaker is in the sounding state, and realize the enhancement effect of the motor on the vibration generated by the speaker.
[0083] Optionally, the vibration amount corresponding to the resonant frequency of the motor in the second direction is greater than the vibration amount corresponding to the resonant frequency in the first direction. Based on this, the second direction signal generated by the processing device is used to control the motor to vibrate in the second direction. In this way, since the vibration amount of the motor in the second direction is greater than the vibration amount in the first direction. Therefore, the processing device drives the motor to vibrate in the second direction through the second direction signal, which can ensure to a greater extent the enhancement effect of the motor on the vibration generated by the speaker.
[0084] Further optionally, in the case where the second direction signal generated by the processing device is used to control the motor to vibrate in the second direction, the process of the processing device generating the second excitation signal according to the vibration signal may include: generating the second excitation signal according to the frequency and phase of the vibration signal. The second excitation signal has the same frequency and the same phase as the vibration signal. In this way, the vibration waveform generated when the motor vibrates in response to the second excitation signal can have the same frequency and opposite phase as the waveform generated when the electronic device vibrates when the speaker is in the sounding state.
[0085] Please continue to refer to Figure 5 , Figure 5 The vibration waveform L4 generated when the motor vibrates in the second direction in response to the second excitation signal is shown. The vibration waveform L4 has the same frequency and the same phase as the waveform of the vibration signal of the electronic device when the speaker is in the sounding state. The waveform of the vibration of the electronic device and the vibration of the motor in the second direction in response to the second excitation signal after superposition can be Figure 5 Waveform L5 after the anti-phase cancellation. Obviously, the motor generates vibration in the second direction under the stimulation of the second excitation signal with the same frequency and phase as the vibration signal, which can maximize the positive superposition effect on the vibration of the electronic device when the speaker is in the sounding state, and the enhancement effect is optimal, which can maximize the enhancement effect of the motor on the vibration generated by the speaker sound and enhance the vibration of the electronic device.
[0086] Further optionally, the process of the processing device generating the second excitation signal according to the vibration signal may include: filtering the signal except the target frequency range in the vibration signal to obtain a processed vibration signal. Then, the second excitation signal may be generated according to the processed vibration signal.
[0087] Among them, the target frequency range is the vibration frequency range of the motor. By filtering the signals in the vibration signal except the target frequency range, the vibration signal of the electronic device within the vibration frequency range of the motor can be obtained. Determining the second excitation signal based on the vibration signal of the electronic device within the vibration frequency range of the motor is conducive to determining the second excitation signal that can effectively drive the motor, avoiding the second excitation signal determined based on the vibration signal of the electronic device outside the vibration frequency range of the motor, because it exceeds the vibration frequency range of the motor, and cannot effectively drive the motor to vibrate, generating an invalid second excitation signal, thereby improving the accuracy of determining the second excitation signal.
[0088] For example, the target frequency range of the motor is usually below 500 Hz, and the processing device can filter out the signal with a frequency above 500 Hz in the vibration signal to obtain a processed vibration signal. Further, based on the processed vibration signal, a second excitation signal with the same frequency and phase as the vibration signal is generated.
[0089] In step 4033, a second direction signal and a second excitation signal are sent to the motor.
[0090] Optionally, the processing device can send a second direction signal and a second excitation signal to the motor through the motor's driver IC to drive the motor to vibrate in the first direction or the second direction according to the frequency and phase of the second excitation signal to suppress the vibration of the electronic device when the speaker is in the sounding state.
[0091] It should be noted that in some embodiments, when the working scene is the second working scene, the processing device can also control the motor to vibrate in the same direction as the vibration of the speaker to enhance the vibration generated by the sound of the speaker. This embodiment of the present application is not limited to this.
[0092] In an embodiment of the present application, when the speaker is in a sounding state, the working scene of the speaker is detected, and when the working scene of the speaker is the first working scene, the motor is controlled to suppress the vibration generated by the speaker; when the working scene of the speaker is the second working scene, the motor is controlled to enhance the vibration generated by the speaker. In this technical solution, when the speaker is in a sounding state, the motor can be controlled to achieve the suppression or enhancement of the vibration generated by the speaker in different scenes. In addition, since the sound emitted by the speaker is air-transmitted, the vibration generated on the electronic device when the speaker sounds by the motor will not affect the sound propagation quality of the speaker, and the suppression effect can be achieved. For example, in sounding scenes such as making calls and listening to audio, the vibration generated by the speaker sound can be suppressed by controlling the motor to reduce the vibration generated by the electronic device due to the speaker sound, thereby improving the user experience. In sounding scenes such as notification ringtones and alarm clocks, the vibration generated by the speaker sound can be enhanced by controlling the motor to avoid the problem of insufficient vibration and improve the reminder effect.
[0093] In some embodiments of the present application, the electronic device may further include a target device. When the speaker is in a sounding state, the processing device may further obtain output data of the target device. Accordingly, when the working scene is the first working scene, the process of controlling the motor to suppress the vibration caused by the speaker sounding may include: when the output data indicates that the vibration amount is greater than the target vibration threshold and the working scene is the first working scene, controlling the motor to suppress the vibration caused by the speaker sounding.
[0094] When the working scene is the second working scene, the process of controlling the motor to enhance the vibration generated by the sound of the speaker may include: when the output data indicates that the vibration amount is less than or equal to the target vibration threshold and the working scene is the second working scene, controlling the motor to enhance the vibration generated by the sound of the speaker.
[0095] For example, when the speaker is in a sounding state, the processing device first determines whether the vibration amount indicated by the output data is greater than the target vibration threshold.
[0096] If so, the working scene of the speaker can be detected to determine whether the working scene of the speaker is the first working scene. If the working scene of the speaker is the first working scene, the motor is controlled to suppress the vibration caused by the speaker; if the working scene of the speaker is not the first working scene, the step of controlling the motor to suppress the vibration caused by the speaker is not performed.
[0097] If not, the working scene of the speaker can be detected to determine whether the working scene of the speaker is the second working scene. And when the working scene of the speaker is the second working scene, the motor is controlled to enhance the vibration caused by the sound of the speaker; when the working scene of the speaker is not the second working scene, the step of controlling the motor to enhance the vibration caused by the sound of the speaker is not performed. Among them, the implementation process of the processing device controlling the motor to suppress the vibration caused by the sound of the speaker, and the implementation process of controlling the motor to enhance the vibration caused by the sound of the speaker can refer to the above description, and the embodiment of the present application will not be repeated.
[0098] In an optional implementation, the electronic device may further include a microphone, whose output data is audio data collected by the microphone when the electronic device vibrates when the speaker is in a sounding state. Based on this, the motor control method also includes: extracting sound intensity indication data of the audio data. The sound intensity indication data indicates the sound intensity of the audio data. Accordingly, when the working scene is the first working scene, the motor is controlled to suppress the vibration caused by the sound of the speaker, including: when the sound intensity indication data is greater than the target sound intensity threshold, and the working scene is the first working scene, the motor is controlled to suppress the vibration caused by the sound of the speaker. When the working scene is the second working scene, the motor is controlled to enhance the vibration caused by the sound of the speaker, including: when the sound intensity indication data is less than or equal to the target sound intensity threshold, and the working scene is the second working scene, the motor is controlled to enhance the vibration caused by the sound of the speaker.
[0099] Optionally, the sound intensity indication data may be the amplitude or sound pressure level of the audio data. In one example, the sound intensity indication data is the amplitude of the audio data. Accordingly, the target sound intensity threshold corresponds to the amplitude threshold. The processing device may calculate the amplitude of the audio data collected by the microphone according to the definition formula of the amplitude. Then, the magnitude of the amplitude of the audio data and the amplitude threshold is determined, so that when the amplitude is greater than the amplitude threshold, it is determined that the sound intensity indication data is greater than the target sound intensity threshold; when the amplitude is less than or equal to the amplitude threshold, it is determined that the sound intensity indication data is less than or equal to the target sound intensity threshold.
[0100] In another example, the sound intensity indication data is a sound pressure level. Accordingly, the target sound intensity threshold corresponds to a sound pressure level threshold. The processing device can perform root mean square (RMS) calculation processing on the collected audio data to obtain the effective sound pressure of the audio data. Then, according to the definition formula of the effective sound pressure, the benchmark reference sound pressure and the sound pressure level, the sound pressure level of the audio data is calculated. Then, the size of the sound pressure level of the audio data and the sound pressure level threshold is judged, so that when the sound pressure level is greater than the sound pressure level threshold, it is determined that the sound intensity indication data is greater than the target sound intensity threshold; when the sound pressure level is less than or equal to the sound pressure level threshold, it is determined that the sound intensity indication data is less than or equal to the target sound intensity threshold.
[0101] Further optionally, the process of extracting the sound intensity indication data of the audio data by the processing device may include: filtering out the ambient noise in the audio data to obtain the filtered audio data; filtering the signals outside the target frequency range in the filtered audio data to obtain the processed audio data; and extracting the sound intensity indication data of the processed audio data.
[0102] In some embodiments, the processing device may filter out the ambient noise in the audio data by spectral subtraction, least mean square algorithm, etc., to obtain filtered audio data, and the filtered audio data may mainly include the vibration sound of the electronic device when the speaker is in the sounding state. Then, the signal outside the target frequency range in the filtered audio data is filtered to obtain processed audio data, so as to extract the sound intensity indication data of the processed audio data.
[0103] In this way, by filtering out the ambient noise in the audio data, a purer vibration sound (i.e., self-sound) of the electronic device when the speaker is in the sounding state can be effectively obtained. Furthermore, by filtering the signals except the target frequency range in the audio data after filtering out the ambient noise, the audio data of the electronic device within the vibration frequency range of the motor can be obtained. Thus, the sound intensity indication data extracted from the audio data can effectively reflect the vibration magnitude of the electronic device within the vibration frequency range of the motor, and further, the sound intensity indication data can more effectively indicate whether it can be suppressed or enhanced by the motor.
[0104] In an optional implementation, the electronic device may further include an acceleration sensor, whose output data is acceleration data of the electronic device vibrating when the speaker is in a sounding state detected by the acceleration sensor, that is, the vibration acceleration of the electronic device vibrating when the speaker is in a sounding state. Based on this, when the working scene is the first working scene, the motor is controlled to suppress the vibration caused by the speaker making a sound, including: when the acceleration data is greater than the target acceleration threshold, and the working scene is the first working scene, the motor is controlled to suppress the vibration caused by the speaker making a sound. When the working scene is the second working scene, the motor is controlled to enhance the vibration caused by the speaker making a sound, including: when the acceleration data is less than or equal to the target acceleration threshold, and the working scene is the second working scene, the motor is controlled to enhance the vibration caused by the speaker making a sound.
[0105] In some embodiments of the present application, Figure 6As shown, the processing device can detect the vibration magnitude of the electronic device under the influence of the speaker sounding when the speaker is in the sounding state. Thus, when the output data of the target device indicates that the vibration amount is greater than the target vibration threshold, indicating that the vibration of the electronic device is large, it is determined whether the working scene of the speaker is the first working scene. And when the working scene of the speaker is the first working scene, the output data of the target device is subjected to signal analysis processing to obtain the vibration signal of the electronic device when the speaker is in the sounding state. Furthermore, the vibration signal fed back by the electronic device is filtered and phase adjusted to generate a first excitation signal with the same frequency and opposite phase as the vibration signal. The processing device drives the linear dual-axis motor to vibrate according to the first direction signal and the first excitation signal, and returns to the execution step: detecting the vibration magnitude of the electronic device under the influence of the speaker sounding.
[0106] When the output data of the target device indicates that the vibration amount is less than or equal to the target vibration threshold, indicating that the vibration of the electronic device is small, it is determined whether the working scene of the speaker is the second working scene. And when the working scene of the speaker is the second working scene, the output data of the target device is subjected to signal analysis processing to obtain a vibration signal of the electronic device when the speaker is in a sounding state. Furthermore, the vibration signal fed back by the electronic device is filtered and phase adjusted to generate a second excitation signal with the same frequency and phase as the vibration signal. The processing device drives the linear dual-axis motor to vibrate according to the second direction signal and the second excitation signal, and returns to the execution step: detecting the vibration magnitude of the electronic device under the influence of the speaker sounding.
[0107] In an embodiment of the present application, when the speaker is in a sounding state, the working scene of the speaker is detected, and when the working scene of the speaker is the first working scene, the motor is controlled to suppress the vibration generated by the speaker; when the working scene of the speaker is the second working scene, the motor is controlled to enhance the vibration generated by the speaker. In this technical solution, when the speaker is in a sounding state, the motor can be controlled to achieve the suppression or enhancement of the vibration generated by the speaker in different scenes. In addition, since the sound emitted by the speaker is air-transmitted, the vibration generated on the electronic device when the speaker sounds by the motor will not affect the sound propagation quality of the speaker, and the suppression effect can be achieved. For example, in sounding scenes such as making calls and listening to audio, the vibration generated by the speaker sound can be suppressed by controlling the motor to reduce the vibration generated by the electronic device due to the speaker sound, thereby improving the user experience. In sounding scenes such as notification ringtones and alarm clocks, the vibration generated by the speaker sound can be enhanced by controlling the motor to avoid the problem of insufficient vibration and improve the reminder effect.
[0108] In order to facilitate understanding of the technical solution of the present application, the motor control method provided by the embodiment of the present application is further described below with two examples. In the two examples, since the speaker usually generates vibration in the Z-axis direction on the housing of the electronic device when making a sound, the first direction may refer to the Z-axis direction, and the second direction may refer to the X-axis direction.
[0109] In one example, the target device is an acceleration sensor. Figure 7 As shown, the processing device determines whether the speaker is in a sounding state. If not, the process ends. If yes, the acceleration sensor is turned on to detect the vibration amount (i.e., the vibration acceleration amount) of the electronic device when the speaker is in a sounding state. It is determined whether the vibration amount is greater than the target vibration threshold.
[0110] When the vibration amount is greater than the target vibration threshold, the working scene of the speaker is detected to determine whether the working scene of the speaker is the first working scene (a call scene or an audio and video external speaker scene). When the working scene of the speaker is the first working scene, the processing device controls the motor to vibrate in the Z-axis direction to suppress the vibration generated by the speaker's sound; when the working scene of the speaker is not the first working scene, the processing device can return to the execution step of determining whether the speaker is in a sounding state.
[0111] When the vibration amount is less than or equal to the target vibration threshold, the working scene of the speaker is detected to determine whether the working scene of the speaker is the second working scene (ringtone scene or notification audio playback scene). When the working scene of the speaker is the second working scene, the processing device controls the motor to vibrate in the X-axis direction to enhance the vibration generated by the speaker; when the working scene of the speaker is not the second working scene, the processing device can return to the execution step of determining whether the speaker is in a sounding state.
[0112] In another example, the target device is an acceleration sensor. Figure 8 As shown, the processing device determines whether the speaker is in a sounding state. If not, then end. If so, turn on the microphone, obtain the spontaneous sound collected by the microphone when the speaker is in a sounding state, filter out the high-frequency signal in the spontaneous sound, retain the low-frequency signal in the spontaneous sound, and detect the amplitude of the low-frequency signal in the spontaneous sound. Among them, filtering out the high-frequency signal in the spontaneous sound and retaining the low-frequency signal in the spontaneous sound refers to filtering out the environmental noise in the audio data, and filtering the signals outside the target frequency range in the filtered audio data to obtain the processed audio data.
[0113] The processing device determines whether the amplitude is greater than the amplitude threshold. When the amplitude is greater than the amplitude threshold, the working scene of the speaker is detected to determine whether the working scene of the speaker is the first working scene (call scene or audio and video external playback scene). When the working scene of the speaker is the first working scene, the processing device controls the motor to vibrate in the Z-axis direction to suppress the vibration generated by the speaker; when the working scene of the speaker is not the first working scene, the processing device can return to the execution step: determine whether the speaker is in a sounding state.
[0114] When the amplitude is less than or equal to the amplitude threshold, the working scene of the speaker is detected to determine whether the working scene of the speaker is the second working scene (ring tone scene or notification audio playback scene). When the working scene of the speaker is the second working scene, the processing device controls the motor to vibrate in the X-axis direction to enhance the vibration generated by the speaker; when the working scene of the speaker is not the second working scene, the processing device can return to the execution step of determining whether the speaker is in a sounding state.
[0115] In summary, the motor control method provided in the embodiment of the present application, when the speaker is in a sounding state, by detecting the working scene of the speaker, when the working scene of the speaker is the first working scene, the motor is controlled to suppress the vibration generated by the speaker; when the working scene of the speaker is the second working scene, the motor is controlled to enhance the vibration generated by the speaker. In this technical solution, when the speaker is in a sounding state, the motor can be controlled to achieve the suppression or enhancement of the vibration generated by the speaker in different scenes. In addition, since the sound emitted by the speaker is air-transmitted, the vibration generated on the electronic device when the speaker emits sound by the motor will not affect the sound propagation quality of the speaker, and the suppression effect can be achieved. For example, in sounding scenes such as making calls and listening to audio, the vibration generated by the speaker sound can be suppressed by controlling the motor to reduce the vibration generated by the speaker sound in the electronic device, thereby improving the user experience. In sounding scenes such as notification ringtones and alarm clocks, the vibration generated by the speaker sound can be enhanced by controlling the motor to avoid the problem of insufficient vibration and improve the reminder effect.
[0116] The motor control method provided in the embodiment of the present application can be executed by a motor control device. In the embodiment of the present application, the motor control device provided in the embodiment of the present application is described by taking the motor control method executed by the motor control device as an example.
[0117] Please refer to Fig. 9 , which shows a block diagram of a motor control device provided by an embodiment of the present application. The motor control device is applied to electronic equipment. Fig. 9 As shown, the motor control device 900 includes: a detection module 901 and a control module 902 .
[0118] A detection module 901 is used to detect a working scene of the speaker when the speaker is in a sounding state;
[0119] The control module 902 is used to control the motor to suppress the vibration generated by the sound of the speaker when the working scene is the first working scene; and is also used to control the motor to enhance the vibration generated by the sound of the speaker when the working scene is the second working scene, wherein the speaker triggers non-functional vibration in the first working scene and triggers functional vibration in the second working scene.
[0120] Optionally, the vibration generated by the speaker is a vibration in a first direction; and the control module 902 is further configured to:
[0121] Acquire a vibration signal of the electronic device when the speaker is in a sounding state;
[0122] Generate a first direction signal, and generate a first excitation signal according to the vibration signal, wherein when the frequencies of the first excitation signal and the vibration signal are equal, the phases of the first excitation signal and the vibration signal are not equal;
[0123] A first direction signal and a first excitation signal are sent to the motor, the first direction signal is used to drive the motor to vibrate in a first direction, and the first excitation signal is used to drive the motor to vibrate according to the frequency and phase of the first excitation signal.
[0124] refer to Fig.12 , the first vibration waveform S1 is the vibration waveform of the speaker in the sounding state, and the second vibration waveform S2 is the suppression waveform. It can be clearly seen from the following waveforms that as long as the phases of the first vibration waveform S1 and the second vibration waveform S2 are not equal. Then, the vibration of the shaded part between the first vibration waveform S1 and the second vibration waveform S2 is offset. In particular, the suppression effect is better in the latter figure with opposite phases, and the first vibration waveform S1 has a higher degree of offset.
[0125] Optionally, the control module 902 is further configured to generate a first excitation signal according to the frequency and phase of the vibration signal, wherein the first excitation signal has the same frequency as the vibration signal and an opposite phase.
[0126] Optionally, the control module 902 is further used to: filter the signal except the target frequency range in the vibration signal to obtain a processed vibration signal, and the target frequency range is the vibration frequency range of the motor.
[0127] Optionally, the vibration generated by the speaker is a vibration in a first direction; and the control module 902 is further configured to:
[0128] Acquire a vibration signal of the electronic device when the speaker is in a sounding state;
[0129] generating a second direction signal, and generating a second excitation signal according to the vibration signal;
[0130] A second direction signal and a second excitation signal are sent to the motor, wherein when the second direction signal controls the motor to vibrate in the first direction, if the frequencies of the second excitation signal and the vibration signal are equal, the phases of the second excitation signal and the vibration signal are not opposite.
[0131] Optionally, the vibration amount corresponding to the resonant frequency of the motor in the second direction is greater than the vibration amount corresponding to the resonant frequency in the first direction, and the second direction signal is used to control the motor to vibrate in the second direction; the control module 902 is also used to: generate a second excitation signal according to the frequency and phase of the vibration signal, and the second excitation signal has the same frequency and the same phase as the vibration signal.
[0132] Optionally, the control module 902 is further used to: filter the signal except the target frequency range in the vibration signal to obtain a processed vibration signal, and the target frequency range is the vibration frequency range of the motor.
[0133] Optionally, the motor control device 900 further includes:
[0134] an acquisition module, configured to acquire output data of a target device, the output data indicating a vibration amount of vibration generated by a speaker emitting sound;
[0135] The control module 902 is further used to: obtain output data of the target device, and convert the output data of the target device into a vibration signal of the electronic device.
[0136] Optionally, the acquisition module is further used to: acquire output data of the target device, the output data indicating the vibration amount of the vibration generated by the speaker;
[0137] The control module 902 is further used to: when the output data indicates that the vibration amount is greater than the target vibration threshold and the working scene is the first working scene, control the motor to suppress the vibration generated by the speaker;
[0138] The control module 902 is also used to: when the output data indicates that the vibration amount is less than or equal to the target vibration threshold and the working scene is the second working scene, control the motor to enhance the vibration generated by the sound of the speaker.
[0139] Optionally, the motor control device 900 further includes:
[0140] An acquisition module is used to obtain audio data collected by a microphone;
[0141] An extraction module, used to extract sound intensity indication data of the audio data, where the sound intensity indication data indicates the sound intensity of the audio data;
[0142] The control module 902 is also used to control the motor to suppress the vibration caused by the sound of the speaker when the sound intensity indication data is greater than the target sound intensity threshold and the working scene is the first working scene; and is also used to control the motor to enhance the vibration caused by the sound of the speaker when the sound intensity indication data is less than or equal to the target sound intensity threshold and the working scene is the second working scene.
[0143] Optionally, the extraction module is further configured to:
[0144] Filtering out environmental noise in the audio data to obtain filtered audio data;
[0145] Performing filtering processing on the signals outside the target frequency range in the filtered audio data to obtain processed audio data;
[0146] The sound intensity indication data of the processed audio data is extracted.
[0147] Optionally, the motor control device 900 further includes:
[0148] An acquisition module is used to acquire acceleration data detected by an acceleration sensor;
[0149] The control module 902 is also used to control the motor to suppress the vibration caused by the sound of the speaker when the acceleration data is greater than the target acceleration threshold and the working scene is the first working scene; and is also used to control the motor to enhance the vibration caused by the sound of the speaker when the acceleration data is less than or equal to the target acceleration threshold and the working scene is the second working scene.
[0150] In summary, the motor control device provided in the embodiment of the present application, when the speaker is in a sounding state, controls the motor to suppress the vibration generated by the speaker's sound by detecting the working scene of the speaker, when the working scene of the speaker is the first working scene; when the working scene of the speaker is the second working scene, controls the motor to enhance the vibration generated by the speaker's sound. In this technical solution, when the speaker is in a sounding state, the motor can be controlled to achieve the suppression or enhancement of the vibration generated by the speaker's sound in different scenes. In addition, since the sound emitted by the speaker is air-transmitted, the vibration generated on the electronic device when the speaker sounds by the motor will not affect the sound propagation quality of the speaker, and the suppression effect can be achieved. For example, in sounding scenes such as making calls and listening to audio, the vibration generated by the speaker's sound can be suppressed by controlling the motor to reduce the vibration generated by the electronic device due to the speaker's sound, thereby improving the user experience. In sounding scenes such as notification ringtones and alarm clocks, the vibration generated by the speaker's sound can be enhanced by controlling the motor to avoid the problem of insufficient vibration and improve the reminder effect.
[0151] The motor control device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.
[0152] The motor control device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0153] The motor control device provided in the embodiment of the present application can achieve Figure 4 , Figures 6 to 8 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0154] Alternatively, if Fig.10 As shown, an embodiment of the present application further provides an electronic device 1000, including a processor 1001 and a memory 1002, wherein the memory 1002 stores programs or instructions that can be executed on the processor 1001, and when the program or instructions are executed by the processor 1001, the various steps of the above-mentioned motor control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0155] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0156] Fig.11The hardware structure diagram of an electronic device for implementing an embodiment of the present application is shown below. The electronic device 1100 includes but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109, and a processor 1110. The electronic device also includes a motor and a target device, and the data output by the target device when the motor vibrates is used to indicate the vibration amount of the motor.
[0157] Those skilled in the art will appreciate that the electronic device 1100 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.11 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0158] Among them, the processor 1110 is used to detect the working scene of the speaker when the speaker is in a sounding state; and is also used to control the motor to suppress the vibration generated by the sound of the speaker when the working scene is a first working scene; and to control the motor to enhance the vibration generated by the sound of the speaker when the working scene is a second working scene.
[0159] In an embodiment of the present application, when the speaker is in a sounding state, the working scene of the speaker is detected, and when the working scene of the speaker is the first working scene, the motor is controlled to suppress the vibration generated by the speaker; when the working scene of the speaker is the second working scene, the motor is controlled to enhance the vibration generated by the speaker. In this technical solution, when the speaker is in a sounding state, the motor can be controlled to achieve the suppression or enhancement of the vibration generated by the speaker in different scenes. In addition, since the sound emitted by the speaker is air-transmitted, the vibration generated on the electronic device when the speaker sounds by the motor will not affect the sound propagation quality of the speaker, and the suppression effect can be achieved. For example, in sounding scenes such as making calls and listening to audio, the vibration generated by the speaker sound can be suppressed by controlling the motor to reduce the vibration generated by the electronic device due to the speaker sound, thereby improving the user experience. In sounding scenes such as notification ringtones and alarm clocks, the vibration generated by the speaker sound can be enhanced by controlling the motor to avoid the problem of insufficient vibration and improve the reminder effect.
[0160] Optionally, the vibration generated by the speaker is a vibration in a first direction; and the processor 1110 is further configured to:
[0161] Acquire a vibration signal of the electronic device when the speaker is in a sounding state;
[0162] Generate a first direction signal, and generate a first excitation signal according to the vibration signal, wherein, when the frequencies of the first excitation signal and the vibration signal are equal, the phases of the first excitation signal and the vibration signal are not equal;
[0163] A first direction signal and the first excitation signal are sent to the motor, the first direction signal is used to drive the motor to vibrate in the first direction, and the first excitation signal is used to drive the motor to vibrate according to the frequency and phase of the first excitation signal.
[0164] Optionally, the processor 1110 is further configured to: generate the first excitation signal according to the frequency and phase of the vibration signal, wherein the first excitation signal has the same frequency as the vibration signal and an opposite phase.
[0165] Optionally, the processor 1110 is further used to: filter the signal of the vibration signal except the target frequency range to obtain the processed vibration signal, and the target frequency range is the vibration frequency range of the motor.
[0166] Optionally, the vibration generated by the speaker is a vibration in a first direction; and the processor 1110 is further configured to:
[0167] Acquire a vibration signal of the electronic device when the speaker is in a sounding state;
[0168] generating a second direction signal, and generating a second excitation signal according to the vibration signal;
[0169] The second direction signal and the second excitation signal are sent to the motor, wherein, when the second direction signal controls the motor to vibrate in the first direction, if the frequencies of the second excitation signal and the vibration signal are equal, the phases of the second excitation signal and the vibration signal are not opposite.
[0170] Optionally, the vibration amount corresponding to the resonant frequency of the motor in the second direction is greater than the vibration amount corresponding to the resonant frequency in the first direction, and the second direction signal is used to control the motor to vibrate in the second direction; the processor 1110 is further used to:
[0171] The second excitation signal is generated according to the frequency and phase of the vibration signal, wherein the second excitation signal has the same frequency and the same phase as the vibration signal.
[0172] Optionally, the processor 1110 is further used to: filter the signal of the vibration signal except the target frequency range to obtain the processed vibration signal, and the target frequency range is the vibration frequency range of the motor.
[0173] Optionally, the processor 1110 is further configured to: obtain output data of a target device, wherein the output data indicates a vibration amount of vibration generated by the speaker;
[0174] The processor 1110 is further configured to obtain output data of the target device and convert the output data of the target device into a vibration signal of the electronic device.
[0175] Optionally, the processor 1110 is further configured to: obtain output data of a target device, wherein the output data indicates a vibration amount of vibration generated by the speaker;
[0176] Optionally, the processor 1110 is further used to: when the output data indicates that the vibration amount is greater than a target vibration threshold and the working scene is a first working scene, control the motor to suppress the vibration generated by the sound of the speaker; when the output data indicates that the vibration amount is less than or equal to the target vibration threshold and the working scene is a second working scene, control the motor to enhance the vibration generated by the sound of the speaker.
[0177] Optionally, the target device is a microphone, and the output data is audio data collected by the microphone; the processor 1110 is further configured to: extract sound intensity indication data of the audio data, wherein the sound intensity indication data indicates the sound intensity of the audio data;
[0178] The output data indicating that the vibration amount is greater than the target vibration threshold includes: the sound intensity indication data is greater than the sound intensity indication data corresponding to the target vibration threshold; the output data indicating that the vibration amount is less than or equal to the target vibration threshold includes: the sound intensity indication data is less than or equal to the sound intensity indication data corresponding to the target vibration threshold.
[0179] Optionally, the processor 1110 is further configured to:
[0180] Filtering out environmental noise in the audio data to obtain the filtered audio data;
[0181] Performing filtering processing on the signals outside the target frequency range in the filtered audio data to obtain the processed audio data;
[0182] Extracting sound intensity indication data of the processed audio data.
[0183] Optionally, the target device is an acceleration sensor, and the output data is acceleration data detected by the acceleration sensor; the output data indicating that the vibration amount is greater than a target vibration threshold includes: the acceleration data is greater than a target acceleration threshold corresponding to the target vibration threshold; the output data indicating that the vibration amount is less than or equal to the target vibration threshold includes: the acceleration data is less than or equal to the target acceleration threshold corresponding to the target vibration threshold.
[0184] In an embodiment of the present application, when the speaker is in a sounding state, the working scene of the speaker is detected, and when the working scene of the speaker is the first working scene, the motor is controlled to suppress the vibration generated by the speaker; when the working scene of the speaker is the second working scene, the motor is controlled to enhance the vibration generated by the speaker. In this technical solution, when the speaker is in a sounding state, the motor can be controlled to achieve the suppression or enhancement of the vibration generated by the speaker in different scenes. In addition, since the sound emitted by the speaker is air-transmitted, the vibration generated on the electronic device when the speaker sounds by the motor will not affect the sound propagation quality of the speaker, and the suppression effect can be achieved. For example, in sounding scenes such as making calls and listening to audio, the vibration generated by the speaker sound can be suppressed by controlling the motor to reduce the vibration generated by the electronic device due to the speaker sound, thereby improving the user experience. In sounding scenes such as notification ringtones and alarm clocks, the vibration generated by the speaker sound can be enhanced by controlling the motor to avoid the problem of insufficient vibration and improve the reminder effect.
[0185] It should be understood that in the embodiment of the present application, the input unit 1104 may include a graphics processor (Graphics Processing Unit, GPU) 11041 and a microphone 11042, and the graphics processor 11041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1106 may include a display panel 11061, and the display panel 11061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1107 includes a touch panel 11071 and at least one of other input devices 11072. The touch panel 11071 is also called a touch screen. The touch panel 11071 may include two parts: a touch detection device and a touch controller. Other input devices 11072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0186] The memory 1109 can be used to store software programs and various data. The memory 1109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1109 may include a volatile memory or a non-volatile memory, or the memory 1109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0187] The processor 1110 may include one or more processing units; optionally, the processor 1110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1110.
[0188] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned motor control method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0189] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0190] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned motor control method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0191] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0192] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned motor control method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0193] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0194] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0195] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A motor control method, characterized in that: The method comprises: When the speaker is in a sounding state, detecting a working scene of the speaker; When the working scene is the first working scene, controlling the motor to suppress vibration generated by the sound of the speaker; When the working scene is the second working scene, the motor is controlled to enhance the vibration generated by the sound of the speaker, wherein the speaker triggers non-functional vibration in the first working scene and triggers functional vibration in the second working scene.
2. The method according to claim 1, characterized in that The vibration generated by the speaker is a vibration in a first direction; and the control motor suppresses the vibration generated by the speaker, including: Acquire a vibration signal of the electronic device when the speaker is in a sounding state; Generate a first direction signal, and generate a first excitation signal according to the vibration signal, wherein, when the frequencies of the first excitation signal and the vibration signal are equal, the phases of the first excitation signal and the vibration signal are not equal; The first direction signal and the first excitation signal are sent to the motor, the first direction signal is used to drive the motor to vibrate in the first direction, and the first excitation signal is used to drive the motor to vibrate according to the frequency and phase of the first excitation signal.
3. The method according to claim 2, characterized in that The step of generating a first excitation signal according to the vibration signal comprises: The first excitation signal is generated according to the frequency and phase of the vibration signal, wherein the first excitation signal has the same frequency and opposite phase to the vibration signal.
4. The method according to claim 2 or 3, characterized in that: The step of generating a first excitation signal according to the vibration signal comprises: The signal of the vibration signal except the target frequency range is filtered to obtain the processed vibration signal, and the target frequency range is the vibration frequency range of the motor.
5. The method according to claim 1, characterized in that The vibration generated by the speaker is a vibration in a first direction; and controlling the motor to enhance the vibration generated by the speaker comprises: Acquire a vibration signal of the electronic device when the speaker is in a sounding state; generating a second direction signal, and generating a second excitation signal according to the vibration signal; The second direction signal and the second excitation signal are sent to the motor, wherein, when the second direction signal controls the motor to vibrate in the first direction, if the frequencies of the second excitation signal and the vibration signal are equal, the phases of the second excitation signal and the vibration signal are not opposite.
6. The method according to claim 5, characterized in that The vibration amount corresponding to the resonant frequency of the motor in the second direction is greater than the vibration amount corresponding to the resonant frequency in the first direction, and the second direction signal is used to control the motor to vibrate in the second direction; The step of generating a second excitation signal according to the vibration signal comprises: The second excitation signal is generated according to the frequency and phase of the vibration signal, wherein the second excitation signal has the same frequency and the same phase as the vibration signal.
7. The method according to claim 5 or 6, characterized in that: The step of generating a second excitation signal according to the vibration signal comprises: The signal of the vibration signal except the target frequency range is filtered to obtain the processed vibration signal, and the target frequency range is the vibration frequency range of the motor.
8. The method according to claim 2 or 5, characterized in that: The method further includes: acquiring output data of a target device, the output data indicating a vibration amount of vibration generated by sound emission of the speaker; The obtaining of the vibration signal of the electronic device when the speaker is in a sounding state includes: obtaining output data of the target device, and converting the output data of the target device into the vibration signal of the electronic device.
9. The method according to claim 1, characterized in that: The method further includes: acquiring output data of a target device, the output data indicating a vibration amount of vibration generated by sound emission of the speaker; The step of controlling the motor to suppress the vibration caused by the speaker when the working scene is the first working scene comprises: when the output data indicates that the vibration amount is greater than a target vibration threshold and the working scene is the first working scene, controlling the motor to suppress the vibration caused by the speaker; The method of controlling the motor to enhance the vibration generated by the sound of the speaker when the working scene is the second working scene comprises: when the output data indicates that the vibration amount is less than or equal to the target vibration threshold and the working scene is the second working scene, controlling the motor to enhance the vibration generated by the sound of the speaker.
10. The method according to claim 1, characterized in that The method further comprises: Get the audio data collected by the microphone; Extracting sound intensity indication data of the audio data, wherein the sound intensity indication data indicates the sound intensity of the audio data; The controlling the motor to suppress the vibration caused by the sound of the speaker when the working scene is the first working scene includes: when the sound intensity indication data is greater than the target sound intensity threshold and the working scene is the first working scene, controlling the motor to suppress the vibration caused by the sound of the speaker; The method of controlling the motor to enhance the vibration generated by the sound of the speaker when the working scene is the second working scene comprises: when the sound intensity indication data is less than or equal to the target sound intensity threshold and the working scene is the second working scene, controlling the motor to enhance the vibration generated by the sound of the speaker.
11. The method according to claim 10, characterized in that The step of extracting the sound intensity indication data of the audio data comprises: Filtering out environmental noise in the audio data to obtain the filtered audio data; Performing filtering processing on the signals outside the target frequency range in the filtered audio data to obtain the processed audio data; Extracting sound intensity indication data of the processed audio data.
12. The method according to claim 1, characterized in that The method further comprises: acquiring acceleration data detected by the acceleration sensor; When the working scene is the first working scene, controlling the motor to suppress the vibration caused by the sound of the speaker includes: when the acceleration data is greater than the target acceleration threshold and the working scene is the first working scene, controlling the motor to suppress the vibration caused by the sound of the speaker; The method of controlling the motor to enhance the vibration generated by the sound of the speaker when the working scene is the second working scene comprises: when the acceleration data is less than or equal to the target acceleration threshold and the working scene is the second working scene, controlling the motor to enhance the vibration generated by the sound of the speaker.
13. A motor control device, characterized in that: The device comprises: A detection module, used for detecting a working scene of the speaker when the speaker is in a sounding state; The control module is used to control the motor to suppress the vibration generated by the sound of the speaker when the working scene is a first working scene; and is also used to control the motor to enhance the vibration generated by the sound of the speaker when the working scene is a second working scene, wherein the speaker triggers non-functional vibration in the first working scene and triggers functional vibration in the second working scene.
14. An electronic device, characterized in that: It includes a motor, a target device, a processor and a memory; the data output by the target device when the motor vibrates is used to indicate the vibration amount of the motor, and the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the motor control method as described in any one of claims 1 to 12 are implemented.
15. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the motor control method according to any one of claims 1 to 12 are implemented.