A method, apparatus, device and storage medium for determining a resonant frequency
By detecting the frequency and frequency deviation mapping relationship of the vibration component, the resonant frequency of the motor can be quickly and accurately determined, which solves the problems of low detection efficiency and low accuracy in the existing technology, and improves the vibration effect and tactile experience.
Patent Information
- Application Number
- CN202310084895.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-16
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2043-01-16
Smart Images

Figure CN116124279B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of touch, and relates to a method and device for determining a resonant frequency, an apparatus, and a storage medium. BACKGROUND
[0002] There are two methods for obtaining the real resonant frequency of a motor: motor detection device detection and chip detection. When the resonant frequency is detected by the motor detection device, a sweep signal of a certain frequency range is given to the motor, and the driving frequency corresponding to the maximum vibration, maximum displacement, maximum vibration speed, etc. that the motor can reach when vibrating is taken as the resonant frequency of the motor. This scheme can obtain the most real resonant frequency of the motor, but requires more external devices, is inconvenient for use in small electronic devices, and has low detection efficiency. When the resonant frequency is detected by the chip, the chip has a small size and can be applied to small electronic devices, but the detection accuracy error of the resonant frequency is high, and the accurate resonant frequency cannot be detected. SUMMARY
[0003] The embodiments of the present application provide a method and device for determining a resonant frequency, an apparatus, and a storage medium, which can efficiently and accurately determine the resonant frequency of a motor.
[0004] The technical scheme of the embodiments of the present application is as follows:
[0005] In a first aspect, the embodiments of the present application provide a method for determining a resonant frequency, and the method comprises the following steps:
[0006] detecting a resonant frequency of a first vibration component under the driving of a first excitation signal to obtain a first resonant frequency;
[0007] obtaining a first frequency offset based on the first resonant frequency and a first driving frequency of the first excitation signal;
[0008] mapping the first frequency offset to a second frequency offset based on a target mapping relationship, the target mapping relationship being a mapping relationship between an actual frequency offset and a detected frequency offset;
[0009] compensating the first driving frequency by the second frequency offset to obtain a target resonant frequency, the target resonant frequency being an actual resonant frequency of the first vibration component.
[0010] In a second aspect, the embodiments of the present application provide a device for determining a resonant frequency, and the device comprises:
[0011] a detection module configured to detect a resonant frequency of a first vibration component under the driving of a first excitation signal to obtain a first resonant frequency;
[0012] The first determining module is used to obtain the first frequency offset based on the first resonant frequency and the first driving frequency of the first excitation signal;
[0013] The mapping module is used to map the first frequency offset to the second frequency offset based on a target mapping relationship, wherein the target mapping relationship is the mapping relationship between the actual frequency offset and the detected frequency offset;
[0014] The second determining module is used to compensate the first driving frequency by the second frequency deviation to obtain the target resonant frequency, wherein the target resonant frequency is the actual resonant frequency of the first vibration component.
[0015] Thirdly, embodiments of this application provide an electronic device, including a processor, at least two vibration components, and a computer program stored in a memory and executable on the processor. When the processor executes the computer program, it implements the steps in the method for determining the resonant frequency described above.
[0016] Fourthly, embodiments of this application provide a computer-readable storage medium, i.e., a storage medium, on which a computer program is stored, which, when executed by a processor, implements the above-described method for determining the resonant frequency.
[0017] The method, apparatus, and device for determining the resonant frequency provided in this application embodiment detect the resonant frequency of a first vibration component under the drive of a first excitation signal to obtain a first resonant frequency; based on the first resonant frequency and a first drive frequency of the first excitation signal, a first frequency offset is obtained; the first frequency offset is mapped to a second frequency offset based on a target mapping relationship, wherein the target mapping relationship is the mapping relationship between the actual frequency offset and the detected frequency offset; the first drive frequency is compensated by the second frequency offset to obtain a target resonant frequency, wherein the target resonant frequency is the actual resonant frequency of the first vibration component; thereby, when detecting the resonant frequency of the vibration component, the frequency offset between the drive frequency of the excitation signal driving the vibration component and the detected resonant frequency of the vibration component is mapped based on the frequency offset between the drive frequency of the excitation signal driving the vibration component and the actual resonant frequency, and the drive frequency of the excitation signal is compensated by the mapped frequency offset to obtain the actual resonant frequency of the vibration component, which can quickly and accurately determine the resonant frequency of the vibration component without relying on a frequency sweep signal within a certain frequency range. Attached Figure Description
[0018] Figure 1 This is an optional structural diagram of the electronic device provided in the embodiments of this application. Figure One ;
[0019] Figure 2 This is an optional structural diagram of the electronic device provided in the embodiments of this application. Figure Two ;
[0020] Figure 3 This is an optional flowchart illustrating the method for determining the resonant frequency provided in the embodiments of this application. Figure One ;
[0021] Figure 4A This is an example of an optional relationship between the first frequency offset and the second frequency offset provided in the embodiments of this application. Figure One ;
[0022] Figure 4B This is an example of an optional relationship between the first frequency offset and the second frequency offset provided in the embodiments of this application. Figure Two ;
[0023] Figure 5 This is a schematic diagram of the set of resonant frequencies provided in the embodiments of this application;
[0024] Figure 6 This is an optional flowchart illustrating the method for determining the resonant frequency provided in the embodiments of this application. Figure Two ;
[0025] Figure 7 This is an optional flowchart illustrating the method for determining the resonant frequency provided in the embodiments of this application. Figure Three ;
[0026] Figure 8 This is an optional illustration of the resonant frequency detection effect provided in the embodiments of this application. Figure One ;
[0027] Figure 9 This is an optional illustration of the resonant frequency detection effect provided in the embodiments of this application. Figure Two ;
[0028] Figure 10 This is an optional structural schematic diagram of the device for determining the resonant frequency provided in an embodiment of this application;
[0029] Figure 11 This is an optional structural diagram of the electronic device provided in the embodiments of this application. Figure Three . Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] The embodiments of the present application can provide a method and device for determining a resonant frequency, an electronic device and a storage medium. In practical applications, the method for determining a resonant frequency can be implemented by a device for determining a resonant frequency, and each functional entity in the device for determining a resonant frequency can be implemented by hardware resources of an electronic device, such as a processor and other computing resources, and communication resources (such as resources for supporting various communication modes, such as optical cables and cellular networks).
[0032] Of course, the embodiments of the present application are not limited to methods and hardware, and can also be implemented in various ways, for example, as a storage medium (storing instructions for executing the method for determining a resonant frequency provided by the embodiments of the present application).
[0033] The embodiments of the method, device, electronic device and storage medium for determining a resonant frequency provided by the embodiments of the present application will be described below. The method for determining a resonant frequency provided by the embodiments of the present application can be applied to electronic devices with or without a vibration component.
[0034] In an example, an electronic device, as shown in Figure 1 includes a vibration component 101, which can be a motor, such as a linear motor. When the driving frequency of the excitation signal driving the vibration component is the same as the resonant frequency of the vibration component, the vibration effect of the vibration component is the strongest, i.e., the vibration amount of the vibration component reaches the maximum.
[0035] In an example, an electronic device, as shown in Figure 2 includes a vibration component 101 and a detection component 102, which can detect the resonant frequency of the vibration component, but there is an error between the value of the resonant frequency detected by the detection component 102 and the actual resonant frequency of the vibration component, i.e., the true resonant frequency.
[0036] Figure 3 The implementation flowchart of the method for determining a resonant frequency according to the embodiments of the present application is shown in Figure 3 , which includes the following steps:
[0037] S301, the electronic device detects the resonant frequency of the first vibration component under the driving of the first excitation signal to obtain a first resonant frequency.
[0038] When the electronic device needs to detect the resonant frequency of the first vibration component, the generation of the first excitation signal is triggered, and the first vibration component is driven to vibrate by the first excitation signal. During the action of the first excitation signal on the first vibration component, the electronic device detects the resonant frequency of the first vibration component by a detection device, and the detection result is denoted as the first vibration frequency. There is a possibility that the first vibration frequency has a large error with the actual resonant frequency of the first vibration component.
[0039] In the embodiments of the present application, the first resonance frequency can be denoted as f' test .
[0040] In actual applications, the electronic device can be provided with at least one vibration component, and the first vibration component is any vibration component provided in the electronic device.
[0041] In S302, the electronic device obtains a first frequency offset based on the first resonance frequency and a first driving frequency of the first excitation signal.
[0042] The electronic device obtains the driving frequency of the first excitation signal, i.e., the first driving frequency, and determines the first frequency offset based on the first driving frequency and the first vibration frequency. The electronic device can directly determine the first frequency offset based on the first resonance frequency and the first driving frequency, or determine the first frequency offset through a set frequency offset algorithm.
[0043] Taking the electronic device directly determining the first frequency offset based on the first resonance frequency and the first driving frequency as an example, the implementation of S302 obtaining the first frequency offset based on the first resonance frequency and the first driving frequency of the first excitation signal includes: determining the frequency difference between the first resonance frequency and the first driving frequency as the first frequency offset.
[0044] At this time, the first frequency offset Δf'1 is as shown in formula (1), which is the frequency difference between the first resonance frequency and the first driving frequency of the first excitation signal:
[0045] Δf'1=f' test -f' drive Formula (1).
[0046] Taking the electronic device determining the first frequency offset through a set frequency offset algorithm as an example, the electronic device takes the frequency difference between the first resonance frequency and the first driving frequency as a parameter to calculate the first frequency offset.
[0047] At this time, the first frequency offset Δf'1 is as shown in formula (2), and the frequency difference between the first resonance frequency and the first driving frequency of the first excitation signal is a parameter of a frequency offset conversion function:
[0048] Δf'1=g(f' test -f' drive ) Formula (2);
[0049] Wherein, g(·) is a frequency offset conversion function corresponding to the frequency offset algorithm.
[0050] The frequency offset conversion function is a function of determining the first frequency offset by taking the frequency difference between the first resonance frequency and the first driving frequency of the first excitation signal as a known parameter, which can be a polynomial of one, two or three.
[0051] In an example, the frequency offset conversion function can be represented as formula (3):
[0052] g(x) = ax + b formula (3);
[0053] a and b are respectively coefficients in the frequency offset conversion function.
[0054] In the embodiments of the present application, the determination manner of the electronic device for determining the first frequency offset based on the first resonance frequency and the first driving frequency is not limited.
[0055] S303, the electronic device maps the first frequency offset to a second frequency offset based on a target mapping relationship, and the target mapping relationship is a mapping relationship between an actual frequency offset and a detected frequency offset.
[0056] In the embodiments of the present application, the target mapping relationship is a relationship between the first frequency offset and the second frequency offset, wherein the first frequency offset is a frequency offset determined based on a detection result of the resonance frequency of the vibration assembly, i.e., the first resonance frequency, and the second frequency offset is a frequency offset determined based on the actual resonance frequency of the vibration assembly, i.e., the target resonance frequency, mapped from the first frequency offset.
[0057] The target mapping relationship, the first frequency offset and the second frequency offset Δf'2 can be represented as formula (4):
[0058] Δf'2 = f(Δf'1) formula (4);
[0059] Wherein, f(·) is the target mapping relationship.
[0060] In the embodiments of the present application, the target mapping relationship includes but is not limited to matrix relationship, Taylor equation, differential and integral, etc., and can also be map table search, etc.
[0061] It can be understood that the target mapping relationship can be established by the electronic device itself, or can be obtained from other electronic devices.
[0062] In the case that the target mapping relationship is established by the electronic device itself, the establishment manner of the electronic device for establishing the target mapping relationship can include but is not limited to iteration, fitting, regression, neural network, etc.
[0063] S304, the electronic device compensates the first driving frequency through the second frequency offset to obtain a target resonance frequency, and the target resonance frequency is the actual resonance frequency of the first vibration assembly.
[0064] In the case that the electronic device determines Δf'2, the electronic device compensates the first driving frequency through the second frequency offset based on the compensation relationship between the second frequency offset and the first driving frequency and the second resonance frequency, and obtains the target resonance frequency. The target resonance frequency is determined based on the compensation relationship between the second frequency offset and the first driving frequency and the second resonance frequency. Figure 3The method shown for determining the resonant frequency determines the actual resonant frequency of the first vibrating component.
[0065] In this embodiment, the relationship between the second frequency offset, the target resonant frequency, and the first driving frequency is the same as the relationship between the first frequency offset, the first resonant frequency, and the first driving frequency.
[0066] In one example, the first frequency offset Δf'1 is the frequency difference f' between the first resonant frequency and the first driving frequency. test -f' drive Then the second frequency deviation is the target resonant frequency f' of the first vibration component as shown in formula (5). real With the first driving frequency f' drive Frequency difference between them:
[0067] Δf'2=f' real -f' drive Formula (5).
[0068] Based on formula (5), the target resonant frequency can be expressed as formula (6):
[0069] f' real =Δf'2+f' drive Formula (6).
[0070] In one example, the first frequency deviation Δf'1 is expressed by formula (2), then the second frequency deviation and the target resonant frequency f' of the first vibration component are... real With the first driving frequency f' drive The relationship between them can be expressed as formula (7):
[0071] Δf'2=g(f' real -f' drive ) formula (7).
[0072] Based on formula (7), the target resonant frequency can be expressed as formula (8):
[0073] f' real = g'(Δf'2)+f' drive Formula (8).
[0074] Here, g'(·) is the inverse function of g(·).
[0075] In this embodiment of the application, when the target mapping relationship is a function expression, S302 and S303 can be represented by a mapping function. At this time, the mapping function is a function expression of the first driving frequency and the first frequency offset. By inputting the first excitation signal and the first frequency offset into the mapping function, the target resonant frequency after the first driving frequency is compensated by the second frequency offset mapped by the first frequency offset can be obtained.
[0076] The method provided in the embodiments of the present application comprises the following steps. Figure 4A As shown in the method, the first frequency offset 401 is determined based on the first resonance frequency and the first driving frequency of the first excitation signal, and there is a target mapping relationship 403 between the first frequency offset 401 and the second frequency offset, so that the second frequency offset 402 is determined through the target mapping relationship 403 in the case that the first frequency offset 401 is known, and the first driving frequency is compensated through the second frequency offset 402 to obtain the target resonance frequency of the first vibration component.
[0077] The method for determining the resonance frequency provided in the embodiments of the present application comprises the following steps: detecting the resonance frequency of the first vibration component under the driving of the first excitation signal to obtain the first resonance frequency; obtaining the first frequency offset based on the first resonance frequency and the first driving frequency of the first excitation signal; mapping the first frequency offset to the second frequency offset based on a target mapping relationship, the target mapping relationship being a mapping relationship between the actual frequency offset and the detected frequency offset; and compensating the first driving frequency through the second frequency offset by the electronic device, the target resonance frequency being the actual resonance frequency of the first vibration component. Thus, when the resonance frequency of the vibration component is detected, the frequency offset between the driving frequency of the excitation signal and the actual resonance frequency is mapped based on the frequency offset between the driving frequency of the excitation signal and the detected resonance frequency of the vibration component, and the driving frequency of the excitation signal is compensated through the mapped frequency offset to obtain the actual resonance frequency of the vibration component, which can quickly and accurately determine the resonance frequency of the vibration component without the aid of a sweep signal in a certain frequency range.
[0078] In some embodiments, before S302, the electronic device further implements the following processing: obtaining a signal parameter of the first excitation signal; and adjusting the first resonance frequency based on the signal parameter of the first excitation signal.
[0079] In the embodiments of the present application, the electronic device further obtains the signal parameter of the first excitation signal before determining the first frequency offset based on the first resonance frequency, adjusts the first resonance frequency through the signal parameter of the first excitation signal to obtain the adjusted first resonance frequency, and then determines the first frequency offset according to the adjusted resonance frequency and the first driving frequency.
[0080] The signal parameter of the first excitation signal can comprise the signal type, the time length, the amplitude, and the like, wherein the signal type comprises the parameters of the waveform of the excitation signal such as the sine wave, the square wave, the triangular wave, the round-corner square wave, and the mixed waveform signal of different types, and the time length can be understood as the time length during which the first excitation signal acts on the first vibration component.
[0081] The manner in which the signal parameter of the first excitation signal adjusts the first resonance frequency can comprise but is not limited to the following manners:
[0082] A1, mapping the signal parameter of the first excitation signal to a first adjustment coefficient, and adjusting the first resonance frequency by the first adjustment coefficient;
[0083] A2, adjusting the first resonance frequency by the first excitation signal as a first adjustment coefficient.
[0084] For mode A1, the signal parameter of the first excitation signal is converted into a first adjustment coefficient by a first conversion relationship, and the first resonance frequency is adjusted by the first adjustment coefficient.
[0085] In an example, the signal parameter of the first excitation signal includes amplitude 1, duration 1 and signal type A, and amplitude 1, duration 1 and signal type A are mapped to a first adjustment coefficient with a value of a by a first conversion relationship. At this time, the first resonance frequency with a value of b is adjusted by a to obtain the adjusted first resonance frequency with a value of a*b.
[0086] The form of the first conversion relationship can be a function, a table, etc. The form of the first conversion relationship is not limited in the embodiments of the present application.
[0087] For mode A2, the signal parameter of the first excitation signal directly acts on the first resonance frequency, thereby adjusting the first resonance frequency.
[0088] In the case where the signal parameter of the first excitation signal includes multiple parameters, the first adjustment coefficients corresponding to each signal parameter can be weighted and then applied to the first resonance frequency.
[0089] In the embodiments of the present application, in the process of determining the resonance frequency of the first vibration component, the influence of the first excitation signal on the detection result of the resonance frequency detected by the detection device is considered, so that the detection result of the resonance frequency detected by the detection device, i.e. the first resonance frequency, is adjusted by the signal parameter of the first excitation signal, thereby eliminating the influence of the first excitation signal on the detection result of the resonance frequency detected by the detection device, and improving the prediction accuracy of the resonance frequency of the first vibration component.
[0090] In some embodiments, before S302, the electronic device further implements the following processing:
[0091] Obtain a first environmental parameter, which is an environmental parameter of a first detection environment for detecting the resonance frequency of the first vibration component under the driving of the first excitation signal; and adjust the first resonance frequency based on the first environmental parameter.
[0092] In the embodiments of the present application, the electronic device further obtains an environment parameter, i.e., a first environment parameter, of a detection environment of the electronic device detecting the first resonant frequency before determining the first frequency offset according to the first resonant frequency, adjusts the first resonant frequency through the first environment parameter, obtains an adjusted first resonant frequency, and then determines the first frequency offset according to the adjusted resonant frequency and the first driving frequency.
[0093] The first environment parameter can include temperature, humidity, fixed type and the like, wherein the fixed type can be understood as the type of a device for fixing the vibration assembly, i.e., a type of a tool for fixing the vibration assembly, including a mobile phone, a fixed mold and the like.
[0094] The manner in which the first environment parameter adjusts the first resonant frequency can include but is not limited to the following manners.
[0095] In manner B1, the first environment parameter is mapped to a second adjustment coefficient, and the first resonant frequency is adjusted through the second adjustment coefficient.
[0096] In manner B2, the first environment parameter and the second adjustment coefficient are used to adjust the first resonant frequency.
[0097] For manner B1, the first environment parameter is converted into the second adjustment coefficient through a second conversion relationship, and the first resonant frequency is adjusted through the second adjustment coefficient.
[0098] In an example, the first environment parameter includes temperature 1 and humidity 2, the temperature 1 and the humidity 2 are mapped to a second adjustment coefficient with a value of c through a second conversion relationship, at this time, the first resonant frequency with a value of b is adjusted through c to obtain an adjusted first resonant frequency with a value of c*b.
[0099] The form of the second conversion relationship can be a function, a table or the like, and the embodiments of the present application do not limit the form of the second conversion relationship.
[0100] For manner B2, the first environment parameter is directly used to adjust the first resonant frequency.
[0101] In the case where the first environment parameter includes multiple parameters, the second adjustment coefficients corresponding to the parameters in the first environment parameter can be weighted and then used to adjust the first resonant frequency.
[0102] In the embodiments of the present application, in the process of determining the resonant frequency of the first vibration assembly, the influence of the detection environment on the detection result of the resonant frequency detected by the detection device is considered, the first resonant frequency detected by the detection device is adjusted through the parameters of the detection environment in the first environment parameter set, the influence of the detection environment on the detection result of the resonant frequency detected by the detection device is eliminated, and the prediction accuracy of the resonant frequency of the first vibration assembly is improved.
[0103] In the embodiments of the present application, Figure 4B As shown, the signal parameter of the first excitation signal or / and the environmental parameter of the first detection environment acts on the first resonant frequency to adjust the first resonant frequency, and the first frequency offset 401 is determined by the adjusted first resonant frequency and the first driving frequency.
[0104] In actual application, before the first frequency offset is determined based on the first resonant frequency, one or both of the first signal parameter of the first excitation signal and the first environmental parameter can be used to adjust the first resonant frequency. If the first resonant frequency is adjusted by the first signal parameter and the first environmental parameter, a second adjusted first resonant frequency is obtained, and the first frequency offset is determined by the second adjusted first resonant frequency, wherein the adjustment order of the first signal parameter and the first environmental parameter is not limited. For example, the first resonant frequency is first adjusted based on the first signal parameter to obtain a first adjusted first resonant frequency, and the first adjusted first resonant frequency is adjusted based on the first environmental parameter to obtain a second adjusted first resonant frequency. For another example, the first resonant frequency is first adjusted based on the first environmental parameter to obtain a first adjusted first resonant frequency, and the first adjusted first resonant frequency is adjusted based on the first signal parameter to obtain a second adjusted first resonant frequency.
[0105] In the embodiments of the present application, the target mapping relationship can be established by the electronic device itself or obtained from other devices. In the case of establishing the target mapping relationship by the electronic device itself, the electronic device further implements the following processing:
[0106] For each second vibration component in the at least one second vibration component, the second resonant frequency of the second vibration component under the driving condition of each second excitation signal in the at least one second excitation signal is obtained, and a first correlation relationship between the second resonant frequency and the second driving frequency of the corresponding second excitation signal and the third resonant frequency of the second vibration component is established; the third resonant frequency is the actual resonant frequency of the corresponding second vibration component; based on the first correlation relationship corresponding to each second vibration component in the at least one second vibration component, the target mapping relationship is constructed.
[0107] When the electronic device constructs the target mapping relationship, the first correlation relationship is first constructed, wherein the first correlation relationship is the relationship among the driving frequency of the excitation signal for driving the vibration component, the detection result of the detection device on the resonant frequency of the vibration component and the actual resonant frequency of the vibration component. Here, the vibration component on which the excitation signal acts in the construction of the target mapping relationship is referred to as a second vibration component, the excitation signal for driving the second vibration component is referred to as a second excitation signal, the driving frequency of the second excitation signal is referred to as a second driving frequency f driveThe resonance frequency of the second vibration component detected by the detection device is referred to as a second resonance frequency f test The actual resonance frequency of the second vibration component is referred to as a third resonance frequency f real The third resonance frequency can be obtained by the electronic device from other devices, wherein the other devices can be devices that cannot detect the resonance frequency or devices that can detect the resonance frequency of the vibration component through a sweep signal in a certain frequency range, and the detection result of the resonance frequency of the second vibration component detected by the detection device is the third resonance frequency, which is the actual resonance frequency of the second vibration component.
[0108] The electronic device can construct a first correlation relationship for each of the at least one second vibration component, and for a second vibration component, a set of first correlation relationships can be constructed, a set of first correlation relationships includes at least one first correlation relationship, and at least one of the second resonance frequency and the second driving frequency is different in different first correlation relationships. It can be understood that for a set of first correlation relationships, the third resonance frequency in different first correlation relationships is the same.
[0109] In an example, the electronic device drives the vibration components 1 to 5 as follows: the excitation signals A to C are respectively applied to the vibration component 1, and a set of first correlation relationships corresponding to the vibration component 1 includes: correlation relationship 1A, correlation relationship 1B and correlation relationship 1C; the excitation signals A to C are respectively applied to the vibration component 2, and a set of first correlation relationships corresponding to the vibration component 2 includes: correlation relationship 2A, correlation relationship 2B and correlation relationship 2C; the excitation signals A to C are respectively applied to the vibration component 3, and a set of first correlation relationships corresponding to the vibration component 3 includes: correlation relationship 3A, correlation relationship 3B and correlation relationship 3C; the excitation signals A to C are respectively applied to the vibration component 4, and a set of first correlation relationships corresponding to the vibration component 4 includes: correlation relationship 4A, correlation relationship 4B and correlation relationship 4C; and the excitation signals A to C are respectively applied to the vibration component 5, and a set of first correlation relationships corresponding to the vibration component 5 includes: correlation relationship 5A, correlation relationship 5B and correlation relationship 5C, and a target mapping relationship is constructed based on the first correlation relationships included in the above five sets of first correlation relationships.
[0110] It should be noted that in the above example, the at least one second excitation signal corresponding to different second vibration components is the same, and in actual application, the at least one second excitation signal corresponding to different second vibration components can be different.
[0111] In some embodiments, the target mapping relationship is constructed based on the first association relationship corresponding to each of the at least one second vibration component, including: for each of the at least one first association relationship corresponding to each of the at least one second vibration component, determining a first reference frequency offset based on the second resonance frequency and the second driving frequency in the first association relationship, and determining a second reference frequency offset based on the second driving frequency and the third resonance frequency in the first association relationship, to obtain at least one set of reference frequency offsets, wherein a set of reference frequency offsets includes a first reference frequency offset and a second reference frequency offset corresponding to the first reference frequency offset; and constructing the target mapping relationship based on the at least one set of reference frequency offsets.
[0112] In constructing the target mapping relationship, for a first association relationship, a first reference frequency offset and a second reference frequency offset corresponding to the first association relationship can be determined, and the target mapping relationship is constructed based on the relationship between the first reference frequency offset and the second reference frequency offset corresponding to each first association relationship, wherein the first reference frequency offset is determined based on the second driving frequency and the second resonance frequency, and the second reference frequency offset is determined based on the second driving frequency and the third resonance frequency. For a first association relationship, a set of reference frequency offsets corresponding to the first association relationship includes the first reference frequency offset and the second reference frequency offset corresponding to the first association relationship.
[0113] It can be understood that the determination manner of determining the first reference frequency offset based on the second driving frequency and the second resonance frequency, and the determination manner of determining the second reference frequency offset based on the second driving frequency and the third resonance frequency are the same as the determination manner of determining the first frequency offset based on the first driving frequency and the first resonance frequency. In an example, if the first reference frequency offset is the frequency difference between the second resonance frequency and the second driving frequency, and the second reference frequency offset is the frequency difference between the third resonance frequency and the second driving frequency, then the first reference frequency offset Δf1=f test -f drive , and the second reference frequency offset Δf2=f real -f drive .
[0114] In the embodiments of the present application, the relationship between the target mapping relationship f(·) and the first reference frequency offset Δf1 and the second reference frequency offset Δf2 can be represented by formula (9):
[0115] Δf2=f(Δf1) formula (9).
[0116] In an example, the relationship between the target mapping relationship f(·) and the first reference frequency offset Δf1 and the second reference frequency offset Δf2 can be represented by formula (10):
[0117] Δf2=f(Δf1)=a1*Δf1+b1 formula (10);
[0118] wherein, the formula (10) can also be expressed as formula (11) :
[0119] f real = f drive + a1*Δf1 + b1 formula (11).
[0120] For the formula (10) or formula (11), a1 and b1 in the formula (10) or formula (11) are calculated by the first reference frequency offset and the second reference frequency offset corresponding to each first correlation relationship in the at least one first correlation relationship, so as to obtain the target mapping relationship between Δf1 and Δf2.
[0121] In some embodiments, if the first resonance frequency is adjusted based on the signal parameter of the first excitation signal, before the target mapping relationship is constructed based on the first correlation relationship corresponding to each second vibration component in the at least one second vibration component, the method further comprises: for the first correlation relationship, obtaining the signal parameter of the corresponding second excitation signal, and adjusting the second resonance frequency based on the signal parameter of the second excitation signal.
[0122] Here, considering the influence of the excitation signal on the detection result of the detection device on the resonance frequency of the second vibration component, before the target mapping relationship is constructed through the at least one first correlation relationship, for a second resonance frequency, the second resonance frequency can be adjusted by the signal parameter of the second excitation signal when the second resonance frequency is detected, to obtain an adjusted second resonance frequency, at this time, the second resonance frequency in the first correlation relationship is replaced by the adjusted second resonance frequency.
[0123] Here, the way of adjusting the second resonance frequency by the signal parameter of the second excitation signal is referred to the way of adjusting the first resonance frequency by the signal parameter of the first excitation signal, which is not described here.
[0124] In some embodiments, if the first resonance frequency is adjusted based on the first environmental parameter, the first environmental parameter is the environmental parameter of the first detection environment for detecting the resonance frequency of the first vibration component under the driving of the first excitation signal; before the target mapping relationship is constructed based on the first correlation relationship corresponding to each second vibration component in the at least one second vibration component, the method further comprises:
[0125] For the first correlation relationship, the second environmental parameter corresponding to the corresponding second excitation signal is obtained, and the second resonance frequency is adjusted based on the second environmental parameter, the second environmental parameter is the environmental parameter of the second detection environment for driving the corresponding second vibration component by the second excitation signal in the first correlation relationship.
[0126] Here, considering that the detection result of the detection device on the resonant frequency of the second vibration assembly is affected by the detection environment, for a second resonant frequency, the second resonant frequency can be adjusted by the environmental parameter of the detection environment, i.e., the second environmental parameter, when the second resonant frequency is detected, i.e., the second detection environment, to obtain an adjusted second resonant frequency. At this time, the second resonant frequency in the first correlation relationship is replaced by the adjusted second resonant frequency.
[0127] In actual applications, before the target mapping relationship is constructed based on the at least one first correlation relationship, the second resonant frequency can be adjusted by one or both of the signal parameter of the second excitation signal, i.e., the second signal parameter, and the second environmental parameter. If the second resonant frequency is adjusted by the second signal parameter and the second environmental parameter, a twice-adjusted second resonant frequency is obtained. At this time, the second resonant frequency in the first correlation relationship is replaced by the twice-adjusted second resonant frequency, and the adjustment order of the second signal parameter and the second environmental parameter is not limited. For example, the second resonant frequency is first adjusted based on the second signal parameter to obtain a first-adjusted second resonant frequency, and the first-adjusted second resonant frequency is adjusted based on the second environmental parameter to obtain a twice-adjusted second resonant frequency. For another example, the second resonant frequency is first adjusted based on the second environmental parameter to obtain a first-adjusted second resonant frequency, and the first-adjusted second resonant frequency is adjusted based on the second signal parameter to obtain a twice-adjusted second resonant frequency.
[0128] Next, the method for determining the resonant frequency provided by the embodiments of the present application is described.
[0129] Due to the influence of internal structure, material, and process, it is difficult to obtain a resonant frequency that meets the design requirements and has consistency that meets expectations. At the same time, with changes in the external environment, the resonant frequency also fluctuates significantly.
[0130] In the related art, the resonant frequency cannot be quickly and effectively obtained with high precision, which further leads to a significant vibration weakening phenomenon when the actual excitation signal deviates greatly from the resonant frequency of the linear motor, which easily leads to a poor touch experience for the user.
[0131] The embodiments of the present application can effectively obtain the real resonant frequency of the motor under different working conditions under different temperatures and humidity environments, and have high precision, avoiding the phenomenon that the vibration is significantly weakened due to the large resonant frequency when a single frequency excitation is used, and the touch experience is more accurate and delicate.
[0132] The method for compensating the resonance frequency of the linear motor provided in the embodiments of the present application comprises the following technical points:
[0133] The method for determining the resonance frequency provided in the embodiments of the present application comprises the following technical points:
[0134] 1. The resonance frequency detection value of the motor is the output value after the excitation signal frequency and the motor frequency deviation are input into the mapping function;
[0135] 2. (f real -f drive ), Δf1=(f test -f drive ), (Δf1+f drive ) can all represent the frequency deviation; wherein, f drive is the driving frequency of the excitation signal, f test is the resonance frequency detection value of the motor obtained by the detection device in the corresponding environment, including but not limited to a chip, and can also be the detection completed by other electronic devices; f real is the real resonance frequency of the motor in the corresponding environment obtained by the standard device in the corresponding environment.
[0136] 3. The mapping function is predefined, and is obtained through the analysis of the motor resonance frequency set in different detection states;
[0137] 3.1), the mapping function includes but is not limited to the matrix relationship, Taylor equation, differential and integral, etc., and can also be a mapping table search, etc.
[0138] 3.2), the solving process of the mapping function includes but is not limited to iteration, fitting, regression, neural network, etc.
[0139] 4. The mapping function includes the influence of different excitation signals and environments;
[0140] 5. The motor resonance frequency set in different detection states is obtained by different excitation signal sets, environment sets, detection devices, etc.
[0141] 5.1), the excitation signal set includes different signal types, time lengths, amplitudes, etc.; the signal type can be a sine wave, a square wave, a triangular wave, a round square wave and a mixed waveform signal of different types.
[0142] 5.2), the detection environment set includes different temperatures, humidities, tool types, etc.; wherein, the tool can be understood as a device or equipment for fixing the motor, which can be a mobile phone, a square block that can be fixed, etc.
[0143] 5.3) The testing equipment includes standard equipment sources and testing equipment sources. The standard equipment source is the equipment used by motor manufacturers for testing or by customers for motor acceptance testing. It can detect the actual resonant frequency of the linear motor. Currently, it is usually composed of a high-precision sensor and a data acquisition device. The testing equipment source is a chip or other electronic device that directly detects the motor without a sensor. It can be used as a testing device to detect the resonant frequency of the motor. However, the resonant frequency detected by the testing device may deviate from the actual resonant frequency detected by the standard testing source.
[0144] In the method for determining the resonant frequency provided in this application embodiment, different excitation signals are set. These excitation signals include mixed waveform signals of different types, durations, amplitudes, and combinations thereof. In environments with different temperatures and humidity levels, the set excitation signals are used to drive the motor, thereby obtaining a set M of motor resonant frequencies. The set M of resonant frequencies can be as follows: Figure 5 As shown, it includes a set of environmental parameters, a set of signal parameters, a second resonant frequency, a third resonant frequency, and a second driving frequency. The set of environmental parameters includes multiple environmental parameters such as temperature, humidity, and fixation type. The set of signal parameters includes parameters of the driving signal such as amplitude, duration, and signal type. Thus, a target mapping relationship is constructed based on the set of resonant frequencies.
[0145] The second reference deviation between the motor's true resonant frequency and the excitation signal is obtained based on the motor's resonant frequency set M. Based on set M, the detected value f of the motor's resonant frequency is obtained. test With excitation signal f drive The first reference frequency offset was determined. The relationship between the first reference frequency offset and different excitation signals, temperature, and humidity was analyzed. Adjustments were made to the first and second reference frequency offsets to construct f. real with f drive The function between f' and the first reference frequency offset is calculated numerically to establish a mapping relationship among the three, i.e., the target mapping relationship. In actual resonant frequency detection, f' is... drive and the first frequency offset (Δf'1=f') test -f' drive Substitute the values into the established mapping relationship to output the detected value f of the motor resonant frequency under this actual state. out That is, f' real And the accuracy is 1Hz.
[0146] In the method for determining the resonant frequency provided in this application embodiment, the process of constructing the target mapping relationship is as follows: Figure 6 As shown, it includes:
[0147] S601. Under the environment corresponding to the environmental parameter set A, determine the resonant frequency set M of the motor.
[0148] Wherein, the environmental parameter set A includes different temperature, humidity and other environmental parameters. In the environment corresponding to the environmental parameter set A, the excitation signal set B is used to drive the motor to obtain the resonance frequency detection value f test of the motor in the orthogonal experiment of the environmental parameter set A and the excitation signal set B real , and the real resonance frequency f test of the motor real .
[0149] Wherein, the excitation signal set B includes different signal types, time lengths, amplitudes and other signal parameters; the signal type can be a sine wave, a square wave, a triangular wave, a round square wave and a mixed waveform signal of different signal type combinations.
[0150] S602, according to M, the second reference frequency offset between the real resonance frequency of the motor and the driving frequency of the excitation signal is obtained.
[0151] The second reference frequency offset can be represented as Δf2=(f real -f drive ).
[0152] S603, according to M, the first reference frequency offset between the resonance frequency detection value of the motor and the driving frequency of the excitation signal is obtained.
[0153] The first reference frequency offset can be represented as Δf1=(f test -f drive ).
[0154] S604, based on the first reference frequency offset and the second reference frequency offset, a target mapping relationship between the real resonance frequency of the motor, the first frequency offset and the driving frequency of the excitation signal is established.
[0155] Wherein, the target mapping relationship can be represented as formula (12):
[0156] f(Δf1)=f real -f drive Formula (12);
[0157] After establishing the target mapping relationship, based on the established target mapping relationship, the resonance frequency of a motor with unknown resonance frequency is detected. In the method for determining the resonance frequency provided by the application, the process of detecting the resonance frequency of a motor with unknown resonance frequency based on the established target mapping relationship is as shown in Figure 7 , which comprises:
[0158] S701, using the current detection device source to detect the resonance frequency of the motor to obtain a detection value;
[0159] The detection value of the actual resonance frequency can be represented as f test .
[0160] S702. Calculate the frequency offset of the detection device.
[0161] The frequency offset of the detection equipment can be expressed as f' test -f' drive :
[0162] S703. Substitute the frequency offset of the detection device into the mapping function to obtain the resonant frequency of the motor.
[0163] The resonant frequency of the motor can be expressed by formula (13).
[0164] f' out =f(Δf'1)+f' drive Formula (13);
[0165] The electronic device obtains the value f' of the motor's resonant frequency. real The obtained motor resonant frequency satisfies formula (14):
[0166] |f' real -f” real |≤1Hz formula (14);
[0167] f” real This is the actual resonant frequency of the motor.
[0168] The method for determining the resonant frequency provided in this application can be implemented as including, but not limited to, the following Embodiment 1 and Embodiment 2.
[0169] Example 1
[0170] based on Figure 6 The process of establishing the target mapping relationship shown involves establishing the resonant frequency set M and performing numerical analysis on it to obtain f as shown in formula (11). real First reference frequency offset Δf1 and f drive Mapping function between:
[0171] f real =f drive +a1*Δf1+b1 formula (11);
[0172] Wherein, a1 and b1 are both compensation parameters, and the values of a1 and b1 are both in the range of [-1, 1].
[0173] In actual testing, the data collected by the testing equipment is processed by frequency offset processing and then input into a mapping function along with the excitation signal. Finally, the detected value f' of the motor's resonant frequency under the current environmental conditions is output. real , and f' real The detection accuracy meets the 1Hz accuracy requirement.
[0174] Based on the mapping function shown in formula (5), the determination of the resonance frequency can be as shown in Figure 8 801 is the real resonance frequency of the motor in different environments measured by a standard device source; 802 is the resonance frequency of the detection device without processing by the mapping function; each circular node is the resonance frequency of the detection device processed by the mapping function and is the final output value; it can be seen that the output value of the resonance frequency of the detection device processed by the mapping function is closer to the real resonance frequency, and the accuracy is within 1 Hz.
[0175] Embodiment Two
[0176] Compared with Embodiment One, the way of detecting the resonance frequency of the motor in Embodiment Two is the same as that in Embodiment One, and the difference lies in that the mapping function is shown in formula (15):
[0177] f real =f drive +a2*Δf1 2 +b2*fΔf1+c2 Formula (15);
[0178] Wherein, a2, b2 and c2 are compensation parameters.
[0179] Based on the mapping function shown in formula (12), the determination of the resonance frequency can be as shown in Figure 9 901 is the real resonance frequency of the motor in different environments measured by a standard device source; 902 is the resonance frequency of the detection device without processing by the mapping function; each circular node is the resonance frequency of the detection device processed by the mapping function and is the final output value; it can be seen that the output value of the resonance frequency of the detection device processed by the mapping function is closer to the real resonance frequency, and the accuracy is within 1 Hz.
[0180] To realize the above-mentioned method for determining the resonance frequency, an embodiment of the present application provides a device for determining the resonance frequency, as shown in Figure 10 The device 1000 comprises:
[0181] A detection module 1001 detects the resonance frequency of a first vibration assembly under the driving of a first excitation signal, and obtains a first resonance frequency;
[0182] A first determination module 1002 obtains a first frequency offset based on the first resonance frequency and a first driving frequency of the first excitation signal;
[0183] A mapping module 1003 maps the first frequency offset to a second frequency offset based on a target mapping relationship, and the target mapping relationship is a mapping relationship between an actual frequency offset and a detected frequency offset;
[0184] The second determining module 1004 is configured to compensate the first driving frequency by the second frequency offset to obtain a target resonance frequency, and the target resonance frequency is an actual resonance frequency of the first vibration component.
[0185] In some embodiments, the first determining module 1002 is further configured to determine a frequency difference between the first resonance frequency and the first driving frequency as the first frequency offset.
[0186] In some embodiments, the apparatus 1000 further includes:
[0187] The first obtaining module is configured to obtain a signal parameter of the first excitation signal.
[0188] The first adjusting module is configured to adjust the first resonance frequency based on the signal parameter of the first excitation signal.
[0189] In some embodiments, the apparatus 1000 further includes:
[0190] The first obtaining module is configured to obtain a first environmental parameter, and the first environmental parameter is an environmental parameter of a first detection environment in which the first resonance frequency of the first vibration component is detected under the driving of the first excitation signal.
[0191] The second adjusting module is configured to adjust the first resonance frequency based on the first environmental parameter.
[0192] In some embodiments, the apparatus 1000 further includes a establishing module configured to:
[0193] For each of the at least one second vibration component, a second resonance frequency of the second vibration component under the driving of each of the at least one second excitation signal is obtained, and a first correlation relationship between the second resonance frequency, a second driving frequency of the corresponding second excitation signal, and a third resonance frequency of the second vibration component is established; the third resonance frequency is an actual resonance frequency of the corresponding second vibration component; and the target mapping relationship is constructed based on the corresponding first correlation relationship of each of the at least one second vibration component.
[0194] In some embodiments, the establishing module is further configured to: for each first association relationship of the at least one first association relationship corresponding to each second vibration component of the at least one second vibration component, determine a first reference frequency offset based on the second resonant frequency and the second driving frequency in the first association relationship, and determine a second reference frequency offset based on the second driving frequency and the third resonant frequency in the first association relationship, to obtain at least one set of reference frequency offsets, wherein a set of reference frequency offsets comprises a first reference frequency offset and a second reference frequency offset corresponding to the first reference frequency offset; and construct the target mapping relationship based on the at least one set of reference frequency offsets.
[0195] In some embodiments, the establishing module is further configured to: if the first resonant frequency is adjusted based on the signal parameter of the first excitation signal, for the first association relationship, obtain a signal parameter of a corresponding second excitation signal, and adjust the second resonant frequency based on the signal parameter of the second excitation signal.
[0196] In some embodiments, the establishing module is further configured to: if the first resonant frequency is adjusted based on a first environmental parameter, for the first association relationship, obtain a second environmental parameter corresponding to a corresponding second excitation signal, and adjust the second resonant frequency based on the second environmental parameter, wherein the first environmental parameter is an environmental parameter of a first detection environment in which the first resonant frequency of the first vibration component is detected under the driving of the first excitation signal, and the second environmental parameter is an environmental parameter of a second detection environment in which the second vibration component is driven by the second excitation signal in the first association relationship.
[0197] It should be noted that each logical unit included in the device for determining a resonant frequency provided in the embodiments of the present application can be implemented by a processor in an electronic device, and of course can also be implemented by a specific logic circuit. In the implementation process, the processor can be a central processing unit (CPU), a micro processing unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0198] The above description of the system embodiments is similar to the description of the above method embodiments, and has similar beneficial effects to the method embodiments. For technical details not disclosed in the system embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0199] It should be noted that, in the embodiments of the present application, if the method for determining the resonant frequency is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various media that can store program codes. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0200] The embodiments of the present application also provide an electronic device, including a memory, a processor, at least one vibration component, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the method for determining the resonant frequency.
[0201] Correspondingly, the embodiments of the present application provide a storage medium, that is, a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method for determining the resonant frequency provided in the above embodiments.
[0202] It should be noted that: the description of the above storage medium embodiments is similar to the description of the above method embodiments, and has similar beneficial effects to the method embodiments. For technical details not disclosed in the storage medium embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0203] It should be noted that, Figure 11 A hardware entity diagram of the electronic device of the embodiments of the present application is shown in FIG. 11. Figure 11 As shown in FIG. 11, the electronic device 1100 includes a processor 1101, at least one communication bus 1102, at least one external communication interface 1104, and a memory 1105. The communication bus 1102 is configured to realize the connection and communication between the components. In an example, the electronic device 1100 further includes a user interface 1103, wherein the user interface 1103 can include a display screen, and the external communication interface 1104 can include a standard wired interface and a wireless interface. The electronic device provided by the embodiments of the present application further includes a vibration component, which can vibrate based on an excitation signal to generate a vibration sensation.
[0204] The memory 1105 is configured to store instructions and applications executable by the processor 1101, and can also cache data (e.g., image data, audio data, and communication data) to be processed by the processor 1101 and modules in the electronic device, and can be implemented by a FLASH or a Random Access Memory (RAM).
[0205] It should be understood that every feature, structure, or characteristic mentioned herein in relation to an embodiment can be combined with any other feature, structure, or characteristic mentioned herein in relation to another embodiment. It should be understood that the term "in one embodiment" or "in some embodiments" as used herein does not specify a single embodiment, and that a specific feature, structure, or characteristic can be included in some embodiments, but not in others. Moreover, these features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that the sequence of the processes described above does not mean the order of execution, and the execution order of the processes should be determined according to their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The sequence of the embodiments of the present application described above is only for description, and does not represent the advantages or disadvantages of the embodiments.
[0206] It should be understood that the terms "comprise", "comprising", or any other variant thereof, are intended to encompass non-exclusive inclusion, such that processes, methods, articles, or apparatuses that comprise a list of elements do not necessarily include only those elements in the list, but can also include other elements not expressly listed or inherent to such processes, methods, articles, or apparatuses. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0207] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed components can be through some interfaces, indirect coupling or communication connection between devices or units, which can be electrical, mechanical or other forms.
[0208] The units described as separate components above can or can not be physically separate, and the components displayed as units can or can not be physical units; they can be located in one place or distributed on multiple network units; and part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0209] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
[0210] Those skilled in the art can understand that all or part of the steps of the above method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program executes the steps including the above method embodiments when executed; and the foregoing storage medium includes mobile storage equipment, read only memory (Read Only Memory, ROM), magnetic disc or optical disc and various storage program codes.
[0211] Alternatively, the integrated unit of the present application, if implemented in the form of a software function module and sold or used as an independent product, can also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes mobile storage equipment, ROM, magnetic disc or optical disc and various storage program codes.
[0212] The above is only an embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of determining a resonant frequency, characterized by, The method comprises: detecting a resonance frequency of a first vibration component under driving of a first excitation signal to obtain a first resonance frequency; the first vibration component comprising a linear motor; obtaining a first frequency offset based on the first resonance frequency and a first driving frequency of the first excitation signal; mapping the first frequency offset to a second frequency offset based on a target mapping relationship, the target mapping relationship being a mapping relationship between an actual frequency offset and a detected frequency offset; the second frequency offset being used to reflect a frequency difference relationship between the first driving frequency and a target resonance frequency; the target resonance frequency being an actual resonance frequency of the first vibration component; compensating the first driving frequency by using the second frequency offset to obtain a target resonance frequency; a relationship among the second frequency offset, the target resonance frequency and the first driving frequency being the same as a relationship among the first frequency offset, the first resonance frequency and the first driving frequency.
2. The method of claim 1, wherein, The method further comprises: determining a frequency difference between the first resonance frequency and the first driving frequency as the first frequency offset.
3. The method according to claim 1 or 2, characterized in that, Before obtaining the first frequency offset based on the first resonance frequency and the first driving frequency of the first excitation signal, the method further comprises: obtaining a signal parameter of the first excitation signal; adjusting the first resonance frequency based on the signal parameter of the first excitation signal.
4. The method according to claim 1 or 2, characterized in that, Before obtaining the first frequency offset based on the first resonance frequency and the first driving frequency of the first excitation signal, the method further comprises: obtaining a first environmental parameter, the first environmental parameter being an environmental parameter of a first detection environment in which the resonance frequency of the first vibration component under driving of the first excitation signal is detected; adjusting the first resonance frequency based on the first environmental parameter.
5. The method of claim 1, wherein, The method further comprises: for each of at least one second vibration component, obtaining a second resonance frequency of the second vibration component under driving of each of at least one second excitation signal, and establishing a first correlation relationship among the second resonance frequency, a second driving frequency of the corresponding second excitation signal and a third resonance frequency of the second vibration component; the third resonance frequency being an actual resonance frequency of the corresponding second vibration component; constructing the target mapping relationship based on the at least one first correlation relationship corresponding to each of the at least one second vibration component.
6. The method of claim 5, wherein, The method further comprises: for each of the at least one first correlation relationship corresponding to each of the at least one second vibration component, determining a first reference frequency offset based on the second resonance frequency and the second driving frequency in the first correlation relationship, and determining a second reference frequency offset based on the second driving frequency and the third resonance frequency in the first correlation relationship to obtain at least one group of reference frequency offsets, wherein a group of reference frequency offsets comprises a first reference frequency offset and a second reference frequency offset corresponding to the first reference frequency offset. construct the target mapping relationship based on the at least one set of reference frequency offsets.
7. The method according to claim 5 or 6, characterized in that, If the first resonant frequency is adjusted based on a signal parameter of the first excitation signal, the method further comprises, before constructing the target mapping relationship based on the first correlation relationship corresponding to each of the at least one second vibration component: For the first correlation relationship, obtaining a signal parameter of a corresponding second excitation signal, and adjusting the second resonant frequency based on the signal parameter of the second excitation signal.
8. The method according to claim 5 or 6, characterized in that, If the first resonant frequency is adjusted based on a first environmental parameter, the first environmental parameter is an environmental parameter of a first detection environment in which the first vibration component is detected under driving of the first excitation signal. Before constructing the target mapping relationship based on the first correlation relationship corresponding to each of the at least one second vibration component, the method further comprises: For the first correlation relationship, obtaining a second environmental parameter corresponding to a corresponding second excitation signal, and adjusting the second resonant frequency based on the second environmental parameter, the second environmental parameter being an environmental parameter of a second detection environment in which the corresponding second vibration component is driven by the second excitation signal in the first correlation relationship.
9. An apparatus for determining a resonant frequency, the apparatus comprising: The apparatus comprises: a detection module configured to detect a first resonant frequency of a first vibration component under driving of a first excitation signal, the first vibration component comprising a linear motor; a first determination module configured to obtain a first frequency offset based on the first resonant frequency and a first driving frequency of the first excitation signal; a mapping module configured to map the first frequency offset to a second frequency offset based on a target mapping relationship, the target mapping relationship being a mapping relationship between an actual frequency offset and a detected frequency offset, the second frequency offset being used to reflect a frequency difference relationship between the first driving frequency and a target resonant frequency, the target resonant frequency being an actual resonant frequency of the first vibration component; a second determination module configured to compensate the first driving frequency by the second frequency offset to obtain the target resonant frequency, wherein a relationship among the second frequency offset, the target resonant frequency and the first driving frequency is the same as a relationship among the first frequency offset, the first resonant frequency and the first driving frequency.
10. An electronic device, comprising: The electronic device comprises a memory, a processor, at least one vibration component, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the method for determining a resonant frequency according to any one of claims 1 to 8.
11. A storage medium storing an executable program, characterized by The executable program is executed by the processor to implement the method for determining a resonant frequency according to any one of claims 1 to 8.
Citation Information
Patent Citations
Resonant frequency detection method and device of vibration motor, terminal equipment and storage medium
CN112946362A