CN109472846B - Method for obtaining bode diagram by processing sweep frequency data by MATLAB - Google Patents

Method for obtaining bode diagram by processing sweep frequency data by MATLAB Download PDF

Info

Publication number
CN109472846B
CN109472846B CN201811607368.9A CN201811607368A CN109472846B CN 109472846 B CN109472846 B CN 109472846B CN 201811607368 A CN201811607368 A CN 201811607368A CN 109472846 B CN109472846 B CN 109472846B
Authority
CN
China
Prior art keywords
value
peak
peak points
points
frequency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811607368.9A
Other languages
Chinese (zh)
Other versions
CN109472846A (en
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.)
Yanshan University
Original Assignee
Yanshan University
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 Yanshan University filed Critical Yanshan University
Priority to CN201811607368.9A priority Critical patent/CN109472846B/en
Publication of CN109472846A publication Critical patent/CN109472846A/en
Application granted granted Critical
Publication of CN109472846B publication Critical patent/CN109472846B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R23/00Arrangements for measuring frequencies; Arrangements for analysing frequency spectra
    • G01R23/02Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction
    • G06F2218/10Feature extraction by analysing the shape of a waveform, e.g. extracting parameters relating to peaks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Measurement Of Resistance Or Impedance (AREA)

Abstract

The invention discloses a method for obtaining a bird diagram by using MATLAB to process sweep frequency data, which comprises the following steps: importing data; primary screening; screening again; precise screening; calculating data; and (5) drawing an image. The method specifically comprises the following steps: segmenting the sweep frequency data according to frequency, comparing each data point with m points in front and back to obtain peak points, and removing the peak points with adjacent time less than n in the obtained peak points; pairing peak points and ensuring that the actual signals in each pair of peak points are lagged; and averaging the amplitude ratio and the phase difference obtained by calculation under the same frequency. MATLAB is used for processing the sweep frequency data and drawing a Berde diagram, and the whole process is quick, accurate, simple and labor-saving. The method has the advantages of simple flow, easy operation, strong universality, accuracy and reliability, and can be used for processing the sweep frequency data to obtain the Bode diagram more quickly and accurately.

Description

Method for obtaining bode diagram by processing sweep frequency data by MATLAB
Technical Field
The invention relates to a data processing technology, in particular to a method for obtaining a bode diagram by processing sweep frequency data by MATLAB.
Background
From the traditional industry to the aerospace field, the frequency characteristics of the system need to be evaluated, and the bode diagram is the most intuitive form for reflecting the frequency characteristics such as amplitude-frequency characteristics and phase-frequency characteristics, and is generally obtained by processing frequency-sweeping data. For the process of processing frequency sweep data, the current common method is to manually find the amplitude of each period and then calculate to obtain data such as amplitude ratio, phase difference and the like so as to draw a bode diagram. Because the data volume of the sweep frequency data is extremely large, the data processing process has low efficiency, a series of evasive errors such as inaccurate calculation and the like are easy to occur, the precision of a result is influenced, and the frequency characteristic of the system cannot be accurately grasped. Therefore, there is a need to provide a new, convenient, fast and reliable method for processing frequency sweep data to obtain an accurate bode plot.
MATLAB is scientific engineering calculation software which is wide in application, multiple in function and simple in operation, enables a user to be liberated from complicated mathematical operation analysis due to the efficient numerical calculation function, has a complete graphic processing function, achieves visualization of calculation results, does not provide a ready-made sweep frequency data processing function module, and only provides a development environment and a library function. Therefore, it is necessary to study the processing method and write related programs by itself to organically integrate the sweep frequency data processing process with the advantages of MATALB to obtain an accurate bode diagram.
Disclosure of Invention
The invention aims to provide a method for processing sweep frequency data by MATLAB to obtain a Berde plot, and the method is modularized so as to solve the problems of low efficiency and low precision in the process of manually processing the sweep frequency data.
The method for obtaining the bode diagram by processing sweep frequency data by using MATLAB mainly comprises the following steps: s1, performing a frequency sweep experiment, and importing experiment data into MATLAB, wherein the experiment data comprises instruction signals and actual signals corresponding to time, frequency and frequency; s2, sequentially selecting data points in the command signal and the actual response curve in the sweep frequency data according to a time sequence, comparing the value with m values before and after the value by using a cycle structure aiming at the value at each point, and determining the value as a peak point at the moment if the value is the maximum value in the m values before and after, wherein m is an integer, and the value interval of m is less than or equal to the number of sampling points in a period corresponding to the maximum frequency and more than or equal to the number of sampling points in a half period; preliminarily determining all peak points and corresponding time values of the sweep frequency data; s3, screening the screened peak points again, and removing the peak points with the interval time of adjacent peak points smaller than n value to remove continuous peak points so as to obtain more accurate peak points, wherein the n value is half of the period corresponding to the maximum frequency in the sweep frequency data; s4, pairing the obtained command signal peak points and the obtained actual signal peak points in a time sequence, so that the time corresponding to the actual signal of each pair of peak points is greater than the time corresponding to the command signal, and the difference is less than the period corresponding to the frequency; when the time difference between the actual signal of a certain pair of peak points and the instruction signal is greater than the corresponding period under the frequency, deleting the instruction signal peak points, and sequentially moving up the subsequent instruction signal peak points and pairing the subsequent instruction signal peak points until the pair of peak points meet the requirements; s5, performing array operation by using MATLAB, and calculating the peak value of the paired peak value points, the time interval of the instruction signal and the actual signal and the corresponding frequency of the instruction signal and the actual signal to obtain an amplitude ratio, a phase difference and the corresponding frequency of the phase difference; and S6, drawing a Berde graph by using a semilogx function.
Preferably, before screening the peak point, the sweep data is segmented according to frequency, and then the steps S2 and S3 are executed in segments to determine the peak point and the corresponding time value of each segment of sweep data, where the maximum frequency involved in the values of m and n is the maximum frequency in each frequency segment.
Preferably, the m value is determined by: for the instruction signal, directly taking m as a value at a position of 3/5 of a value interval of the instruction signal to obtain a peak point number a1; the m value is determined by adopting a dichotomy test rule for an actual signal, and specifically comprises the following steps: performing a test in the m value interval, and setting the m value interval as [ p, q ], wherein p is the number of sampling points in a half period corresponding to the maximum frequency, and q is the number of sampling points in a period corresponding to the maximum frequency; in the value calculation process of m, the value of m is an integer and follows the rounding principle; selecting a test value b = (q + p)/2 of m, carrying out peak point screening under the value of m, if a-a1 is larger than 10, making p = b and q = q, and then carrying out peak point screening; if a-a1 is less than 0, making p = p and q = b, and then screening peak points until m values with a-a1 more than or equal to 0 and less than or equal to 10 are found or the length of a value interval of m is changed into 1; if m value which is more than or equal to 0 and less than or equal to a-a1 and less than or equal to 10 is found, decreasing m by 1 each time, repeatedly screening peak points until a certain m value is found, and when the m value is decreased again, keeping the number a of the peak points unchanged and more than or equal to a1, and then taking the value as a proper value; if the length of the value interval of m is 1, the left limit value of the value interval is the proper value of m.
Preferably, the peak points in which the interval time between adjacent peak points in the actual signal peak points is less than the n value are screened out to remove continuous peak points so as to obtain accurate peak points, and the specific rule is as follows: setting the interval time of adjacent peak points among the continuous x peak points to be less than the value n, if x is an odd number, selecting the point (x + 1)/2 as the peak point, and removing the peak points except the point (x + 1)/2 in the points; if x is an even number, the point x/2 is selected as the peak point, and the peak points in the points except the point x/2 are removed.
Preferably, the calculated amplitude ratio and phase difference at the same frequency are averaged to make the result more accurate.
The beneficial effects of the invention are as follows:
1. processing the sweep frequency data by using a loop structure and a branch structure programmed by MATLAB, so that the processes of searching for peak points of the sweep frequency data and screening, sorting and calculating the found peak points are quicker and more accurate;
2. the semigx function in the MATLAB drawing instruction is used, so that the Berde diagram drawing is simpler, more accurate, time-saving and labor-saving;
3. each step is modularized, a certain module can be directly called as required, and the operation is simple, convenient and quick;
4. the method has the advantages of simple flow, easy operation, strong universality, accuracy and reliability, and can be used for processing the frequency sweeping data to obtain the Bode diagram more quickly and accurately.
Drawings
FIG. 1 is a flow chart of a method for obtaining a bode plot by processing sweep data with MATLAB in accordance with the present invention; and
fig. 2 is a bode plot obtained by processing sweep data with MATLAB according to the present invention.
Detailed Description
The technical contents, structural features, attained objects and effects of the present invention are explained in detail below with reference to the accompanying drawings.
As shown in the flowchart of fig. 1, the data processing steps can be divided into 6 modules as follows:
s1, data import: and (4) carrying out a frequency sweep experiment, and importing experiment data into MATLAB.
S2, primary screening: and comparing each data point with m points before and after the data point, and preliminarily determining a peak point and a corresponding time value of the sweep frequency data.
The process of screening peak points can be carried out in sequence by dividing each segment into g segments with the length of 10HZ according to the frequency of the instruction signal. Screening peak points of an instruction signal and an actual signal of frequency sweep data, sequentially selecting data points in the instruction signal and the actual signal in the frequency sweep data according to a time sequence, and comparing the numerical value with m numerical values in the front and the back by using a cycle structure aiming at the numerical value at each point to determine the peak point and the time thereof, wherein the m value is an integer, and the value interval is less than or equal to the number of sampling points in a period corresponding to the maximum frequency of the frequency band and is more than or equal to the number of sampling points in a half period. Because the data of the command signal is extremely accurate, m is directly taken as the value of 3/5 of the value interval, and the result is more accurate without adjusting the value of m; for the actual signal, because other interferences such as noise and the like can generate interference on the response data, the m value is tested according to the test rule of the dichotomy in the m value interval to obtain the proper m value, and the number of the peak value of the actual signal is slightly larger than that of the peak value of the instruction signal under the m value, so that the screening accuracy is improved.
S3, screening again: and screening out continuous equal peak points in the peak points.
And further screening out peak points with the interval time of adjacent peak points smaller than n value from the screened peak points to remove continuous peak points so as to obtain more accurate peak points, wherein the n value is half of the period corresponding to the maximum frequency in the sweep frequency data.
S4, accurate screening: the points of the peaks where the actual signal is not time-lagged are screened out.
And pairing the obtained peak value points of the instruction signal and the actual signal according to a time sequence, and screening by using a cycle structure and a branch structure in order to ensure that the time corresponding to the actual signal of each pair of peak value points is greater than the time corresponding to the instruction signal and the difference is less than the period corresponding to the frequency because the sweep frequency data should be phase-delayed. If the corresponding time of the actual signal of a certain pair of peak points is less than the time of the command signal, deleting the actual signal peak point, sequentially moving up the following actual signal peak points and performing pairing until the pair of peak points meets the requirement; if the time difference between the actual signal of a certain pair of peak points and the instruction signal is greater than the corresponding period under the frequency, deleting the instruction signal peak points, and sequentially moving up the subsequent instruction signal peak points and pairing the subsequent instruction signal peak points until the pair of peak points meets the requirements.
S5, data calculation: and calculating the amplitude ratio, the phase difference and the corresponding frequency of the actual signal and the instruction signal by using MATLAB.
And performing array operation by using MATLAB, and calculating the peak value of the paired peak value points, the time interval of the instruction signal and the actual signal and the corresponding frequency thereof to obtain the amplitude ratio, the phase difference and the corresponding frequency thereof. In order to make the result accurate and reduce the difficulty of reading the image, the obtained amplitude ratio and phase difference under the same frequency are averaged to obtain the average value of the amplitude ratio and the phase difference and the corresponding frequency of the average value.
S6, drawing an image: a bode plot was plotted using the semelogx function.
The examples of the invention are as follows:
in the embodiment, the motion control performance of the servo motor is tested, the input rotating speed command signal is a sine wave, the frequency is gradually increased from 0HZ to 100HZ by taking 1HZ/s as a gradient, the rotating speed command amplitude is +/-0.1V, the highest rotating speed of the servo motor is 30RPM at the moment, the sampling interval is 0.5ms, a curve of the command and an actual speed signal is collected, a bode diagram is drawn, and the motion control performance of the servo motor is further known.
The implementation process of the invention is as follows:
1. and operating the data import module.
And introducing the frequency sweep data obtained from the frequency sweep experiment into a matrix of the MATLAB, wherein the introduced frequency sweep data comprises time, frequency, a corresponding instruction and an actual value, and at the moment, a plot is drawn by utilizing a plot function of the MATLAB and compared with an original frequency sweep data plot, so that the accuracy of the introduced data is ensured.
2. And operating the preliminary screening module.
The process of screening the peak points can be sequentially carried out by dividing each section into g sections with the length of 10HZ according to the frequency of the command signal. In this embodiment, each segment is divided into 10 segments with a length of 10HZ, i.e., g =10. Preliminarily screening peak points of an instruction signal and an actual signal of sweep frequency data, sequentially selecting data points in the instruction signal and the actual response curve in the sweep frequency data according to a time sequence, and comparing the numerical value with m numerical values in the front and the back by using a cycle structure aiming at the numerical value at each point to determine the peak point and the time thereof. The value of m is an integer and follows the rounding principle, and meanwhile, the value interval of m in each section of sweep frequency data is less than or equal to the number of sampling points in a period corresponding to the maximum frequency of the section and is more than or equal to the number of sampling points in a half period. The peak value screening is carried out on the instruction signal, and because the data of the instruction signal is extremely accurate, m is directly taken as the value of 3/5 of the value interval, the m value does not need to be adjusted, so that the result is more accurate, and the number a1 of peak values is obtained; for an actual signal, because some factors such as noise and the like can interfere actual data, a proper m value needs to be selected to improve the accuracy, so the m value is tested in an m value interval according to a test rule of dichotomy until the number a of peak values obtained by screening the peak values under the m value is slightly larger than or equal to a1 and is reduced along with the small range of the m value, the number a of the peak values in the section is unchanged, and the m value is a proper value at the moment; when the appropriate value of m is chosen, the value of m does not change. Therefore, the values of m are different for the command signal and the actual signal.
When determining the proper value of m, selecting the test value of m as b, and the test rule is as follows: setting an m value interval as [ p, q ], selecting a test value b = (q + p)/2 of m according to a dichotomy, screening peak points under the m value, and if a-a1 is more than 10, enabling p = b and q = q, and then screening the peak points; if a-a1 is less than 0, let p = p and q = b, and then perform peak point screening. And repeating the screening of the peak points until m values with a-a1 more than or equal to 0 and less than or equal to 10 are found or the value interval length of m is changed into 1. If m is found, which is more than or equal to 0 and less than or equal to a-a1 and less than or equal to 10, m is decreased by 1 each time, and peak point screening is repeated until a certain m is found and decreased within a small range, and the value is an appropriate value if the number a of the peak points in the section is unchanged and is more than or equal to a 1. If the length of the value interval of m is 1, the left limit value of the value interval is the proper value of m. In the process of calculating the value of m, the value of m is an integer and follows the rounding principle.
For example, for the frequency range of 30HZ to 40HZ, the maximum frequency is 40HZ, the sampling interval is 0.5ms, the number of sampling points in one period of the maximum frequency is 1000/(40 · 0.5) =50, and therefore, the value interval of m is [25,50]. When the peak point of the instruction signal is screened, because the instruction signal is sent by the computer and is very accurate, the value of m at 3/5 of the value interval is taken, namely m is taken as 40. And (5) screening peak points to obtain the peak points of the command signal, wherein the number a1 of the peak points is 367. When the actual signal peak point is screened, in the value range [25,50] of m, making the test value b be 37.5, rounding up and taking 38, selecting the peak value point to obtain the peak value point a being 383, a-a1 being more than 10, so that the value range of m is changed into [38,50]; then, the test value b is set to be 44, the peak point selection is carried out, the number a of the peak points is 359, a-a1 is less than 0, and the value range of m is changed into [38,44]; then, the test value b is set as 41, the peak point is selected to obtain the peak point number a of 373, a-a1 is more than or equal to 0 and less than or equal to 10; the test value b is sequentially reduced, and peak point screening is repeated, so that the test value b is 40, 39 and the corresponding peak point number a is 373, respectively, i.e. when m is reduced from 41 to 39, the peak point number a is not changed, so that the proper value of m is 41.
3. The re-screening module is run.
After the screening, the peak points are basically obtained, but the continuous equal peak points still need to be eliminated, so that the screened peak points are screened again, and the peak points with the interval time of the adjacent peak points being less than the n value are removed to remove the continuous peak points, thereby obtaining more accurate peak points. The value of n is half of the period corresponding to the maximum frequency in the sweep data. The specific rule is as follows: setting the interval time of adjacent peak points among the continuous x peak points to be less than the value n, if x is an odd number, selecting the point (x + 1)/2 as the peak point, and removing the peak points except the point (x + 1)/2; if x is an even number, selecting the point x/2 as the peak point, and removing the peak points except the point x/2.
For example, in the frequency range of 30HZ to 40HZ, the maximum frequency is 40HZ, and in this case, n is 1000/(40 · 2) =12.5ms, and after rounding, n is 13ms. After the module is screened again, the point number of the peak value of the instruction signal is unchanged and is still 367, and the point number of the peak value of the actual signal is changed from 373 to 371.
4. And operating the accurate screening module.
Since the sweep data should be phase-delayed, it should be ensured that the actual signal for each pair of peak points corresponds to a time greater than the command signal and the difference is less than the period corresponding to the frequency. And pairing the obtained command signal peak points and the actual signal peak points according to the time sequence, and carrying out difference on the time t1 and the time t2 respectively corresponding to the peak points of the screened command signal and the actual signal. For a certain pair of peak points, if t2-t1 is less than 0, deleting the actual signal peak point, sequentially moving the subsequent peak points upwards, and performing subtraction and judgment again; if T2-T1 is more than T, and T is the period of the frequency corresponding to the peak point of the command signal, deleting the peak point of the command signal and sequentially moving up the subsequent peak points; and if T2 is more than or equal to 0 and T1 is more than or equal to T, judging the next pair of peak points until the last pair of peak points. Thus, an accurate peak point is obtained.
For example, for the frequency range of 30Hz to 40Hz, 367 pairs of peak values are obtained after the precise screening module is operated.
5. And operating the data calculation module.
Performing array operation by using MATLAB, and performing peak value and instruction message of paired peak value pointsThe time interval between the signal and the actual signal and the corresponding frequency are calculated to obtain the amplitude ratio, the phase difference and the corresponding frequency, the amplitude ratio L =20lg (response signal peak/command signal peak),
Figure BDA0001923887610000061
in order to make the result accurate and reduce the difficulty of reading the image at the same time, the obtained amplitude ratio and phase difference under the same frequency are averaged to obtain the average value of the amplitude ratio and the phase difference and the corresponding frequency of the average value.
6. And operating the image drawing module.
And drawing a bird graph by using a semilogx function in MATLAB drawing instructions. The bode plot plotted is shown in figure 2.
According to the method for obtaining the Bode diagram, the peak points in the sweep frequency data are screened by a new thinking and new method, a more accurate screening result is obtained, the accuracy of the existing screening method is greatly improved, the accuracy of the drawn Bode diagram of the sweep frequency experiment is fundamentally improved, the whole process is modularized, the whole process can be operated by a program, and the method is simple, clear, convenient, rapid, time-saving and labor-saving. The accuracy of the bode diagram obtained by the sweep frequency experiment is improved, the reliability and the accuracy of the system transfer function obtained by the backward derivation of the bode diagram can be higher, and a good reference effect can be achieved when a system mathematical model is established.
For different sweep frequency data, the same beneficial effects can be obtained by reasonably modifying the size of the frequency segment length and the value rule of m in the primary screening module, the value rule of n in the secondary screening module and the value rule of T in the precise screening module according to the operation of the embodiment.
The above-mentioned embodiments are merely illustrative of the preferred embodiments of the present invention, and do not limit the scope of the present invention, and various modifications and improvements of the data processing method of the present invention by those skilled in the art without departing from the spirit of the present invention are intended to fall within the protection scope defined by the claims of the present invention.
The parts not involved in the present invention are the same as or can be implemented using the prior art.

Claims (2)

1. A method for obtaining a bode plot by processing sweep frequency data with MATLAB, comprising the steps of:
s1, performing a frequency sweep experiment, and importing experiment data into MATLAB, wherein the experiment data comprises instruction signals and actual signals corresponding to time, frequency and frequency;
s2, sequentially selecting data points in the command signal and the actual response curve in the sweep frequency data according to a time sequence, comparing the numerical value with m numerical values before and after by using a cycle structure aiming at the numerical value at each point, and determining the value as a peak point at the moment if the numerical value is the maximum value in the m numerical values before and after, wherein m is an integer, and the value interval of m is less than or equal to the number of sampling points in a period corresponding to the maximum frequency and is more than or equal to the number of sampling points in a half period; determining all peak points and corresponding time values of the sweep frequency data;
s3, screening the screened peak points again, removing the peak points of which the interval time between adjacent peak points is less than n value so as to remove continuous peak points, thereby obtaining more accurate peak points, wherein the n value is half of the period corresponding to the maximum frequency in the sweep data;
s4, the obtained command signal peak points and the obtained actual signal peak points are paired according to a time sequence, the time corresponding to the actual signal of each pair of peak points is greater than the time corresponding to the command signal, and the difference is less than the period corresponding to the frequency, so that when the time corresponding to the actual signal of a certain pair of peak points is less than the command signal time, the actual signal peak points are deleted, and the subsequent actual signal peak points sequentially move upwards and are paired until the pair of peak points meet the requirements; when the time difference between the actual signal of a certain pair of peak points and the command signal is larger than the corresponding period under the frequency, deleting the command signal peak points, sequentially moving the following command signal peak points upwards and pairing the command signal peak points till the pair of peak points meets the requirements;
s5, performing array operation by using MATLAB, and calculating the peak value of the paired peak value points, the time interval of the instruction signal and the actual signal and the corresponding frequency of the instruction signal and the actual signal to obtain an amplitude ratio, a phase difference and the corresponding frequency of the phase difference;
s6, drawing a Berde graph by using a semilogx function;
before screening peak points, segmenting the sweep frequency data according to frequency, and then segmenting to execute the steps S2 and S3, determining the peak point and the corresponding time value of each segment of sweep frequency data, wherein the maximum frequency related to the values of m and n is the maximum frequency in each frequency segment;
the m value determination method comprises the following steps:
for the instruction signal, directly taking m as a value at a position of 3/5 of a value interval of the instruction signal to obtain a peak point number a1;
for an actual signal, the value m is determined by adopting a dichotomy test rule, which specifically comprises the following steps:
performing a test in the m value interval, and setting the m value interval as [ p, q ], wherein p is the number of sampling points in a half period corresponding to the maximum frequency, and q is the number of sampling points in a period corresponding to the maximum frequency; in the value calculation process of m, the value of m is an integer and follows the rounding principle;
selecting a test value b = (q + p)/2 of m, carrying out peak point screening under the value of m, if a-a1 is larger than 10, making p = b and q = q, and then carrying out peak point screening; if a-a1 is less than 0, making p = p and q = b, and then screening peak points until m values with a-a1 more than or equal to 0 and less than or equal to 10 are found or the length of a value interval of m is changed into 1;
if m value which is more than or equal to 0 and less than or equal to a-a1 and less than or equal to 10 is found, decreasing m by 1 each time, repeatedly screening peak points until a certain m value is found, and when the m value is decreased again, keeping the number a of the peak points unchanged and more than or equal to a1, and then taking the value as a proper value;
if the length of the value interval of m is 1, the left limit value of the value interval is a proper value of m;
screening out the peak points with the interval time of the adjacent peak points less than the n value in the actual signal peak points to remove the continuous peak points,
to obtain an accurate peak point, the specific rule is:
setting the interval time of adjacent peak points among the continuous x peak points to be less than the value n, if x is an odd number, selecting the point (x + 1)/2 as the peak point, and removing the peak points except the point (x + 1)/2; if x is an even number, selecting the point x/2 as the peak point, and removing the peak points except the point x/2.
2. A method for obtaining bode plots using MATLAB to process sweep data according to claim 1, wherein the calculated amplitude ratio and phase difference at the same frequency are averaged to make the results more accurate.
CN201811607368.9A 2018-12-27 2018-12-27 Method for obtaining bode diagram by processing sweep frequency data by MATLAB Active CN109472846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811607368.9A CN109472846B (en) 2018-12-27 2018-12-27 Method for obtaining bode diagram by processing sweep frequency data by MATLAB

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811607368.9A CN109472846B (en) 2018-12-27 2018-12-27 Method for obtaining bode diagram by processing sweep frequency data by MATLAB

Publications (2)

Publication Number Publication Date
CN109472846A CN109472846A (en) 2019-03-15
CN109472846B true CN109472846B (en) 2022-11-29

Family

ID=65677116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811607368.9A Active CN109472846B (en) 2018-12-27 2018-12-27 Method for obtaining bode diagram by processing sweep frequency data by MATLAB

Country Status (1)

Country Link
CN (1) CN109472846B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008245B (en) * 2019-04-08 2024-01-23 西安热工研究院有限公司 Method suitable for searching equipment fault early warning model time period
CN111126620B (en) * 2019-12-10 2020-11-03 河海大学 Characteristic fingerprint generation method for time sequence and application
CN111781499A (en) * 2020-06-29 2020-10-16 苏州臻迪智能科技有限公司 Electric tuning test method, device, electronic equipment, storage medium and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103226326A (en) * 2013-03-11 2013-07-31 上海电力学院 Frequency domain analysis method for ship autopilot system
CN105182800A (en) * 2015-10-09 2015-12-23 宁波罗杰克智能科技有限公司 Amplitude frequency characteristic curve drafting method
CN106415322A (en) * 2014-02-13 2017-02-15 阿德洛克有限公司 Method of identifying reflected signals
CN106569476A (en) * 2016-10-20 2017-04-19 西安坤蓝电子技术有限公司 Self-detecting method for natural frequency of antenna shafting and bandwidth of control system
CN106680584A (en) * 2016-11-11 2017-05-17 中国科学院长春光学精密机械与物理研究所 All-digital portable spectrum analysis system
CN106777505A (en) * 2016-11-18 2017-05-31 天津大学 The frequency estimating methods and device of the robust of the undersampled signal based on frequency deviation identification
CN107505396A (en) * 2017-09-12 2017-12-22 燕山大学 A kind of structural damage on-line real time monitoring method and system
CN108039982A (en) * 2017-12-01 2018-05-15 天津津航技术物理研究所 A kind of DSP platform control system Bandwidth Measurement Method based on network interface
CN108333935A (en) * 2018-01-30 2018-07-27 上海航天控制技术研究所 A kind of accurate adjustment method and system of notch filter
CN108370494A (en) * 2015-12-04 2018-08-03 德克萨斯大学系统董事会 Accurate tracking mobile device by mobile device effectively to control other equipment
CN109033643A (en) * 2018-07-31 2018-12-18 福建工程学院 Automobile handling stability mapping parameter optimization method based on sensitivity analysis

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080048622A1 (en) * 2006-02-27 2008-02-28 Fee John A Method and apparatus to determine battery resonance
US20090198462A1 (en) * 2008-01-31 2009-08-06 Mcdermid John Elliott Method, system and analog stimulus-response unit for determining real and imaginary components of an AC response received from a device under test
KR102226415B1 (en) * 2013-03-15 2021-03-11 도콘 아게 Frequency selective logarithmic amplifier with intrinsic frequency demodulation capability

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103226326A (en) * 2013-03-11 2013-07-31 上海电力学院 Frequency domain analysis method for ship autopilot system
CN106415322A (en) * 2014-02-13 2017-02-15 阿德洛克有限公司 Method of identifying reflected signals
CN105182800A (en) * 2015-10-09 2015-12-23 宁波罗杰克智能科技有限公司 Amplitude frequency characteristic curve drafting method
CN108370494A (en) * 2015-12-04 2018-08-03 德克萨斯大学系统董事会 Accurate tracking mobile device by mobile device effectively to control other equipment
CN106569476A (en) * 2016-10-20 2017-04-19 西安坤蓝电子技术有限公司 Self-detecting method for natural frequency of antenna shafting and bandwidth of control system
CN106680584A (en) * 2016-11-11 2017-05-17 中国科学院长春光学精密机械与物理研究所 All-digital portable spectrum analysis system
CN106777505A (en) * 2016-11-18 2017-05-31 天津大学 The frequency estimating methods and device of the robust of the undersampled signal based on frequency deviation identification
CN107505396A (en) * 2017-09-12 2017-12-22 燕山大学 A kind of structural damage on-line real time monitoring method and system
CN108039982A (en) * 2017-12-01 2018-05-15 天津津航技术物理研究所 A kind of DSP platform control system Bandwidth Measurement Method based on network interface
CN108333935A (en) * 2018-01-30 2018-07-27 上海航天控制技术研究所 A kind of accurate adjustment method and system of notch filter
CN109033643A (en) * 2018-07-31 2018-12-18 福建工程学院 Automobile handling stability mapping parameter optimization method based on sensitivity analysis

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
A MATLAB GUI for learning controller design in the frequency domain;R. I. Mitchell;《2014 UKACC International Conference on Control (CONTROL)》;20141002;全文 *
Development of a Toolbox for Frequency Response Analysis of Fractional Order Control Systems;Yeroglu, Celaleddin.et al;《2009 EUROPEAN CONFERENCE ON CIRCUIT THEORY AND DESIGN, VOLS 1 AND 2》;20091231;866-869 *
仿真虚拟实验教学的探索与实践;金凤莲等;《中国现代教育装备》;20070131;125-127 *
基于Multisim虚拟仪器的电子测量;刘长国等;《电子制作》;20080229;48-50 *

Also Published As

Publication number Publication date
CN109472846A (en) 2019-03-15

Similar Documents

Publication Publication Date Title
CN109472846B (en) Method for obtaining bode diagram by processing sweep frequency data by MATLAB
WO2019119223A1 (en) Radar-based ranging processing method and device, and unmanned aerial vehicle
CN107145731B (en) A kind of accelerated method that high-fidelity spatio-temporal neutron kinetics calculate
JP2009277226A (en) Method for real time calculation of process model and simulator therefor
CN103714045A (en) Information fusion estimation method for asynchronous multi-rate non-uniform sampled observation data
CN105245203A (en) System and method for duty ratio detection employing high precision and low speed clock
CN105510706A (en) High-precision undersampling frequency measurement method
CN114676522B (en) Pneumatic shape optimization design method, system and equipment integrating GAN and migration learning
CN110677140A (en) Random system filter containing unknown input and non-Gaussian measurement noise
CN109212999B (en) Intelligent generation method and system for digital satellite simulation working condition
CN111510109B (en) Signal filtering method, device, equipment and medium
CN109858170B (en) Frequency characteristic estimation system and method of strong nonlinear Modelica system model
Zhao Research on improvement and parallelization of k-means clustering algorithm
CN108196221B (en) Method for removing wild value based on multi-baseline interferometer angle fuzzy interval
CN103218493A (en) Fast isogeometric analysis numerical simulation method based on multiple grids
CN104298213A (en) Index time varying gain type iterative learning control algorithm based on reference batch
CN110658722B (en) Self-equalization multi-model decomposition method and system based on gap
CN109800191B (en) Method and apparatus for calculating covariance of sequence data
CN110597203A (en) Fault diagnosis method based on multi-GPU parallel CRPF
CN102253924B (en) Method for realizing root extraction arithmetic on hardware and root extraction arithmetic device
Elshoff et al. The binary floating point digital differential analyzer
CN105550424A (en) Screening method of interpolating sequences based on RBF grid deformation
CN115793675B (en) Coupling calibration method and device for unmanned ship power system and computer equipment
RU62469U1 (en) ADAPTIVE WAVELET CONVERSION CALCULATION DEVICE
CN111624653A (en) Automatic seismic velocity picking method and device

Legal Events

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