Waveform transformation methods, modules, driving methods, devices and electronic equipment

CN115913049BActive Publication Date: 2026-09-01SHANGHAI AWINIC TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211396945.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2026-09-01
Estimated Expiration
2042-11-09

AI Technical Summary

Technical Problem

[0004]鉴于此,本申请提供一种波形变换方法、模块、驱动方法、装置和电子设备,以解决传统方案容易影响驱动效果的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115913049B_ABST
    Figure CN115913049B_ABST
Patent Text Reader

Abstract

This application discloses a waveform transformation method, module, driving method, device, and electronic device. The waveform transformation method includes: acquiring a target frequency of a component to be driven in a matching electronic device and a reference frequency corresponding to a reference waveform; determining a target length of the target waveform based on the relationship between the target frequency and the reference frequency; determining multiple target sampling points on the target waveform based on the target length and the target frequency; and transforming reference data corresponding to each sampling point in the reference waveform to target data corresponding to each target sampling point in the target waveform. This application can improve the effect of driving the component to be driven.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent control technology, specifically to a waveform transformation method, module, driving method, device, and electronic device. Background Technology

[0002] Mobile phones and other electronic devices are among the most frequently used tools. When using these devices, people are no longer satisfied with just functionality; they seek unique experiences. To provide users with a more realistic experience, manufacturers are adding other sensory elements beyond sound and images, such as vibration. For example, they might add shooting vibrations to shooting games, collision vibrations to racing games, rhythmic vibrations to ringtones, or flashing lights during music playback, thus enhancing user immersion.

[0003] The inventors discovered that electronic devices often use fixed waveforms to control related components in order to provide sensory experiences in other dimensions such as touch and light. For example, mobile phones often use fixed waveforms to control motor vibration to provide a haptic feedback. These control processes have certain limitations and can easily affect the driving effect. Summary of the Invention

[0004] In view of this, this application provides a waveform transformation method, module, driving method, device and electronic device to solve the problem that traditional solutions are prone to affecting the driving effect.

[0005] This application provides a waveform transformation method, including:

[0006] Obtain the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform;

[0007] The target length of the target waveform is determined based on the relationship between the target frequency and the reference frequency;

[0008] Multiple target sampling points on the target waveform are determined based on the target length and the target frequency;

[0009] The reference data corresponding to each sampling point in the reference waveform is transformed into the target data corresponding to each target sampling point in the target waveform.

[0010] Optionally, the waveform transformation method further includes: obtaining the ratio between the target frequency and the reference frequency; and smoothing the last target data of the target waveform according to the ratio.

[0011] Optionally, the smoothing process of the target waveform based on the ratio includes: if the ratio is less than a preset processing threshold, adjusting the tail data of the target waveform to end at 0 according to the changing trend of the reference waveform; if the ratio is greater than or equal to the processing threshold, padding the length of the target waveform to the reference length of the reference waveform according to the changing trend of the reference waveform.

[0012] Optionally, adjusting the tail data of the target waveform to end at 0 based on the changing trend of the reference waveform includes: obtaining the target reference point corresponding to the last target data in the reference waveform; and determining the tail data of the target waveform based on the reference data between the target reference point and the first 0 point after the target reference point.

[0013] Optionally, the step of padding the length of the target waveform to the reference length of the reference waveform according to the changing trend of the reference waveform, and adjusting the tail data of the target waveform to end with 0, includes: obtaining the target reference point corresponding to the last target data in the reference waveform; and transforming the reference data after the target reference point into the corresponding target data according to the transformation rules between the reference data and the target data, until the length of the target waveform becomes the reference length.

[0014] Optionally, after the step of supplementing the length of the target waveform to the reference length of the reference waveform according to the change trend of the reference waveform if the ratio is greater than or equal to the processing threshold, the waveform transformation method further includes: if the current last target data is not 0, transforming the reference data within half a cycle after the target reference point corresponding to the current last target data to the corresponding target data.

[0015] Optionally, transforming the reference data corresponding to each sampling point in the reference waveform to the target data corresponding to each target sampling point in the target waveform includes: back-mapping the reference data to the corresponding initial target data based on the ratio between the target frequency and the reference frequency; if the initial target data is an integer, then determining the initial target data as the final target data; if the initial target data is not an integer, then performing linear interpolation on the initial target data to obtain the final target data.

[0016] Optionally, determining the target length of the target waveform based on the relationship between the target frequency and the reference frequency includes: if the ratio between the target frequency and the reference frequency is less than a preset processing threshold, then determining the reference length of the reference waveform as the target length; if the ratio between the target frequency and the reference frequency is greater than or equal to the processing threshold, then determining the target length based on the ratio between the reference length and the ratio.

[0017] Optionally, before obtaining the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform, the waveform transformation method further includes: if the reference waveform meets the frequency transformation conditions, then performing the step of obtaining the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform.

[0018] Optionally, the frequency transformation condition includes: the reference waveform is a specified waveform segment.

[0019] This application also provides a driving method, comprising: obtaining a target waveform using any of the above waveform transformation methods; and driving a component to be driven using the target waveform.

[0020] Optionally, the component to be driven includes a vibration component and / or a light-emitting component.

[0021] This application also provides a waveform transformation module, including a transformation circuit, which is used to perform any of the waveform transformation methods described above.

[0022] This application also provides a driving device, including any of the waveform conversion modules described above.

[0023] This application also provides an electronic device, including any of the above-described driving devices and a component to be driven, wherein the driving device is used to drive the component to be driven using a target waveform.

[0024] In the waveform transformation method, module, driving method, device, and electronic device provided in this application, by obtaining the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform, the target length of the target waveform is determined according to the relationship between the target frequency and the reference frequency. Then, multiple target sampling points on the target waveform are determined according to the target length and the target frequency, so as to transform the reference data corresponding to each sampling point in the reference waveform to the target data corresponding to each target sampling point in the target waveform, thereby obtaining the target waveform and matching the target waveform with the component to be driven, which can improve the effect of driving the component to be driven by the target waveform.

[0025] Furthermore, this application can also obtain the ratio between the target frequency and the reference frequency, and smooth the last target data of the target waveform according to the ratio, so as to avoid the sudden stop of the final driving operation when controlling the driven component according to the target waveform, thereby further improving the driving effect.

[0026] As can be seen, this application can improve the effect of driving the component to be driven based on the target waveform in many ways. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a schematic flowchart of a waveform transformation method according to an embodiment of this application;

[0029] Figure 2 This is a schematic flowchart of a waveform transformation method according to another embodiment of this application;

[0030] Figure 3 This is a schematic flowchart of a driving method according to an embodiment of this application. Detailed Implementation

[0031] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. In the absence of conflict, the following embodiments and their technical features can be combined with each other.

[0032] The first aspect of this application provides a waveform transformation method, with reference to... Figure 1 As shown, the waveform transformation method described above includes steps S110 to S140.

[0033] S110, obtain the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform.

[0034] Electronic devices often include vibrating and / or emitting components that require driving. These components need to be controlled using a target waveform to activate them and provide corresponding sensory signals. These components typically have specific operating frequencies for their respective applications; for example, a motor may have a specific vibration frequency under certain temperature conditions. This operating frequency serves as the target frequency for the components being driven in the electronic device.

[0035] The sensory signal delivery process of electronic devices, such as vibration, often needs to match the audio playback process. Therefore, electronic devices can load a driving waveform of the corresponding audio signal and use this driving waveform as a reference waveform to drive the component to be driven, so that the operation of the component to be driven matches the corresponding audio playback process. The aforementioned reference frequency is the frequency of the reference waveform.

[0036] S120, determine the target length of the target waveform based on the relationship between the target frequency and the reference frequency.

[0037] The target frequency can characterize the target period of the target waveform, and the reference frequency can characterize the reference period of the reference waveform. The relationship between the target frequency and the reference frequency in step S120 determines the target length, which clarifies the relationship between the target length and the duration of one period of the reference waveform. Based on this relationship, waveform change control can be performed, thereby improving the accuracy of the waveform transformation control process.

[0038] S130, determine multiple target sampling points on the target waveform based on the target length and the target frequency.

[0039] S140, transform the reference data corresponding to each sampling point in the reference waveform to the target data corresponding to each target sampling point in the target waveform.

[0040] The above step S140 can perform backward mapping on the reference data corresponding to each sampling point to obtain the target data corresponding to each target sampling point, thereby determining the target waveform and matching the determined target waveform with the component to be driven.

[0041] The above waveform transformation method obtains the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform. Based on the relationship between the target frequency and the reference frequency, the target length of the target waveform is determined. Then, based on the target length and the target frequency, multiple target sampling points on the target waveform are determined. The reference data corresponding to each sampling point in the reference waveform is transformed to the target data corresponding to each target sampling point in the target waveform to obtain the target waveform. This allows the target waveform to match the component to be driven, thereby improving the effect of driving the component using the target waveform.

[0042] In one embodiment, the waveform transformation method further includes: obtaining the ratio between the target frequency and the reference frequency; and smoothing the last target data of the target waveform according to the ratio, so as to avoid the sudden stop of the final driving operation when driving the component to be driven according to the target waveform, thereby improving the driving effect.

[0043] In one example, smoothing the target waveform based on the ratio includes: if the ratio is less than a preset processing threshold, adjusting the tail data of the target waveform to end at 0 according to the changing trend of the reference waveform; if the ratio is greater than or equal to the processing threshold, padding the length of the target waveform to the reference length of the reference waveform according to the changing trend of the reference waveform, so that the length of the target waveform matches the length of the reference waveform, and the entire target waveform changes smoothly, avoiding abrupt changes that could affect the driving effect. The aforementioned processing threshold includes a threshold characterizing the magnitude relationship between the target frequency and the reference frequency, which can be set to a value of 1, etc.

[0044] In one example, adjusting the tail data of the target waveform to end at 0 based on the changing trend of the reference waveform includes: obtaining the target reference point corresponding to the last target data in the reference waveform; determining the tail data of the target waveform based on the reference data between the target reference point and the first 0 point following the target reference point, so that the target waveform smoothly transitions from the last target data to the 0 point, avoiding sudden stops during the driving process. The tail data includes the last few data points in the target waveform, such as the last target data point of the target waveform or the target data of the last half cycle of the target waveform, etc.

[0045] Specifically, when the ratio is less than a processing threshold of 1, the last target data of the target waveform is TAR_END_VAL. If TAR_END_VAL equals 0, the waveform transformation can be determined to be complete, thus identifying the complete target waveform. If TAR_END_VAL is not equal to 0, the corresponding offset phase can be found in the reference waveform to complete half a cycle based on the offset phase, allowing the target waveform to smoothly change from the current last target data to 0. Specifically, when finding the offset phase, the monotonic state at the end of the target waveform can be determined first, and then the phases of the reference waveform can be traversed to ensure that TAR_END_VAL = Amplitude * sin(2 * 3.14 * TAR_FREQ * 1 / Fs * PHASE). If the monotonic state traversed at this time is consistent with the monotonic state at the end of the target waveform, then the corresponding offset phase is found. Here, Amplitude represents the amplitude of the reference waveform, TAR_FREQ represents the target frequency of the target waveform, Fs represents the sampling rate, PHASE represents the offset phase, and the symbol * indicates multiplication.

[0046] In one example, the step of filling the length of the target waveform to the reference length of the reference waveform according to the changing trend of the reference waveform includes: obtaining the target reference point corresponding to the last target data in the reference waveform; transforming the reference data after the target reference point into the corresponding target data according to the transformation rules between the reference data and the target data, until the length of the target waveform becomes the reference length, so that the current length of the target waveform is consistent with the reference length, thereby improving the accuracy of controlling the corresponding driven component based on the target waveform.

[0047] Optionally, after processing thresholds such as if the ratio is greater than or equal to 1, and then padding the length of the target waveform to the reference length of the reference waveform according to the changing trend of the reference waveform, the waveform transformation method further includes: if the current last target data is not 0, transforming the reference data within half a cycle after the target reference point corresponding to the current last target data to the corresponding target data, so that the target waveform ends at 0, preventing the corresponding driving process from suddenly stopping or other situations; if the current last target data is 0, determining that the waveform transformation is over, thereby determining the corresponding target waveform.

[0048] In one embodiment, transforming the reference data corresponding to each sampling point in the reference waveform to the target data corresponding to each target sampling point in the target waveform includes: back-mapping the reference data to the corresponding initial target data based on the ratio between the target frequency and the reference frequency; if the initial target data is an integer, then the initial target data is determined as the final target data; if the initial target data is not an integer, then the initial target data is linearly interpolated to obtain the final target data, so as to realize the mapping between the reference data and the target data using the back-mapping method, so that there are points on the reference waveform corresponding to each target data. Specifically, if the reference data is denoted as I, the final target data is denoted as TP, the initial target data is denoted as SP, and the ratio between the target frequency and the reference frequency is denoted as ALPHA, then SP = I * ALPHA. If SP is an integer, then the value corresponding to SP is directly assigned to TP; if SP is a decimal, then the interpolated value is assigned to TP through linear interpolation to ensure the accuracy and smoothness of the final target data TPDE.

[0049] In one embodiment, determining the target length of the target waveform based on the relationship between the target frequency and the reference frequency includes: if the ratio between the target frequency and the reference frequency is less than a preset processing threshold, then the reference length of the reference waveform is determined as the target length; if the ratio between the target frequency and the reference frequency is greater than or equal to the processing threshold, then the target length is determined based on the ratio between the reference length and the ratio, to ensure the accuracy of the obtained target length. Specifically, if the target length is denoted as TAR_LEN and the reference length is denoted as SRC_LEN, a ratio between the target frequency and the reference frequency of less than 1 indicates that the target frequency is smaller than the reference frequency, and the period of the transformed target waveform becomes longer. To ensure consistent waveform vibration duration, the transformed target wavelength can be determined as the reference length, i.e., TAR_LEN = SRC_LEN; if ALPHA is greater than or equal to 1, it indicates that the target frequency is larger than the reference frequency, and the period of the transformed target waveform will become shorter. In this case, the target length of the transformed target waveform can be: TAR_LEN = SRC_LEN / ALPHA.

[0050] In one embodiment, before obtaining the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform, the waveform transformation method further includes: if the reference waveform meets the frequency transformation conditions, then performing the step of obtaining the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform, so as to perform frequency-based waveform transformation on the reference waveform segment, i.e., frequency transformation, to improve the accuracy of waveform transformation.

[0051] Optionally, the frequency conversion condition includes: the reference waveform is a specified waveform segment, such as a waveform with a smooth amplitude change throughout. Optionally, the specified waveform segment may include long-wave waveforms and / or fade-in / fade-out waveforms, wherein the long-wave waveform includes waveforms with a waveform length greater than a length threshold, and the fade-in / fade-out waveform includes waveforms with both the start and end period amplitudes less than an amplitude threshold.

[0052] In one example, if the relationship between the target frequency and the reference frequency includes the ratio between the two, the waveform transformation method described above can also be referenced. Figure 2 As shown, it includes steps S201 to S212.

[0053] S201, If ​​the reference waveform meets the frequency transformation conditions, proceed to step S202.

[0054] S202, calculate the ratio between the target frequency and the reference frequency.

[0055] S203, determine whether the ratio is less than 1. If yes, proceed to step S204; otherwise, proceed to step S208.

[0056] S204, the reference length of the reference waveform is determined as the target length. If the target length is denoted as TAR_LEN and the reference length is denoted as SRC_LEN, then TAR_LEN = SRC_LEN.

[0057] S205, perform backward mapping on the reference data corresponding to each sampling point to obtain the target data corresponding to each reference data.

[0058] S206, determine whether the current last target data is 0. If yes, proceed to step S207; otherwise, proceed to step S212.

[0059] S207, waveform transformation complete.

[0060] S208. Determine the target length based on the ratio between the reference length and the ratio. If the target length is denoted as TAR_LEN, the reference length is denoted as SRC_LEN, and the ratio is denoted as ALPHA, then TAR_LEN = SRC_LEN / ALPHA.

[0061] S209, perform backward mapping on the reference data corresponding to each sampling point to obtain the target data corresponding to each reference data.

[0062] S210, obtain the target reference point corresponding to the last target data in the reference waveform, and transform the reference data after the target reference point into the corresponding target data according to the transformation rules between the reference data and the target data, until the length of the target waveform becomes the reference length; this step can be achieved by finding the offset phase, etc., so that the current length of the target waveform becomes consistent with the reference length.

[0063] S211, determine whether the current last target data is 0. If it is, proceed to step S207; otherwise, proceed to step S212.

[0064] S212, transform the reference data within half a cycle after the target reference point corresponding to the last target data to the corresponding target data to complete half a cycle, so that the target waveform ends at 0; specifically, this step can complete the corresponding half cycle by finding the offset phase, etc.

[0065] The above waveform transformation method obtains the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform. Based on the relationship between the target frequency and the reference frequency, the target length of the target waveform is determined. Then, multiple target sampling points on the target waveform are determined based on the target length and target frequency. This transforms the reference data corresponding to each sampling point in the reference waveform to the target data corresponding to each target sampling point in the target waveform, resulting in the target waveform. This allows the target waveform to match the component to be driven, improving the effectiveness of driving the component using the target waveform. Furthermore, the ratio between the target frequency and the reference frequency can be obtained, and the last target data of the target waveform can be smoothed based on this ratio. This prevents a sudden stop in the final driving operation when controlling the component based on the target waveform, further improving the driving effect. Therefore, this application can improve the effectiveness of driving the component based on the target waveform in multiple ways.

[0066] This application provides a driving method in a second aspect, which can be used to drive a motor or other driving components. (Reference) Figure 3 As shown, the waveform transformation method includes:

[0067] S310, the target waveform is obtained by using the waveform transformation method described in any of the above embodiments;

[0068] S320, the target waveform is used to drive the component to be driven.

[0069] In one embodiment, the component to be driven includes a vibrating component and / or a light-emitting component. Optionally, the vibrating component may include a motor. Optionally, the light-emitting component may include an LED light, etc.

[0070] The aforementioned driving method uses a target waveform to drive the component to be driven. The target waveform is based on a reference waveform of the corresponding audio signal and can be automatically adjusted in real time according to the target frequency and other characteristics of the component to be driven, without manual intervention, thus improving the driving effect. The inventors analyzed the driving process using the example of driving motor A to vibrate while playing music ringtones. They found that if 100 music waveforms are pre-tuned on motor A, directly calling these waveforms at any time and in any environment will not achieve the optimal vibration effect because the motor's vibration frequency (target frequency) may fluctuate with external environmental factors such as temperature. Some solutions attempt to maintain the rhythm point and vibration duration on the original waveform by manually generating a waveform consistent with the motor frequency, which is complex, inefficient, and lacks real-time performance. Using the driving method provided in this application to drive motor A, when motor A needs to vibrate, the motor's vibration frequency can be detected in real time. The waveform to be vibrated (reference waveform) is directly mapped to a waveform consistent with the current motor vibration frequency through a backward mapping frequency transformation algorithm, obtaining the corresponding target waveform. No manual editing is required, resulting in strong real-time performance.

[0071] Furthermore, the above-described driving method can acquire the target waveform using the waveform transformation method described in any of the above embodiments, and has all the beneficial effects of the waveform transformation method described in any of the above embodiments, which will not be elaborated here.

[0072] In a third aspect, this application provides a waveform transformation module, including a transformation circuit, which is used to execute the waveform transformation method described in any of the above embodiments to transform the reference waveform corresponding to the audio signal into the target waveform of the currently driven motor waiting to be driven components, so as to improve the corresponding driving effect.

[0073] In a fourth aspect, this application provides a driving device including the waveform transformation module described in any of the above embodiments, which can drive the component to be driven using the target waveform currently matched by the component to be driven, and has a higher driving effect.

[0074] This application provides an electronic device in a fifth aspect, including a driving device and a component to be driven as described in any of the above embodiments. The driving device is used to drive the component to be driven with a target waveform, wherein the target waveform matches the current operating frequency of the component to be driven, which can improve the effect of driving the component to be driven according to the target waveform, thereby optimizing the sensory signal provided by the component to be driven and improving the user experience brought by the electronic device.

[0075] Specifically, the components to be driven include a vibration component and / or a light-emitting component. Optionally, the vibration component may include a motor. Optionally, the light-emitting component may include an LED light, etc.

[0076] Although this application has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art based on a reading and understanding of this specification and drawings. This application includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the aforementioned components, the terminology used to describe such components is intended to correspond to any component (unless otherwise indicated) that performs the specified function of said component (e.g., is functionally equivalent to it), even if structurally not equivalent to the disclosed structure performing the functions in the exemplary implementations of this specification shown herein.

[0077] That is, the above description is only an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made using the content of this application’s specification and drawings, such as the combination of technical features between different embodiments, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of this application.

[0078] Furthermore, it should be understood that in the description of this application, the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Additionally, for structural elements with the same or similar characteristics, this application may use the same or different reference numerals for identification. Moreover, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0079] In this application, the term "exemplary" is used to mean "serving as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as more preferred or advantageous than other embodiments. This application has been provided above to enable any person skilled in the art to implement and use it. Various details have been set forth in the above description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be implemented without using these specific details. In other embodiments, well-known structures and processes will not be described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.

Claims

1. A waveform transformation method, characterized in that, The waveform transformation method includes: Obtain the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform; The target length of the target waveform is determined based on the relationship between the target frequency and the reference frequency; Multiple target sampling points on the target waveform are determined based on the target length and the target frequency; Transform the reference data corresponding to each sampling point in the reference waveform to the target data corresponding to each target sampling point in the target waveform; The step of transforming the reference data corresponding to each sampling point in the reference waveform to the target data corresponding to each target sampling point in the target waveform includes: back-mapping the reference data to the corresponding initial target data according to the ratio between the target frequency and the reference frequency; if the initial target data is an integer, then the initial target data is determined as the final target data; if the initial target data is not an integer, then the initial target data is subjected to linear interpolation to obtain the final target data. Determining the target length of the target waveform based on the relationship between the target frequency and the reference frequency includes: if the ratio between the target frequency and the reference frequency is less than a preset processing threshold, then the reference length of the reference waveform is determined as the target length; if the ratio between the target frequency and the reference frequency is greater than or equal to the processing threshold, then the target length is determined based on the ratio between the reference length and the ratio.

2. The waveform transformation method according to claim 1, characterized in that, The waveform transformation method further includes: Obtain the ratio between the target frequency and the reference frequency; The last target data of the target waveform is smoothed according to the ratio.

3. The waveform transformation method according to claim 2, characterized in that, The smoothing process of the target waveform based on the ratio includes: If the ratio is less than a preset processing threshold, the tail data of the target waveform is adjusted to end at 0 according to the changing trend of the reference waveform. If the ratio is greater than or equal to the processing threshold, the length of the target waveform is padded to the reference length of the reference waveform according to the changing trend of the reference waveform.

4. The waveform transformation method according to claim 3, characterized in that, The step of adjusting the tail data of the target waveform to end with 0 based on the changing trend of the reference waveform includes: Obtain the target reference point corresponding to the last target data in the reference waveform; The tail data of the target waveform is determined based on the reference data between the target reference point and the first 0 point following the target reference point.

5. The waveform transformation method according to claim 3, characterized in that, The step of supplementing the length of the target waveform to the reference length of the reference waveform according to the changing trend of the reference waveform includes: Obtain the target reference point corresponding to the last target data in the reference waveform; According to the transformation rules between the reference data and the target data, the reference data after the target reference point is transformed into the corresponding target data until the length of the target waveform becomes the reference length.

6. The waveform transformation method according to claim 5, characterized in that, After the process of padding the length of the target waveform to the reference length of the reference waveform according to the changing trend of the reference waveform if the ratio is greater than or equal to the processing threshold, the waveform transformation method further includes: If the current last target data is not 0, transform the reference data within half a cycle after the target reference point corresponding to the current last target data to the corresponding target data.

7. The waveform transformation method according to claim 1, characterized in that, Before obtaining the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform, the waveform transformation method further includes: If the reference waveform meets the frequency transformation conditions, then the step of obtaining the target frequency of the component to be driven in the matching electronic device and the reference frequency corresponding to the reference waveform is performed.

8. The waveform transformation method according to claim 7, characterized in that, The frequency transformation conditions include: the reference waveform is a specified waveform segment.

9. A driving method, characterized in that, The waveform transformation method includes: The target waveform is obtained using the waveform transformation method according to any one of claims 1 to 8; The target waveform is used to drive the component to be driven.

10. The driving method according to claim 9, characterized in that, The component to be driven includes a vibration component and / or a light-emitting component.

11. A waveform transformation module, characterized in that, It includes a transformation circuit for performing the waveform transformation method according to any one of claims 1 to 8.

12. A driving device, characterized in that, Includes the waveform transformation module as described in claim 11.

13. An electronic device, characterized in that, It includes the driving device as described in claim 12 and the component to be driven, wherein the driving device is used to drive the component to be driven using a target waveform.

Citation Information

Patent Citations

  • Calibration method of driving waveform data of linear motor and electronic equipment

    CN112286165A