Frequency response measurement system and method based on harmonic waves

文档序号:224048 发布日期:2021-11-09 浏览:17次 中文

阅读说明:本技术 一种基于谐波的频率响应测量系统及方法 (Frequency response measurement system and method based on harmonic waves ) 是由 冯向东 赵博 于 2021-07-29 设计创作,主要内容包括:本发明属于线性系统频率响应测量技术领域,公开了一种基于谐波的频率响应测量系统和方法。利用占空比为50%的方波作为测量信号,把测量系统中的模数转换器过采样率设置为半整数,通过数学运算一次得到待测线性系统在多个频点上的频率响应。本发明提出的测量系统和方法,具有测量效率高、测量成本低的优点。(The invention belongs to the technical field of frequency response measurement of linear systems, and discloses a frequency response measurement system and method based on harmonics. The method comprises the steps of using square waves with the duty ratio of 50% as measuring signals, setting the oversampling rate of an analog-to-digital converter in a measuring system to be a half integer, and obtaining the frequency response of a linear system to be measured on a plurality of frequency points through mathematical operation once. The measuring system and the measuring method provided by the invention have the advantages of high measuring efficiency and low measuring cost.)

1. A harmonic-based frequency response measurement system, comprising:

a frequency controllable square wave generator, the input of which is a control signal Ctrl0 output by the calculation control unit, and the output of which is a square wave signal x (t);

the input of the linear system to be tested is square wave x (t) output by the frequency controllable square wave generator, and m (t) is output and is connected to the signal conditioning circuit;

the input of the signal conditioning circuit is the output m (t) of the linear system to be tested and a control signal Ctrl2 output by the calculation control unit, and the output y (t) is connected to the analog-to-digital converter;

the input of the analog-to-digital converter is the output y (t) of the signal conditioning circuit and a control signal Ctrl1 output by the calculation control unit, and the output code word y (n) is connected to the calculation processing unit;

and the input of the calculation processing unit is a code word y (n) output by the analog-to-digital converter, and control signals Ctrl0, Ctrl1 and Ctrl2 are output and respectively connected to the frequency-controllable square wave generator, the analog-to-digital converter and the signal conditioning circuit, and the measurement result is output.

2. A method of frequency response measurement using the harmonic-based frequency response measurement system of claim 1, comprising a number of measurement rounds, each measurement round comprising the following four steps:

firstly, according to the target measurement frequency, the calculation control unit sets the square wave frequency generated by the square wave generatorAnd the amplitude of the square wave and other parameters are set to set the low-pass cut-off frequency of the signal conditioning circuitAnd an analog-to-digital converter oversampling ratio OSR, the square wave generator being enabled, wherein the oversampling ratio OSR is a half integer;

secondly, the gain of the signal conditioning circuit is adjusted by the calculation processing unitEnsuring that the input of the analog-to-digital converter is close to a full-scale and unsaturated state;

thirdly, the calculation processing unit carries out K-point DFT calculation on the result y (n) output by the analog-to-digital converter to obtain the frequency point、……Spectral data of signal y (t)、……Wherein M is odd and satisfies M<OSR;

Fourth, for the calculation processing unit、……Divided by the gain of the signal conditioning circuit 、……Dividing the spectrum data by K point DFT of signal x (t)、……Respectively obtaining the frequency points of the linear system to be measured、……Frequency response of、……

3. The harmonic-based frequency response measurement method of claim 2, wherein the frequency-controllable square wave generator generates a square wave with amplitude and frequencyPrecise definition of parameters such as phase, square wave frequencyAdjustable, determined by the control signal Ctrl0 output by the calculation control unit.

4. The harmonic-based frequency response measurement method of claim 2, wherein the signal conditioning circuit performs linear amplification and low-pass filtering on the input signal m (t) with a gainAdjustable, low-pass filtering cut-off frequencyAdjustable, determined by the control signal Ctrl2 output by the calculation control unit.

5. The harmonic-based frequency response measurement method of claim 2, wherein the analog-to-digital converter has a sampling frequencyDetermined by the control signal Ctrl1 output from the calculation control unit, and the square wave frequencySatisfyWherein K is an odd number.

6. The harmonic-based frequency response measurement method according to claim 2, wherein the calculation processing unit performs mathematical operations, outputs a control signal, reads an external digital code word input, outputs a control signal Ctrl0, and accesses a frequency-controllable square wave generator to control parameters such as square wave frequency; the output control signal Ctrl1 is connected to the analog-to-digital converter to control the sampling frequency of the analog-to-digital converter; the output control signal Ctrl2 is connected to the signal conditioning circuit to control the gain of the signal conditioning circuitAnd low pass cut-off frequency(ii) a And outputs the measurement result.

7. The harmonic-based frequency response measurement method of claim 2, wherein the harmonic-based frequency response measurement method is performed by using a harmonic-based frequency response measurement apparatus

Technical Field

The invention belongs to the technical field of frequency response measurement of linear systems, and particularly relates to a frequency response measurement system and method based on harmonics.

Background

Linear systems are widely available. It is important to measure the linear system frequency response.

The frequency response of a linear system is measured by a common method such as a dot frequency method, a frequency sweep method and the like. Both the dot frequency method and the frequency sweep method use sinusoidal signals as measuring signals to be input into a linear system to be measured. The frequency response at one frequency point can only be obtained by applying a sinusoidal signal once for one measurement. Moreover, both the dot frequency method and the frequency sweep method require a sine wave generating circuit, and the sine wave generating circuit has the disadvantages of more complicated circuit, higher cost and the like compared with a square wave generating circuit.

Therefore, the dot frequency method and the frequency sweep method have the problems of relatively low measurement efficiency and relatively high measurement cost. They cannot be applied in scenarios where high demands are made on the efficiency or cost of the measurement.

Disclosure of Invention

The invention aims to provide a frequency response measurement system and method based on harmonics, and aims to solve the technical problems of relatively low measurement efficiency and relatively high measurement cost in a dot frequency method and a frequency sweep method.

In order to solve the above technical problems, the specific technical solution of the harmonic-based frequency response measurement system and method of the present invention is as follows:

a harmonic-based frequency response measurement system, comprising:

a frequency controllable square wave generator, the input of which is a control signal Ctrl0 output by the calculation control unit, and the output of which is a square wave signal x (t);

the input of the linear system to be tested is square wave x (t) output by the frequency controllable square wave generator, and m (t) is output and is connected to the signal conditioning circuit;

the input of the signal conditioning circuit is the output m (t) of the linear system to be tested and a control signal Ctrl2 output by the calculation control unit, and the output y (t) is connected to the analog-to-digital converter;

the input of the analog-to-digital converter is the output y (t) of the signal conditioning circuit and a control signal Ctrl1 output by the calculation control unit, and the output code word y (n) is connected to the calculation processing unit;

and the input of the calculation processing unit is a code word y (n) output by the analog-to-digital converter, and control signals Ctrl0, Ctrl1 and Ctrl2 are output and respectively connected to the frequency-controllable square wave generator, the analog-to-digital converter and the signal conditioning circuit, and the measurement result is output.

The invention also discloses a frequency response measurement method based on the harmonic waves, which comprises a plurality of measurement rounds, wherein each measurement round comprises the following four steps:

firstly, according to the target measurement frequency, a calculation control unit sets the square wave frequency f generated by a square wave generator0And the amplitude of the square wave and the like, and setting the low-pass cut-off frequency f of the signal conditioning circuitCAnd an analog-to-digital converter oversampling ratio OSR, the square wave generator being enabled, wherein the oversampling ratio OSR is a half integer;

secondly, the computing and processing unit adjusts the gain A of the signal conditioning circuitVEnsuring that the input to the analog-to-digital converter is near full range, unsaturatedThe state of (1);

thirdly, the calculation processing unit carries out K-point DFT calculation on the result y (n) output by the analog-to-digital converter to obtain the frequency point f0、3f0、5f0、……Mf0Spectral data Y (f) of signal Y (t)0)、Y(3f0)、Y(5f0)、……Y(Mf0) Wherein M is odd and satisfies M<OSR;

Fourthly, calculating Y (f) for the processing unit0)、Y(3f0)、Y(5f0)、……Y(Mf0) Divided by the gain A of the signal conditioning circuitV(f0)、AV(3f0)、AV(5f0)、……AV(Mf0) Then divided by the K-point DFT spectrum data X (f) of the signal X (t) respectively0)、X(3f0)、X(5f0)、……X(Mf0) Respectively obtaining the frequency point f of the linear system to be measured0、3f0、5f0、……Mf0Frequency response of H (f)0)、H(3f0)、H(5f0)、……H(Mf0)。

Further, the frequency controllable square wave generator generates square wave with amplitude and frequency f0And precisely defined parameters such as phase, square wave frequency f0Adjustable, determined by the control signal Ctrl0 output by the calculation control unit.

Further, the signal conditioning circuit performs linear amplification and low-pass filtering on the input signal m (t), and the gain A of the signal conditioning circuitVAdjustable, low-pass filtering cut-off frequency fCAdjustable, determined by the control signal Ctrl2 output by the calculation control unit.

Further, the analog-to-digital converter has a sampling frequency fsDetermined by a control signal Ctrl1 output from the calculation control unit and the square wave frequency f0Satisfy fs=K×f0Wherein K is an odd number.

Furthermore, the calculation processing unit can perform mathematical operation, can output a control signal, can read an external digital code word input, and outputs a control signal Ctrl0 to be connected to a frequency controllable square wave to generateThe device controls parameters such as square wave frequency and the like; the output control signal Ctrl1 is connected to the analog-to-digital converter to control the sampling frequency of the analog-to-digital converter; the output control signal Ctrl2 is connected to the signal conditioning circuit to control the gain A of the signal conditioning circuitvAnd a low-pass cut-off frequency fC(ii) a And outputs the measurement result.

Further, M < K/2.

The frequency response measuring system and method based on the harmonic waves have the following advantages: frequency responses on a plurality of frequency points of the linear system to be measured can be obtained through one-time measurement; the square wave generator is used instead of the sine wave generating circuit, so that the circuit is simplified, and the cost is reduced.

Drawings

FIG. 1 is a basic framework diagram of a harmonic-based frequency response measurement system of the present invention.

FIG. 2 is a schematic diagram of the main steps of a harmonic-based frequency response measurement method of the present invention.

Fig. 3 is a basic framework diagram of the embodiment of the invention.

Detailed Description

For a better understanding of the objects, structure and function of the present invention, a harmonic-based frequency response measurement system and method of the present invention will be described in detail with reference to the accompanying drawings.

As shown in fig. 1, a harmonic-based frequency response measurement system includes:

a frequency controllable square wave generator, the input of which is a control signal Ctrl0 output by the calculation control unit, and the output of which is a square wave signal x (t);

the input of the linear system to be tested is square wave x (t) output by the frequency controllable square wave generator, and m (t) is output and is connected to the signal conditioning circuit;

the input of the signal conditioning circuit is the output m (t) of the linear system to be tested and a control signal Ctrl2 output by the calculation control unit, and the output y (t) is connected to the analog-to-digital converter;

the input of the analog-to-digital converter is the output y (t) of the signal conditioning circuit and a control signal Ctrl1 output by the calculation control unit, and the output code word y (n) is connected to the calculation processing unit;

and the input of the calculation processing unit is a code word y (n) output by the analog-to-digital converter, and control signals Ctrl0, Ctrl1 and Ctrl2 are output and respectively connected to the frequency-controllable square wave generator, the analog-to-digital converter and the signal conditioning circuit, and the measurement result is output.

As shown in fig. 2, a frequency response measurement method based on harmonics of the present invention may include several measurement rounds, each measurement round mainly includes the following four steps:

firstly, according to the target measurement frequency, a calculation control unit sets the square wave frequency f generated by a square wave generator0And the amplitude of the square wave and the like, and setting the low-pass cut-off frequency f of the signal conditioning circuitCAnd an analog-to-digital converter oversampling ratio OSR, the square wave generator being enabled, wherein the oversampling ratio OSR is a half integer;

secondly, the computing and processing unit adjusts the gain A of the signal conditioning circuitVEnsuring that the input of the analog-to-digital converter is close to a full-scale and unsaturated state;

thirdly, the calculation processing unit carries out K-point DFT calculation on the result y (n) output by the analog-to-digital converter to obtain the frequency point f0、3f0、5f0、……Mf0Spectral data Y (f) of signal Y (t)0)、Y(3f0)、Y(5f0)、……Y(Mf0) Wherein M is odd and satisfies M<OSR;

Fourthly, calculating Y (f) for the processing unit0)、Y(3f0)、Y(5f0)、……Y(Mf0) Divided by the gain A of the signal conditioning circuitV(f0)、AV(3f0)、AV(5f0)、……AV(Mf0) Then divided by the K-point DFT spectrum data X (f) of the signal X (t) respectively0)、X(3f0)、X(5f0)、……X(Mf0) Respectively obtaining the frequency point f of the linear system to be measured0、3f0、5f0、……Mf0Frequency response of H (f)0)、H(3f0)、H(5f0)、……H(Mf0)。

Preferably, the frequency controllable square wave generator generates square wave with amplitude and frequency f0And precisely defined parameters such as phase, square wave frequency f0Adjustable, determined by the control signal Ctrl0 output by the calculation control unit.

Preferably, the signal conditioning circuit performs linear amplification and low-pass filtering on the input signal m (t). Its gain AVAdjustable, low-pass filtering cut-off frequency fCAdjustable, determined by the control signal Ctrl2 output by the calculation control unit.

Preferably, the analog-to-digital converter has a sampling frequency fsDetermined by a control signal Ctrl1 output from the calculation control unit and the square wave frequency f0Satisfy fs=K×f0Wherein K is an odd number.

Preferably, the calculation processing unit can perform mathematical operation, can output a control signal, and can read an external digital code word input. It outputs control signal Ctrl0 to access frequency controllable square wave generator to control parameters such as square wave frequency; the output control signal Ctrl1 is connected to the analog-to-digital converter to control the sampling frequency of the analog-to-digital converter; the output control signal Ctrl2 is connected to the signal conditioning circuit to control the gain A of the signal conditioning circuitVAnd a low-pass cut-off frequency fC(ii) a And outputs the measurement result.

Preferably, the parameter M in the above measurement method is an odd number and M < K/2 is satisfied.

The measuring system and the method have the following advantages: frequency responses on a plurality of frequency points of the linear system to be measured can be obtained through one-time measurement; the square wave generator is used instead of the sine wave generating circuit, so that the circuit is simplified, and the cost is reduced.

If the frequency response on a plurality of frequency points of a certain linear system needs to be measured, the steps can be repeated, and different square wave frequencies f are set each time0And a low-pass cut-off frequency fCAnd the like.

The principle that the measuring system and the method can measure the frequency response of the linear system to be measured at a time on a plurality of frequency points is that the frequency response of the system is measured by using the fundamental wave and the low harmonic of the square wave based on the superposition theorem of the linear circuit and the frequency spectrum characteristics of the square wave with the duty ratio of 50 percent, and possible higher harmonic frequency spectrum aliasing is eliminated by setting the over-sampling rate of the analog-to-digital converter.

Recording the frequency response of the linear system to be tested as H (f), recording the signals x (t), y (t) at the frequency point jf0The Fourier coefficients of (A) are X (jf) respectively0)、Y(jf0) Recording the frequency point jf of the signal conditioning circuit0Has a gain of AV(jf0) Where j is 1,2, … … M. X (jf)0)、Y(jf0)、AV(jf0) Is a complex number, including amplitude and phase. Is provided with

Y(jf0)=AV(jf0)X(jf0)H(jf0)

Wherein j is 1,2,.... M (formula 1)

The result after K-point DFT calculation is Y (n)F(jf0),j=1,2,......M。

Then there are

……

Since we define the duty cycle of the measurement signal x (t) to be 50%, the spectrum of the signal x (t) has the characteristic that the even harmonic energy is 0, i.e.

X(mf0) 0, 2, 4, … ∞ (equation 5)

By combining equation 1 and equation 5, we can obtain that the even harmonic energy of the signal y (t) is also 0, i.e.

Y(mf0) ═ 0, m ═ 2, 4, · ∞ (equation 6)

Since K and M are both odd numbers, even harmonic energies such as K-1, K +1, 3K-1, 3K +1, etc. in y (t) are 0. Then there are

Similarly, there are

……

According to equation 1

Since the duty ratio of the measurement signal x (t) is set to 50%, we can obtain the signal and system knowledge

Due to low-pass filtering, | AV((2·i·K-1)f0)|<<|AV(f0) And the ratio in equation 11 is a very small number, the ratio in equation 10 is close to 0. Odd harmonics of 2K-1, 2K +1 and higher of y (t) in equation 7 are then negligible. Similarly, odd harmonics in equations 8 and 9 may be ignored.

Therefore, the effect of spectral aliasing is negligible.

Then there are

……

The frequency response of the linear system under test can then be found using equation 15 below.

Where j is 1, 2...... M (formula 15)

In this example, we tested the frequency response of a linear system within 1kHz-10 kHz. A block diagram of the system architecture of an embodiment is shown in fig. 3. The frequency controllable square wave generator is realized by combining a 555 timer with a resistor array; the signal conditioning circuit adopts a program control amplifier and a program control filter, and the calculation control unit adopts an stm32 singlechip.

The specific measurement process using the measurement system and method provided by the invention is as follows.

A first round:

firstly, the stm32 single chip microcomputer sets the frequency of a square wave generated by a square wave generator to be 1kHz, sets the low-pass cut-off frequency of a program control filter to be 33kHz, sets the oversampling rate of an analog-to-digital converter to be 49.5, and starts the square wave generator;

secondly, the stm32 single-chip microcomputer adjusts the gain of the program control amplifier to ensure that the analog-to-digital converter is in a near-full-range and unsaturated state, and records the cascade gain A of the program control amplifier and the program control filter at the momentV

Thirdly, the stm32 single chip microcomputer carries out 99-point DFT on the digital signal y (n) to obtainTo Y (t) spectral data Y at 5 frequency points of 1kHz, 3kHz, 5kHz, 7kHz, 9kHz1、Y3、Y5、Y7、Y9

Fourth step, Y for stm32 singlechip1、Y3、Y5、Y7、Y9Divide by the cascade gain A of the programmable amplifier and the programmable filter at 5 frequency points of 1kHz, 3kHz, 5kHz, 7kHz and 9kHzV1、AV3、AV5、AV7、AV9Dividing the frequency spectrum data X by X (t) obtained by DFT of 99 points for X (t) at 5 frequency points of 1kHz, 3kHz, 5kHz, 7kHz and 9kHz1、X3、X5、X7、X9Respectively obtaining the frequency response H of the linear system to be measured at 5 frequency points of 1kHz, 3kHz, 5kHz, 7kHz and 9kHz1、H3、H5、H7、H9

And a second round:

firstly, the stm32 single chip microcomputer sets the frequency of a square wave generated by a square wave generator to be 2kHz, sets the low-pass cut-off frequency of a program control filter to be 66kHz, sets the oversampling rate of an analog-to-digital converter to be 49.5, and starts the square wave generator;

secondly, the stm32 single-chip microcomputer adjusts the gain of the program control amplifier to ensure that the analog-to-digital converter is in a near-full-range and unsaturated state, and records the cascade gain A of the program control amplifier and the program control filter at the momentV

Thirdly, the stm32 single chip microcomputer carries out 99-point DFT on the digital signal Y (n) to obtain the frequency spectrum data Y of the Y (t) at 3 frequency points of 2kHz, 6kHz and 10kHz2、Y6、Y10

Fourth step, Y for stm32 singlechip2、Y6、Y10Divide by the cascade gain A of the programmable amplifier and the programmable filter at 3 frequency points of 2kHz, 6kHz and 10kHz respectivelyV2、AV6、AV10Dividing the data by X (t) spectrum data X obtained by performing 99-point DFT on X (t) at 3 frequency points of 2kHz, 6kHz and 10kHz2、X6、X10Respectively obtaining the linear systems to be testedFrequency response H at 3 frequency points of 2kHz, 6kHz and 10kHz2、H6、H10

The frequency responses of the linear system to be measured on 8 frequency points of 1kHz, 2kHz, 3kHz, 5kHz, 6kHz, 7kHz, 9kHz and 10kHz are obtained through the two-round measurement.

By using the measuring system and the measuring method disclosed by the invention, the frequency responses on 8 frequency points can be obtained by only 2 times of measurement. According to the conventional measurement method, 8 times of measurement are required. In this example, the efficiency of the measurement system and method provided by the invention is 4 times that of the traditional dot frequency method and frequency sweep method. Meanwhile, the 555 timer is combined with the resistor array to replace a sine wave generating circuit, so that the method has the advantage of lower cost.

The embodiments show that the measurement system and the method provided by the invention have the advantages of high measurement efficiency and low measurement cost.

It is to be understood that the present invention has been described with reference to certain embodiments, and that various changes in the features and embodiments, or equivalent substitutions may be made therein by those skilled in the art without departing from the spirit and scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from the essential scope thereof. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed, but that the invention will include all embodiments falling within the scope of the appended claims.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种畜禽疫病防控监测设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!