CN114236383A - Method and device for generating sweep frequency characteristic curve and storage medium - Google Patents

Method and device for generating sweep frequency characteristic curve and storage medium Download PDF

Info

Publication number
CN114236383A
CN114236383A CN202111514216.6A CN202111514216A CN114236383A CN 114236383 A CN114236383 A CN 114236383A CN 202111514216 A CN202111514216 A CN 202111514216A CN 114236383 A CN114236383 A CN 114236383A
Authority
CN
China
Prior art keywords
frequency
sweep
signal
acceleration
discrete
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111514216.6A
Other languages
Chinese (zh)
Inventor
刘兵
刘钰佳
杨鑫峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Inc
Original Assignee
Goertek Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Inc filed Critical Goertek Inc
Priority to CN202111514216.6A priority Critical patent/CN114236383A/en
Publication of CN114236383A publication Critical patent/CN114236383A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/34Testing dynamo-electric machines
    • G01R31/343Testing dynamo-electric machines in operation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Testing Electric Properties And Detecting Electric Faults (AREA)

Abstract

The invention discloses a method, equipment and a storage medium for generating a sweep frequency characteristic curve, wherein the method comprises the following steps: acquiring an input parameter; if the preset resonant frequency and the preset frequency bandwidth in the input parameters are reasonable, determining the current frequency point through the corresponding frequency difference after the action of the last frequency point is finished; obtaining a phase angle of the current sampling period according to the phase angle, the sampling rate and the current frequency point of the previous sampling period, and constructing a target sweep frequency signal according to the current phase angle and the sweep frequency signal amplitude; driving a device to be tested by adopting a target sweep frequency signal within action time in input parameters, analyzing an acceleration signal obtained according to a voltage signal and a current signal of the device to be tested and basic parameters in the input parameters, and obtaining an acceleration amplitude and a frequency; and in the sweep frequency range, drawing a sweep frequency characteristic curve according to the acceleration amplitude and the frequency corresponding to each frequency point, and determining the optimal sweep frequency characteristic. Therefore, when the frequency sweeping characteristic of the market terminal product is determined, the test accuracy and the test duration are considered at low cost.

Description

Method and device for generating sweep frequency characteristic curve and storage medium
Technical Field
The present invention relates to the field of consumer electronics, and in particular, to a method and an apparatus for generating a sweep frequency characteristic curve, and a computer-readable storage medium.
Background
LRA (Linear motor) has been widely used in various vibration situations of consumer electronics due to its advantages of strong vibration, abundance, crispness, low energy consumption, etc. In order to fully utilize the resonance characteristics of a linear motor and find a frequency range with the maximum vibration intensity, it is necessary to measure the frequency sweep characteristics of the motor, that is, the variation curve of the vibration intensity (acceleration peak value) of the motor with the frequency per unit driving voltage.
In the prior art, a linear motor is usually fixed on a tool block, an acceleration sensor is coaxially installed in the vibration direction of the motor, and a sweep frequency characteristic curve is drawn by testing acceleration amplitudes under the drive of voltages with different frequencies. The method needs expensive acceleration sensors, is complex in test system, is only suitable for testing the motor before leaving factory, and cannot test the frequency sweeping characteristic once the motor is installed in electronic products such as a mobile phone, a watch and the like and is circulated to a market terminal.
Disclosure of Invention
The invention mainly aims to provide a method for generating a frequency sweep characteristic curve, and aims to solve the technical problem that in the prior art, when the frequency sweep characteristic of a market terminal product is determined, both the test accuracy and the test duration cannot be considered at low cost.
In order to achieve the above object, the present invention provides a method for generating a sweep frequency characteristic curve, where the method for generating a sweep frequency characteristic curve includes:
acquiring an input parameter, judging whether the input parameter meets a preset parameter judgment condition, if so, determining a current discrete frequency point through a previous discrete frequency point after the action of the previous discrete frequency point is finished, and constructing to obtain a target frequency sweeping signal;
in a preset action time, driving a device to be tested by adopting the target sweep frequency signal, acquiring an acceleration signal of the device to be tested, and analyzing the acceleration signal to obtain an acceleration amplitude and an acceleration frequency;
and drawing a sweep frequency characteristic curve by using the acceleration amplitude and the acceleration frequency corresponding to each discrete frequency point within a preset sweep frequency range.
Optionally, the step after the last discrete frequency point action is finished further includes:
if the last discrete frequency point is located between the lower limit frequency of the preset sweep frequency range and the lower limit frequency of the preset frequency bandwidth of the device to be tested, determining the frequency difference of the adjacent discrete frequency points of the last discrete frequency point to be a first frequency difference;
if the last discrete frequency point is located between the frequency ranges of the preset frequency bandwidths, determining that the frequency difference of the adjacent discrete frequency points of the last discrete frequency point is a second frequency difference;
and if the last discrete frequency point is located between the upper limit frequency of the preset frequency bandwidth and the upper limit frequency of the preset sweep frequency range, determining that the frequency difference of the adjacent discrete frequency point of the last discrete frequency point is a third frequency difference.
Optionally, the step of determining the current discrete frequency point through the previous discrete frequency point includes:
if the last discrete frequency point is between the lower limit frequency of the preset sweep frequency range and the lower limit frequency of the preset frequency bandwidth of the device to be tested, adding the first frequency difference to the frequency of the last discrete frequency point to obtain the current discrete frequency point;
if the last discrete frequency point is located between the frequency ranges of the preset frequency bandwidths, the second frequency difference is added on the basis of the frequency of the last discrete frequency point to obtain the current discrete frequency point;
and if the last discrete frequency point is between the upper limit frequency of the preset frequency bandwidth and the upper limit frequency of the preset sweep frequency range, adding the third frequency difference to the frequency of the last discrete frequency point to obtain the current discrete frequency point.
Optionally, the step of constructing a target swept frequency signal includes:
and obtaining a second phase angle of the current sampling period according to the first phase angle, the sampling rate and the current discrete frequency point of the last sampling period, and constructing the target sweep frequency signal according to a preset sweep frequency signal amplitude and the second phase angle.
Optionally, the step of driving the device under test with the target frequency sweep signal includes:
and after the power amplification circuit is adopted to carry out power amplification on the target frequency sweeping signal, driving the device to be tested.
Optionally, the step of acquiring the acceleration signal of the dut includes:
calculating to obtain a sampling period according to the sampling rate, taking the amplitude of the target sweep frequency signal in the sampling period as a voltage signal, and acquiring a current signal corresponding to the voltage signal at the same moment;
and after filtering the voltage signal and the current signal to remove high-frequency noise, analyzing according to the basic parameters of the device to be tested and the filtered voltage signal and current signal to obtain the acceleration signal.
Optionally, the step of analyzing the acceleration signal to obtain an acceleration amplitude and an acceleration frequency includes:
acquiring an acceleration signal of the last period of the action time of the current discrete frequency point to obtain the acceleration amplitude;
and acquiring the time difference of the adjacent zero-crossing moments of the acceleration signal waveform in the action time of the current discrete frequency point to obtain the acceleration frequency.
Optionally, after the step of analyzing the acceleration signal to obtain the acceleration amplitude and the acceleration frequency, the method further includes:
and canceling the target frequency sweeping signal, executing the step of determining the current discrete frequency point through the last discrete frequency point to determine a new current discrete frequency point, and executing the step of drawing a frequency sweeping characteristic curve by using the acceleration amplitude and the acceleration frequency corresponding to each discrete frequency point in the frequency sweeping range until the current discrete frequency point is greater than the upper limit frequency of the preset frequency sweeping range.
In addition, to achieve the above object, the present invention further provides a device for generating a frequency sweep characteristic curve, where the device for generating a frequency sweep characteristic curve includes: the method comprises the steps of generating a frequency sweep characteristic curve, and executing the program to generate the frequency sweep characteristic curve.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, in which a program for generating a frequency sweep characteristic curve is stored, and the program for generating a frequency sweep characteristic curve realizes the steps of the method for generating a frequency sweep characteristic curve as described above when executed by a processor.
According to the method, the device and the computer-readable storage medium for generating the frequency sweep characteristic curve, which are provided by the embodiment of the invention, the frequency sweep characteristic curve is preferably divided into 3 frequency sections according to the frequency sweep range and the preset resonant frequency of a device to be tested, and the frequency differences of corresponding adjacent discrete frequency points are respectively set, so that frequency sweep signals with non-uniform distribution of the discrete frequency points are constructed; the sweep frequency signal is used as a voltage signal to drive a motor, and a current signal is detected; and analyzing the acceleration signal according to the voltage signal and the current signal, and drawing a sweep frequency characteristic curve of the device to be tested.
According to the characteristic that the frequency sweeping characteristic of a device to be tested has a peak value at the resonance frequency, constructing frequency sweeping signals with non-uniformly distributed discrete frequency points, wherein the distributed discrete frequency points are densely distributed near the resonance frequency; at the position far away from the resonant frequency, the discrete frequency points are sparsely distributed, so that the test duration is not increased while the precision of the sweep frequency characteristic curve of the device to be tested is improved; in addition, the design can analyze the acceleration signal only by the current sensor of the power amplifier, an expensive acceleration sensor is not needed, the cost is low, the realization is simple, the frequency sweeping characteristic test of the product at a market terminal can be completed, the real-time calibration of the frequency sweeping characteristic of the device to be tested under different use environments is realized, and the optimal performance is provided.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for generating a sweep characteristic curve according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating an implementation procedure of an embodiment of a method for generating a sweep frequency characteristic curve according to the present invention;
FIG. 4 is a block diagram of a hardware driving system according to an embodiment of the method for generating a sweep frequency characteristic curve of the present invention;
FIG. 5 is a schematic diagram of a frequency sweep signal according to an embodiment of a method for generating a frequency sweep characteristic curve of the present invention;
FIG. 6 is a schematic diagram of an acceleration signal according to an embodiment of a method for generating a frequency sweep characteristic curve according to the present invention;
FIG. 7 is a schematic view of an acceleration amplitude of an embodiment of a method for generating a sweep frequency characteristic curve according to the present invention;
FIG. 8 is a schematic view of acceleration frequency according to an embodiment of a method for generating a frequency sweep characteristic curve of the present invention;
fig. 9 is a schematic diagram of a frequency sweep characteristic curve according to an embodiment of the method for generating a frequency sweep characteristic curve of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The device of the embodiment of the invention can be a PC, or a terminal device such as a tablet computer and a portable computer.
As shown in fig. 1, the implementation apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the implementing device may further include RF (Radio Frequency) circuits, sensors, WiFi modules, and the like. Such as light sensors, motion sensors, and other sensors. Those skilled in the art will appreciate that the implementation arrangement shown in fig. 1 is not intended to be limiting of the implementation arrangement, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, the memory 1005, which is a kind of computer storage medium, may include an operating system, a network communication module, a user interface module, and a generation program of the sweep characteristic curve.
In the implementation device shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for receiving input parameters and transmitting data; the processor 1001 may be configured to call a generation program of the sweep characteristic curve stored in the memory 1005, and perform the following operations:
acquiring an input parameter, judging whether the input parameter meets a preset parameter judgment condition, if so, determining a current discrete frequency point through a previous discrete frequency point after the action of the previous discrete frequency point is finished, and constructing to obtain a target frequency sweeping signal;
in a preset action time, driving a device to be tested by adopting the target sweep frequency signal, acquiring an acceleration signal of the device to be tested, and analyzing the acceleration signal to obtain an acceleration amplitude and an acceleration frequency;
and drawing a sweep frequency characteristic curve by using the acceleration amplitude and the acceleration frequency corresponding to each discrete frequency point within a preset sweep frequency range.
Further, the processor 1001 may call the generation program of the sweep characteristic curve stored in the memory 1005, and further perform the following operations:
after the action of the last discrete frequency point is finished, the method further comprises the following steps:
if the last discrete frequency point is located between the lower limit frequency of the preset sweep frequency range and the lower limit frequency of the preset frequency bandwidth of the device to be tested, determining the frequency difference of the adjacent discrete frequency points of the last discrete frequency point to be a first frequency difference;
if the last discrete frequency point is located between the frequency ranges of the preset frequency bandwidths, determining that the frequency difference of the adjacent discrete frequency points of the last discrete frequency point is a second frequency difference;
and if the last discrete frequency point is located between the upper limit frequency of the preset frequency bandwidth and the upper limit frequency of the preset sweep frequency range, determining that the frequency difference of the adjacent discrete frequency point of the last discrete frequency point is a third frequency difference.
Further, the processor 1001 may call the generation program of the sweep characteristic curve stored in the memory 1005, and further perform the following operations:
the step of determining the current discrete frequency point through the last discrete frequency point comprises the following steps:
if the last discrete frequency point is between the lower limit frequency of the preset sweep frequency range and the lower limit frequency of the preset frequency bandwidth of the device to be tested, adding the first frequency difference to the frequency of the last discrete frequency point to obtain the current discrete frequency point;
if the last discrete frequency point is located between the frequency ranges of the preset frequency bandwidths, the second frequency difference is added on the basis of the frequency of the last discrete frequency point to obtain the current discrete frequency point;
and if the last discrete frequency point is between the upper limit frequency of the preset frequency bandwidth and the upper limit frequency of the preset sweep frequency range, adding the third frequency difference to the frequency of the last discrete frequency point to obtain the current discrete frequency point.
Further, the processor 1001 may call the generation program of the sweep characteristic curve stored in the memory 1005, and further perform the following operations:
the step of constructing the target swept frequency signal comprises:
and obtaining a second phase angle of the current sampling period according to the first phase angle, the sampling rate and the current discrete frequency point of the last sampling period, and constructing the target sweep frequency signal according to a preset sweep frequency signal amplitude and the second phase angle.
Further, the processor 1001 may call the generation program of the sweep characteristic curve stored in the memory 1005, and further perform the following operations:
the step of driving the device to be tested by adopting the target frequency sweeping signal comprises the following steps:
and after the power amplification circuit is adopted to carry out power amplification on the target frequency sweeping signal, driving the device to be tested.
Further, the processor 1001 may call the generation program of the sweep characteristic curve stored in the memory 1005, and further perform the following operations:
the step of obtaining the acceleration signal of the device to be tested comprises the following steps:
calculating to obtain a sampling period according to the sampling rate, taking the amplitude of the target sweep frequency signal in the sampling period as a voltage signal, and acquiring a current signal corresponding to the voltage signal at the same moment;
and after filtering the voltage signal and the current signal to remove high-frequency noise, analyzing according to the basic parameters of the device to be tested and the filtered voltage signal and current signal to obtain the acceleration signal.
Further, the processor 1001 may call the generation program of the sweep characteristic curve stored in the memory 1005, and further perform the following operations:
the step of analyzing the acceleration signal to obtain an acceleration amplitude and an acceleration frequency includes:
acquiring an acceleration signal of the last period of the action time of the current discrete frequency point to obtain the acceleration amplitude;
and acquiring the time difference of the adjacent zero-crossing moments of the acceleration signal waveform in the action time of the current discrete frequency point to obtain the acceleration frequency.
Further, the processor 1001 may call the generation program of the sweep characteristic curve stored in the memory 1005, and further perform the following operations:
after the step of analyzing the acceleration signal to obtain the acceleration amplitude and the acceleration frequency, the method further includes:
and canceling the target frequency sweeping signal, executing the step of determining the current discrete frequency point through the last discrete frequency point to determine a new current discrete frequency point, and executing the step of drawing a frequency sweeping characteristic curve by using the acceleration amplitude and the acceleration frequency corresponding to each discrete frequency point in the frequency sweeping range until the current discrete frequency point is greater than the upper limit frequency of the preset frequency sweeping range.
Referring to fig. 2, the present invention provides a method for generating a sweep frequency characteristic curve, and in a process of the method for generating a sweep frequency characteristic curve of the present invention, the process includes:
step S1000, acquiring input parameters, judging whether the input parameters meet preset parameter judgment conditions or not, if so, determining the current discrete frequency point through the last discrete frequency point after the action of the last discrete frequency point is finished, and constructing to obtain a target frequency sweeping signal.
The frequency sweep is designed for testing, and refers to a process that the frequency of a frequency sweep signal is continuously changed from high to low (or from low to high) in a certain frequency band, and is mainly used for testing the frequency characteristics of components and the whole machine. In this embodiment, a linear motor is preferred as the device under test, and the acquired input parameters include 8 parts:
1. the amplitude Um of the sweep frequency signal is the peak value of the sweep frequency voltage signal and is generally set to be equal to the rated voltage value of the linear motor;
2. a frequency sweep range [ fL, fH ], wherein the frequency sweep range refers to a linear motor characteristic frequency range which a user needs to know, the lower limit frequency is fL, and the upper limit frequency is fH;
3. a preset resonant frequency f0 of the linear motor, wherein the preset resonant frequency refers to a resonant frequency determined by the linear motor during design and is slightly different from an actual resonant frequency of the linear motor;
4. a preset frequency bandwidth [ f0L, f0H ] of the linear motor, wherein the preset frequency bandwidth refers to a frequency range, which is determined by the linear motor in design, has a relatively high acceleration response amplitude and is near a preset resonant frequency f0, the lower limit frequency of the frequency range is f0L, and the upper limit frequency of the frequency range is f 0H;
5. in the embodiment of the present invention, the frequency difference of adjacent discrete frequency points is set as the log difference values df1, df2, and df3 of the adjacent discrete frequency points, where df1 is the log difference value of the adjacent discrete frequency points from the lower limit frequency of the sweep frequency range to the lower limit frequency band [ fL, f0L ] of the preset frequency bandwidth; df2 is the logarithmic difference value of adjacent discrete frequency points of a frequency segment [ f0L, f0H ] from the lower limit frequency of the preset frequency bandwidth to the upper limit frequency of the preset frequency bandwidth; df3 is the logarithmic difference value of adjacent discrete frequency points of the upper limit frequency of the preset frequency bandwidth to the upper limit frequency range [ f0H, fH ] of the sweep frequency range; the acceleration response amplitude changes in the preset frequency bandwidth range to the maximum, so that the logarithmic frequency difference df2 is set to the minimum; the acceleration response amplitude below the preset frequency bandwidth range changes for the second time, so the logarithmic frequency difference df1 is set to be slightly larger than df 2; and the acceleration response amplitude above the preset frequency bandwidth range is the smallest in change, so the logarithmic frequency difference df3 is the largest.
6. The action time dt of each discrete frequency point refers to the time length of the independent continuous action of each discrete frequency point, and is set for the input directly received according to the test requirement, and the action time dt of each discrete frequency point is the same;
7. the sampling rate Fs, which refers to the signal processing sampling frequency discretely controlled by the hardware controller.
8. Basic parameters of the linear motor comprise vibrator mass m, magnetic field intensity Bl, spring stiffness coefficient k, damping coefficient R, coil direct-current resistance R and the like.
Optionally, the step of determining whether the input parameter meets a preset parameter determination condition includes:
respectively comparing the preset resonant frequency with the preset frequency bandwidth, and comparing the preset frequency bandwidth with the sweep frequency range;
if the preset resonant frequency is within the preset frequency bandwidth, the preset resonant frequency is reasonable;
and if the preset frequency bandwidth is in the sweep frequency range, the preset frequency bandwidth is reasonable.
In this embodiment, the specific judgment items for judging whether the input parameter meets the preset parameter judgment condition are as follows:
judging whether the preset resonant frequency f0 is in the range of a preset frequency bandwidth [ f0L, f0H ], namely whether f0L is more than or equal to f0 is more than or equal to f0H is met, and if so, setting the parameters reasonably; if not, feeding back the 'unreasonable resonance frequency or motor bandwidth setting', and prompting the user to input again;
judging whether the preset frequency bandwidth [ f0L, f0H ] is in the sweep frequency range [ fL, fH ], namely whether the preset frequency bandwidth [ f0L, f0H ] meets the condition that the fL is not less than f0L and not less than f0H and not more than fH, and if so, reasonably setting the parameters; if not, feeding back the unreasonable motor bandwidth or frequency sweep range setting and prompting the user to re-input.
In this embodiment, on the premise that the preset resonant frequency and the preset frequency bandwidth are determined to be reasonable, the current discrete frequency point is determined according to the frequency difference of the adjacent discrete frequency point corresponding to the previous discrete frequency point. Or, after judging whether the input parameters of any one or more of the 8 parts in step S1000 are reasonable, determining the current discrete frequency point according to the frequency difference of the adjacent discrete frequency point corresponding to the previous discrete frequency point. The judgment number and judgment condition of the specific input parameters are determined by the specific test requirements.
In other embodiments, the frequency sweep range may be divided into 3 frequency bands according to the characteristics of the linear motor, wherein the 3 frequency bands are respectively lower than the preset frequency bandwidth, the preset frequency bandwidth itself and higher than the preset frequency bandwidth. Similarly, a reasonable number of frequency bands can be set according to the test precision and the test requirements, and the frequency difference of the corresponding frequency band is set, the frequency difference of the corresponding frequency band meets the small requirement of the frequency difference setting of the frequency band with large acceleration response amplitude change, so that the sweep frequency signal with non-uniformly distributed discrete frequency points is constructed, and the discrete frequency points are densely distributed near the resonant frequency; at the position far away from the resonant frequency, the discrete frequency points are sparsely distributed, so that the testing time length is not increased while the precision of the frequency sweep characteristic curve of the motor is improved.
And S2000, driving a device to be tested by adopting the target frequency sweeping signal within a preset action time, acquiring an acceleration signal of the device to be tested, and analyzing the acceleration signal to obtain an acceleration amplitude and an acceleration frequency.
In this embodiment, the linear motor is driven by the target sweep signal u corresponding to the discrete frequency point within the action time dt of the discrete frequency point.
The vibration of a linear motor is a process in which electrical and kinematic variables are mutually influenced and coupled. The coil is driven by voltage to form current, the ampere force generated by the current drives the vibrator to move, and the counter potential generated by the movement adversely affects the current, so that the movement state quantities such as speed, acceleration and the like can be analyzed by combining an electrical equation and a kinematic equation of the linear motor according to the driving voltage and a feedback current signal. If acceleration analysis is performed once at each excitation frequency, that is, at each discrete frequency point, the acceleration amplitude am corresponding to each discrete frequency point can be obtained, and then the sweep frequency characteristic curve of the linear motor is obtained.
According to the structural design of the linear motor, a relation between voltage and current is obtained:
u-iR-Blv=0,
in the formula, u and i are voltage and current; r is the direct current resistance of the coil; bl is an electromagnetic parameter, i.e. magnetic field strength; v is the velocity.
Solving a speed expression according to the formula:
v=(u-iR)/Bl,
in a discrete control system, the above equation is expressed as:
v(z)=[u(z)-i(z)R]/Bl,
and (3) obtaining an acceleration expression by differentiating the formula:
a(z)=[v(z)-v(z-1)]/Ts=[u(z)-i(z)R]/BlTs-[u(z-1)-i(z-1)R]/BlTs,
in the formula, Ts is a sampling period.
In the action time, the linear motor is driven by the target sweep frequency signal constructed in the step S1000, an acceleration signal of the current discrete frequency point is obtained according to a voltage signal and a current signal of the linear motor, a coil direct-current resistance R and a magnetic field intensity Bl in basic parameters, and the acceleration signal is analyzed to obtain an acceleration amplitude am and an acceleration frequency fa.
And S3000, drawing a sweep frequency characteristic curve according to the acceleration amplitude and the acceleration frequency corresponding to each discrete frequency point in a preset sweep frequency range.
In this embodiment, the acceleration signal can be analyzed according to the voltage and current signals, so as to detect the acceleration peak value, and the acceleration peak values corresponding to different discrete frequency points within the sweep frequency range are plotted into a curve, so as to obtain the sweep frequency characteristic curve of the linear motor. When the sweep frequency characteristic curve is drawn, the acceleration frequency fa is taken as an abscissa, the acceleration amplitude am is taken as an ordinate, the curve is drawn, and the acceleration frequency fa of the abscissa is presented in a logarithmic coordinate form to obtain the sweep frequency characteristic curve.
In summary, in this embodiment, the specific implementation steps are as shown in fig. 3: a. setting parameters; b. judging the rationality of the parameters; c. constructing a frequency sweeping signal; d. a drive motor; e. analyzing the acceleration signal; f. and drawing a sweep frequency characteristic curve. Relying on a hardware drive system as shown in fig. 4, wherein,
parameter setting 1:
the parameter setting module sets various parameters of the system, as described in step S1000.
Algorithm processing 2:
the algorithm processing module generates a target frequency sweeping signal according to each parameter set by the parameter setting module; and analyzing an acceleration signal and drawing a frequency sweeping characteristic curve of the linear motor, namely a logarithmic coordinate change curve of the acceleration amplitude of the linear motor along with the frequency according to the target frequency sweeping signal and the current signal fed back by the current detection module. The specific processing procedure is as described in step S1000 to step S3000.
Drive signal 3:
the driving signal is a sweep frequency signal which is generated by the algorithm processing module and used for acquiring a sweep frequency characteristic curve of the linear motor.
Power amplification 4:
the selected power amplifier is usually an amplifier for power matching of an input signal, such as a class a, B, AB, or D driver, and the input signal may be an analog signal or a digital signal of a certain system. In the present embodiment, a current sensor is usually designed at the output end of the amplifier, and the current sensor returns to the algorithm processing module 2 through the current detection module 6.
LRA5:
The LRA (Linear motor) is a Linear motor device body.
Current detection 6:
the current detection module detects a current signal generated in a linear motor coil in the action process of the sweep frequency voltage signal through a current sensor carried by the power amplification module.
In this embodiment, the frequency sweep signal is preferably divided into 3 frequency segments according to the frequency sweep range and the preset resonant frequency of the device to be tested, and the frequency differences of corresponding adjacent discrete frequency points are respectively set, so as to construct a frequency sweep signal with non-uniform distribution of discrete frequency points; the sweep frequency signal is used as a voltage signal to drive a motor, and a current signal is detected; and analyzing the acceleration signal according to the voltage signal and the current signal, and drawing a sweep frequency characteristic curve of the device to be tested.
According to the characteristic that the frequency sweeping characteristic of a device to be tested has a peak value at the resonance frequency, constructing frequency sweeping signals with non-uniformly distributed discrete frequency points, wherein the distributed discrete frequency points are densely distributed near the resonance frequency; at the position far away from the resonant frequency, the discrete frequency points are sparsely distributed, so that the test duration is not increased while the precision of the sweep frequency characteristic curve of the device to be tested is improved; in addition, the design can analyze the acceleration signal only by the current sensor of the power amplifier, an expensive acceleration sensor is not needed, the cost is low, the realization is simple, the frequency sweeping characteristic test of the product at a market terminal can be completed, the real-time calibration of the frequency sweeping characteristic of the device to be tested under different use environments is realized, and the optimal performance is provided.
Optionally, the step after the last discrete frequency point action is finished further includes:
if the last discrete frequency point is located between the lower limit frequency of the preset sweep frequency range and the lower limit frequency of the preset frequency bandwidth of the device to be tested, determining the frequency difference of the adjacent discrete frequency points of the last discrete frequency point to be a first frequency difference;
if the last discrete frequency point is located between the frequency ranges of the preset frequency bandwidths, determining that the frequency difference of the adjacent discrete frequency points of the last discrete frequency point is a second frequency difference;
and if the last discrete frequency point is located between the upper limit frequency of the preset frequency bandwidth and the upper limit frequency of the preset sweep frequency range, determining that the frequency difference of the adjacent discrete frequency point of the last discrete frequency point is a third frequency difference.
In this embodiment, after the action of the previous discrete frequency point is finished, the log frequency difference of the adjacent discrete frequency points needs to be determined, so as to determine the current discrete frequency point. Determining the logarithmic frequency difference df of adjacent discrete frequency points according to the frequency range of the last discrete frequency point f (n-1), and if f (n-1) is in the range of [ fL, f0L ], determining the logarithmic frequency difference of the adjacent discrete frequency points as df1, namely a first frequency difference; if f (n-1) is in the range of [ f0L, f0H ], determining the logarithmic frequency difference of adjacent discrete frequency points as df2, namely a second frequency difference; if f (n-1) is in the range of [ f0H, fH ], the logarithmic frequency difference of adjacent discrete frequency points is determined as df3, i.e., the third frequency difference. Wherein, the initial discrete frequency f (0) is the lower limit frequency fL of the sweep frequency range. Since the duration of each discrete frequency point is dt, this step is performed every dt times.
Optionally, the step of determining the current discrete frequency point through the previous discrete frequency point includes:
if the last discrete frequency point is between the lower limit frequency of the preset sweep frequency range and the lower limit frequency of the preset frequency bandwidth of the device to be tested, adding the first frequency difference to the frequency of the last discrete frequency point to obtain the current discrete frequency point;
if the last discrete frequency point is located between the frequency ranges of the preset frequency bandwidths, the second frequency difference is added on the basis of the frequency of the last discrete frequency point to obtain the current discrete frequency point;
and if the last discrete frequency point is between the upper limit frequency of the preset frequency bandwidth and the upper limit frequency of the preset sweep frequency range, adding the third frequency difference to the frequency of the last discrete frequency point to obtain the current discrete frequency point.
In this embodiment, when calculating the current discrete frequency point f (n), according to the log frequency difference df between the previous discrete frequency point f (n-1) and the determined adjacent discrete frequency point, the current discrete frequency point f (n) is calculated, lgf (n) is lgf (n-1) + df, and both sides of the equation are given the base number of 10, so that the specific calculation formula is obtained: f (n) × 10 (n-1)dfIf the current discrete frequency point f (n) is larger than the upper limit frequency fH of the sweep frequency range, the sweep frequency signal is constructed, and all the steps are stopped. Since the duration of each discrete frequency point is dt, this step is also performed every dt times.
Optionally, the step of constructing a target swept frequency signal includes:
and obtaining a second phase angle of the current sampling period according to the first phase angle, the sampling rate and the current discrete frequency point of the last sampling period, and constructing the target sweep frequency signal according to a preset sweep frequency signal amplitude and the second phase angle.
In this embodiment, a second phase angle phi (m) of the current sampling period is calculated according to a first phase angle phi (m-1) of the previous sampling period, a sampling rate Fs, and a current discrete frequency point f (n), and the specific calculation formula is as follows: phi (m) ═ phi (m-1) +2 pi × f (n)/Fs. The phase angle phi (0) of the initial sampling period is 0, and the step of calculating the current sampling period is executed every sampling period, that is, the execution frequency is Fs.
Calculating a target frequency sweeping signal value u (m) of the current sampling period according to the frequency sweeping signal amplitude Um and the second phase angle phi (m), wherein the specific calculation formula is as follows: u (m) ═ Umsin [ phi (m) ]. The target sweep signal values u (0), u (1), …, u (m) for all sampling periods from the start to the end of the sweep signal configuration together constitute the target sweep signal u as shown in fig. 5.
Optionally, the step of driving the device under test with the target frequency sweep signal includes:
and after the power amplification circuit is adopted to carry out power amplification on the target frequency sweeping signal, driving the device to be tested.
In this embodiment, the power amplification circuit is used to power-amplify the constructed target sweep signal u, drive the linear motor, and detect the current signal using the current sensor of the power amplification circuit.
Optionally, the step of acquiring the acceleration signal of the dut includes:
calculating to obtain a sampling period according to the sampling rate, taking the amplitude of the target sweep frequency signal in the sampling period as a voltage signal, and acquiring a current signal corresponding to the voltage signal at the same moment;
and after filtering the voltage signal and the current signal to remove high-frequency noise, analyzing according to the basic parameters of the device to be tested and the filtered voltage signal and current signal to obtain the acceleration signal.
In this embodiment, the acceleration signal is obtained by acquiring the voltage and current signals and combining the basic parameters. Using the sweep signal values u (0), u (1), …, u (m) of each sampling period as voltage signals u (z); using the corresponding current signal values i (0), i (1), …, i (m) of each sampling period as current signals i (z); wherein z is 1, 2, …, m;
then removing high-frequency noise, filtering the voltage and current signals by adopting a low-pass filter, and removing high-frequency burrs, wherein the cut-off frequency fc _ LP of the low-pass filter needs to be higher than the upper limit frequency fH of the sweep frequency range, and can be generally set as fc _ LP-2 fH;
analyzing the speed signal v (z) according to the voltage signal u (z) and the current signal i (z), wherein the specific calculation formula is as follows: v (z) ═ u (z) -i (z) R ]/Bl;
analyzing the acceleration signal a (z), deriving the velocity signal v (z), and analyzing the acceleration signal, wherein the specific calculation formula is as follows: a (z) ═ v (z) -v (z-1) ]/Ts ═ u (z) -i (z) R ]/BlTs- [ u (z-1) -i (z-1) R ]/BlTs, i.e. a (z) ═ Fs × [ v (z) -v (z-1) ],
wherein Fs is 1/Ts. The resulting acceleration signal is shown in fig. 6.
Optionally, the step of analyzing the acceleration signal to obtain an acceleration amplitude and an acceleration frequency includes:
acquiring an acceleration signal of the last period of the action time of the current discrete frequency point to obtain the acceleration amplitude;
and acquiring the time difference of the adjacent zero-crossing moments of the acceleration signal waveform in the action time of the current discrete frequency point to obtain the acceleration frequency.
In this embodiment, the acceleration amplitude of the last cycle of the duration of each discrete frequency point is detected as the acceleration amplitude am of the discrete frequency point. Since the continuous action time of each discrete frequency point is dt, the detection process is executed once every dt time;
detecting two adjacent positive zero-crossing moments or the time difference dt _ a of two adjacent negative zero-crossing moments of the acceleration waveform in the continuous action time of each discrete frequency point, and taking the reciprocal to obtain the acceleration frequency fa, wherein the specific calculation formula is as follows: fa is 1/dt _ a. Wherein, the positive zero-crossing time of the acceleration waveform refers to the time when the acceleration value changes from negative to positive; the negative zero-crossing time of the acceleration waveform refers to the time when the acceleration value changes from positive to negative. Since each discrete frequency point has a duration dt, the detection process is performed every dt times.
The acceleration amplitude and the acceleration frequency obtained by analyzing the acceleration signal are shown in fig. 7 and 8.
Optionally, after the step of analyzing the acceleration signal to obtain the acceleration amplitude and the acceleration frequency, the method further includes:
and canceling the target frequency sweeping signal, executing the step of determining the current discrete frequency point through the last discrete frequency point to determine a new current discrete frequency point, and executing the step of drawing a frequency sweeping characteristic curve by using the acceleration amplitude and the acceleration frequency corresponding to each discrete frequency point in the frequency sweeping range until the current discrete frequency point is greater than the upper limit frequency of the preset frequency sweeping range.
In this embodiment, after analyzing the acceleration signal corresponding to the current discrete frequency point to obtain the acceleration amplitude and the acceleration frequency, canceling the target frequency sweep signal corresponding to the current discrete frequency point, skipping to the next adjacent discrete frequency point for continuous action, that is, executing the step of determining a new current discrete frequency point, when the current discrete frequency point is greater than the upper limit frequency of the frequency sweep range, it is proved that the acceleration amplitudes and the acceleration frequencies of all the discrete frequency points are all collected, and then a frequency sweep characteristic curve can be drawn to determine the optimal frequency sweep characteristic. The plotted sweep characteristic is shown in fig. 9.
In addition, an embodiment of the present invention further provides a device for generating a frequency sweep characteristic curve, where the device for generating a frequency sweep characteristic curve includes: the method comprises the steps of generating a frequency sweep characteristic curve, and executing the program to generate the frequency sweep characteristic curve.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a program for generating a frequency sweep characteristic curve is stored on the computer-readable storage medium, and when the program for generating a frequency sweep characteristic curve is executed by a processor, the steps of the method for generating a frequency sweep characteristic curve as described above are implemented.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for generating a sweep frequency characteristic curve is characterized by comprising the following steps:
acquiring an input parameter, judging whether the input parameter meets a preset parameter judgment condition, if so, determining a current discrete frequency point through a previous discrete frequency point after the action of the previous discrete frequency point is finished, and constructing to obtain a target frequency sweeping signal;
in a preset action time, driving a device to be tested by adopting the target sweep frequency signal, acquiring an acceleration signal of the device to be tested, and analyzing the acceleration signal to obtain an acceleration amplitude and an acceleration frequency;
and drawing a sweep frequency characteristic curve by using the acceleration amplitude and the acceleration frequency corresponding to each discrete frequency point within a preset sweep frequency range.
2. A method for generating a sweep frequency characteristic curve as claimed in claim 1, wherein the step after the end of the previous discrete frequency point action further comprises:
if the last discrete frequency point is located between the lower limit frequency of the preset sweep frequency range and the lower limit frequency of the preset frequency bandwidth of the device to be tested, determining the frequency difference of the adjacent discrete frequency points of the last discrete frequency point to be a first frequency difference;
if the last discrete frequency point is located between the frequency ranges of the preset frequency bandwidths, determining that the frequency difference of the adjacent discrete frequency points of the last discrete frequency point is a second frequency difference;
and if the last discrete frequency point is located between the upper limit frequency of the preset frequency bandwidth and the upper limit frequency of the preset sweep frequency range, determining that the frequency difference of the adjacent discrete frequency point of the last discrete frequency point is a third frequency difference.
3. A method for generating a sweep frequency characteristic curve as claimed in claim 2, wherein the step of determining the current discrete frequency point through the previous discrete frequency point comprises:
if the last discrete frequency point is between the lower limit frequency of the preset sweep frequency range and the lower limit frequency of the preset frequency bandwidth of the device to be tested, adding the first frequency difference to the frequency of the last discrete frequency point to obtain the current discrete frequency point;
if the last discrete frequency point is located between the frequency ranges of the preset frequency bandwidths, the second frequency difference is added on the basis of the frequency of the last discrete frequency point to obtain the current discrete frequency point;
and if the last discrete frequency point is between the upper limit frequency of the preset frequency bandwidth and the upper limit frequency of the preset sweep frequency range, adding the third frequency difference to the frequency of the last discrete frequency point to obtain the current discrete frequency point.
4. A method for generating a swept frequency characteristic curve as claimed in claim 3, wherein the step of constructing a target swept frequency signal comprises:
and obtaining a second phase angle of the current sampling period according to the first phase angle, the sampling rate and the current discrete frequency point of the last sampling period, and constructing the target sweep frequency signal according to a preset sweep frequency signal amplitude and the second phase angle.
5. A method for generating a swept frequency characteristic curve as claimed in claim 1, wherein the step of driving a device under test with the target swept frequency signal comprises:
and after the power amplification circuit is adopted to carry out power amplification on the target frequency sweeping signal, driving the device to be tested.
6. A method for generating a swept frequency characteristic curve as claimed in claim 1, wherein the step of acquiring the acceleration signal of the device under test comprises:
calculating to obtain a sampling period according to the sampling rate, taking the amplitude of the target sweep frequency signal in the sampling period as a voltage signal, and acquiring a current signal corresponding to the voltage signal at the same moment;
and after filtering the voltage signal and the current signal to remove high-frequency noise, analyzing according to the basic parameters of the device to be tested and the filtered voltage signal and current signal to obtain the acceleration signal.
7. A method for generating a sweep frequency characteristic curve as claimed in claim 1, wherein the step of analyzing the acceleration signal to obtain an acceleration amplitude and an acceleration frequency comprises:
acquiring an acceleration signal of the last period of the action time of the current discrete frequency point to obtain the acceleration amplitude;
and acquiring the time difference of the adjacent zero-crossing moments of the acceleration signal waveform in the action time of the current discrete frequency point to obtain the acceleration frequency.
8. A method for generating a swept frequency characteristic curve as claimed in any one of claims 1 to 7, wherein the step of after analyzing the acceleration signal to obtain an acceleration amplitude and an acceleration frequency further comprises:
and canceling the target frequency sweeping signal, executing the step of determining the current discrete frequency point through the last discrete frequency point to determine a new current discrete frequency point, and executing the step of drawing a frequency sweeping characteristic curve by using the acceleration amplitude and the acceleration frequency corresponding to each discrete frequency point in the frequency sweeping range until the current discrete frequency point is greater than the upper limit frequency of the preset frequency sweeping range.
9. A sweep frequency characteristic generation apparatus, comprising: a memory, a processor and a program for generating a frequency sweep characteristic stored in the memory and executable on the processor, the program for generating a frequency sweep characteristic implementing the steps of the method for generating a frequency sweep characteristic as claimed in any one of claims 1 to 8 when executed by the processor.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a program for generating a frequency sweep characteristic, which when executed by a processor implements the steps of the method for generating a frequency sweep characteristic as claimed in any one of claims 1 to 8.
CN202111514216.6A 2021-12-10 2021-12-10 Method and device for generating sweep frequency characteristic curve and storage medium Pending CN114236383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111514216.6A CN114236383A (en) 2021-12-10 2021-12-10 Method and device for generating sweep frequency characteristic curve and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111514216.6A CN114236383A (en) 2021-12-10 2021-12-10 Method and device for generating sweep frequency characteristic curve and storage medium

Publications (1)

Publication Number Publication Date
CN114236383A true CN114236383A (en) 2022-03-25

Family

ID=80755024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111514216.6A Pending CN114236383A (en) 2021-12-10 2021-12-10 Method and device for generating sweep frequency characteristic curve and storage medium

Country Status (1)

Country Link
CN (1) CN114236383A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024099061A1 (en) * 2022-11-09 2024-05-16 深圳飞骧科技股份有限公司 Frequency sweeping method and system for adaptive frequency point sampling, and related device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110337214A (en) * 2019-05-09 2019-10-15 厦门大学 Oscillation damping method, electronic equipment and printed circuit board based on particle damper
CN113406495A (en) * 2021-06-28 2021-09-17 歌尔股份有限公司 Method and device for generating sweep frequency characteristic curve of vibration motor and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110337214A (en) * 2019-05-09 2019-10-15 厦门大学 Oscillation damping method, electronic equipment and printed circuit board based on particle damper
CN113406495A (en) * 2021-06-28 2021-09-17 歌尔股份有限公司 Method and device for generating sweep frequency characteristic curve of vibration motor and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李溪: "《三调谐直流滤波器的调谐特性测试》", 《城市建设理论研究(电子版)》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024099061A1 (en) * 2022-11-09 2024-05-16 深圳飞骧科技股份有限公司 Frequency sweeping method and system for adaptive frequency point sampling, and related device

Similar Documents

Publication Publication Date Title
US20180294757A1 (en) Method and circuit for acquiring output quantity of linear resonance actuator
CN110210180B (en) Motor information display method and device and computer equipment
EP2406643B1 (en) Time domain electromagnetic interference monitoring method and system
CN113406495B (en) Method and device for generating sweep frequency characteristic curve of vibration motor and storage medium
CN113702829B (en) Method and device for generating sweep frequency characteristic curve of vibration motor and storage medium
US10909819B2 (en) Haptic actuator controller
CN111106783A (en) Signal manufacturing method, signal manufacturing device, vibration motor and touch screen equipment
CN209858640U (en) Ultrasonic transducer multi-resonance-point characteristic parameter measuring device
CN110907827A (en) Motor transient distortion measuring method and system
CN114236383A (en) Method and device for generating sweep frequency characteristic curve and storage medium
CN112083042A (en) Method and device for testing high-power characteristics of piezoelectric ceramics
CN114252767A (en) Method and device for generating sweep frequency characteristic curve and storage medium
CN110426967B (en) Analog simulation method, device and storage medium for household load data
CN114252696A (en) Method and device for generating sweep frequency characteristic curve and storage medium
CN112798954B (en) Detection method and device for vibration motor
CN112667077A (en) Motor model parameter detection method and device, electronic equipment and medium
CN116124279A (en) Method, device, equipment and storage medium for determining resonance frequency
CN116384031A (en) Simulation method and device for motor vibration effect
CN105759156A (en) Multidirectional vibration energy collecting device performance test system and method thereof
CN116155143A (en) Method and device for acquiring motor parameters
CN111601224B (en) Microphone performance testing method and device and electronic equipment
JP2018081000A (en) Emc test timing generation system
US7424406B2 (en) Filter characteristic measuring method and system
CN102829941B (en) A kind of automatic mode of vibrational system calibrating
CN114236384A (en) Method and device for generating sweep frequency characteristic curve and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination