Disclosure of Invention
The technical problem to be solved by the invention is as follows: the system and the method for generating the random truncation linear frequency modulation continuous wave signal overcome the defects of the prior art, realize the generation of the m-sequence random truncation linear frequency modulation signal by using the FPGA, and solve the problems of periodicity, different code element numbers, random truncation and generation of the linear frequency modulation signal.
The technical scheme of the invention is as follows:
a system for generating a randomly truncated chirp continuous wave signal, comprising: the device comprises an m-sequence code generation module, a truncation pulse generation module, a linear frequency modulation continuous wave signal generation module, a time sequence adjustment module and a DAC (digital-to-analog converter) module;
m-sequence code generation module: the device is used for generating an m-sequence code according to the primitive polynomial and the initial value of the polynomial and transmitting the m-sequence code to a truncation pulse generation module;
a chopping pulse generation module: generating random truncated pulses and truncated pulse enable according to the m-sequence codes transmitted by an m-sequence code generation module, transmitting the random truncated pulses to a time sequence adjustment module, and transmitting the truncated pulse enable to a linear frequency modulation continuous wave signal generation module;
a chirp continuous wave signal generation module: receiving the truncation pulse enable transmitted by a truncation pulse generation module and an externally input linear frequency modulation signal, generating a linear frequency modulation continuous wave signal according to the truncation pulse enable and the initial frequency, the sampling rate, the signal bandwidth and the signal pulse width of the linear frequency modulation signal, and transmitting the linear frequency modulation continuous wave signal to a time sequence adjustment module; initial phase of the chirp continuous wave signal
The frequency modulation phase of the chirp continuous wave signal
Frequency modulation period T of the linear frequency modulation continuous wave signal
dPW · fs; wherein f is
0Is the starting frequency of the chirp signal; fs is the sampling rate of the linear frequency modulation signal; b is the signal bandwidth of the linear frequency modulation signal; PW is the signal pulse width of the linear frequency modulation signal;
a time sequence adjusting module: receiving the random truncation pulse transmitted by a truncation pulse generation module and the linear frequency modulation continuous wave signal transmitted by a linear frequency modulation continuous wave signal generation module, overlapping the random truncation pulse and the linear frequency modulation continuous wave signal to generate a random truncation linear frequency modulation continuous wave signal, and transmitting the random truncation linear frequency modulation continuous wave signal to a DAC (digital-to-analog converter) module;
DAC digital-to-analog conversion module: and receiving the random truncation linear frequency modulation continuous wave signal transmitted by the time sequence adjusting module, and converting the random truncation linear frequency modulation continuous wave signal from a digital signal into an electric signal for outward transmission.
A method for realizing m sequence random truncation linear frequency modulation continuous wave signal generation based on FPGA by using the generation system comprises the following steps:
1) generating an m-sequence code by using an m-sequence code generation module according to the primitive polynomial and the initial value of the polynomial;
2) generating random truncation pulse and truncation pulse enable according to the code element value of the m-sequence code determined in the step 1);
3) receiving a linear frequency modulation signal input from the outside, and generating a linear frequency modulation continuous wave signal according to the linear frequency modulation signal and the truncated pulse enable generated in the step 2); initial phase of the chirp continuous wave signal
The frequency modulation phase of the chirp continuous wave signal
The frequency modulation period T of the linear frequency modulation continuous wave signal
dPW · fs; wherein f is
0Is the starting frequency of the chirp signal; fs is the sampling rate of the linear frequency modulation signal; b is the signal bandwidth of the linear frequency modulation signal; PW is the signal pulse width of the linear frequency modulation signal;
4) superposing the linear frequency modulation continuous wave signal generated in the step 3) and the random truncation pulse generated in the step 2) to generate a random truncation linear frequency modulation continuous wave signal, wherein the random truncation linear frequency modulation continuous wave signal belongs to a digital signal;
5) and (3) converting the random truncated chirp continuous wave signal generated in the step (4) into an electric signal by using a DAC digital-to-analog conversion module of the FPGA, and transmitting the electric signal outwards.
Compared with the prior art, the invention has the beneficial effects that:
the invention adopts FPGA to realize the design of complex waveform, and overcomes the problem that the waveform switching time sequence is difficult to control; the method adopts a modularized form, and is realized step by step according to the steps of calculation of m-sequence codes, generation of m-sequence pulses and random truncation of linear frequency modulation continuous wave signals; the method effectively solves the problem of generating complex waveforms of randomly cutting off linear frequency modulation continuous wave signals, and is also suitable for other occasions of generating similar complex waveforms.
Detailed Description
The invention is described in further detail below with reference to the figures and the detailed description.
As shown in fig. 1, the present invention provides a system for generating a random truncated chirp continuous wave signal, including: the device comprises an m-sequence code generation module, a truncation pulse generation module, a linear frequency modulation continuous wave signal generation module, a time sequence adjustment module and a DAC (digital-to-analog converter) module.
m-sequence code generation module: the device is used for generating an M-sequence code according to the number M of code elements, a primitive polynomial and a polynomial initial value, and transmitting the M-sequence code to a truncation pulse generation module; the number M of M sequence code elements is 2N-1, wherein N is an integer and 6. gtoreq.N.gtoreq.2. The number M of code elements of the M-sequence code is adjustable; when higher anti-interference performance is needed, the number of m-sequence code elements can be increased.
A chopping pulse generation module: generating random truncated pulses and truncated pulse enable according to the m-sequence codes transmitted by an m-sequence code generation module, transmitting the random truncated pulses to a time sequence adjustment module, and transmitting the truncated pulse enable to a linear frequency modulation continuous wave signal generation module; generating random truncation pulses as follows:
if the code element value of the m-sequence code is 0, the random truncation pulse correspondingly generates a low level, and if the code element value of the m-sequence code is 1, the random truncation pulse correspondingly generates a high level; wherein the duration T of each level in the random truncation pulse is determined according to the period T of the random truncation pulse and the number of symbols of the m-sequence code;
the duration t of each level in the random truncation pulse is specifically as follows:
wherein T is the period of the random truncation pulse, and the value range of T is 2 ms-10 ms; the period T of the random truncation pulse is generally in millisecond level, and can be determined according to coherent accumulation time and the number of m sequences in the coherent accumulation time, and the value range of the coherent accumulation time is 30 ms-150 ms.
The generation time of the truncation pulse enable is the same as the starting time of the random truncation pulse.
The truncation pulse generation module generates truncation pulse enable as follows: the generation time of the truncation pulse enable is the same as the starting time of the random truncation pulse.
A chirp continuous wave signal generation module: receiving the truncation pulse enable transmitted by a truncation pulse generation module and an externally input linear frequency modulation signal, generating a linear frequency modulation continuous wave signal according to the truncation pulse enable and the initial frequency, the sampling rate, the signal bandwidth and the signal pulse width of the linear frequency modulation signal, and transmitting the linear frequency modulation continuous wave signal to a time sequence adjustment module; initial phase of the chirp continuous wave signal
The frequency modulation phase of the chirp continuous wave signal
Frequency modulation period T of the linear frequency modulation continuous wave signal
dPW · fs; wherein f is
0Is the starting frequency of the chirp signal; fs is the sampling rate of the linear frequency modulation signal; b is the signal bandwidth of the linear frequency modulation signal; PW is the signal pulse width of the linear frequency modulation signal; the linear frequency modulation continuous wave signal generation module generates a phase X of a linear frequency modulation continuous wave signal, and the phase X is as follows:
X=delta1+delta2。
a time sequence adjusting module: receiving the random truncation pulse transmitted by a truncation pulse generation module and the linear frequency modulation continuous wave signal transmitted by a linear frequency modulation continuous wave signal generation module, overlapping the random truncation pulse and the linear frequency modulation continuous wave signal to generate a random truncation linear frequency modulation continuous wave signal, and transmitting the random truncation linear frequency modulation continuous wave signal to a DAC (digital-to-analog converter) module;
DAC digital-to-analog conversion module: and receiving the random truncation linear frequency modulation continuous wave signal transmitted by the time sequence adjusting module, and converting the random truncation linear frequency modulation continuous wave signal from a digital signal into an electric signal for outward transmission.
The invention discloses a method for realizing generation of m-sequence random truncation chirp continuous wave signals based on an FPGA (field programmable gate array) by utilizing the generation system, which comprises the following steps as shown in figure 3:
1) generating an m-sequence code by using an m-sequence code generation module according to the number of code elements, the primitive polynomial and the initial value of the polynomial;
2) generating random truncation pulse and truncation pulse enable according to the code element value of the m-sequence code determined in the step 1);
3) receiving a linear frequency modulation signal input from the outside, and generating a linear frequency modulation continuous wave signal according to the linear frequency modulation signal and the truncated pulse enable generated in the step 2); initial phase of the chirp continuous wave signal
The frequency modulation phase of the chirp continuous wave signal
The frequency modulation period T of the linear frequency modulation continuous wave signal
dPW · fs; wherein f is
0Is the starting frequency of the chirp signal; fs is the sampling rate of the linear frequency modulation signal; b is the signal bandwidth of the linear frequency modulation signal; PW is the signal pulse width of the linear frequency modulation signal;
4) superposing the linear frequency modulation continuous wave signal generated in the step 3) and the random truncation pulse generated in the step 2) to generate a random truncation linear frequency modulation continuous wave signal, wherein the random truncation linear frequency modulation continuous wave signal belongs to a digital signal;
5) and (3) converting the random truncated chirp continuous wave signal generated in the step (4) into an electric signal by using a DAC digital-to-analog conversion module of the FPGA, and transmitting the electric signal outwards.
The method for generating the random truncation pulse in the step 2) specifically comprises the following steps:
if the code element value of the m-sequence code is 0, the random truncation pulse correspondingly generates a low level, and if the code element value of the m-sequence code is 1, the random truncation pulse correspondingly generates a high level; and the duration time T of each level in the random truncation pulse is determined according to the period T of the random truncation pulse and the number of code elements of the m-sequence code.
The method for determining the duration t of each level in the random truncation pulse specifically comprises the following steps:
wherein T is the period of the random truncation pulse, and the value range of T is 2 ms-10 ms; the period T of the random truncation pulse is generally in millisecond level, and can be determined according to coherent accumulation time and the number of m sequences in the coherent accumulation time, and the value range of the coherent accumulation time is 30 ms-150 ms.
The method for generating the truncated pulse enable in the step 2) comprises the following specific steps: the generation time of the truncation pulse enable is the same as the starting time of the random truncation pulse.
The phase X of the chirped continuous wave signal is as follows:
X=delta1+delta2。
examples
1) Real-time generation of m-sequence codes
The m-sequence code generation principle is shown in fig. 2, the specific implementation process is shown in fig. 3, and the m-sequence code is generated in real time according to the input code element number parameter, the code element initial value and the m polynomial coefficient. The specific method comprises the following steps: generating a calculation signal comput _ start for generating an m-sequence code according to the required code element number parameter; generating a flag signal which changes alternately according to the comput _ start signal; and generating a feedback signal and an m-sequence code when the comput _ start and the flag are simultaneously effective, and updating an initial value x of the m-sequence code when the comput _ start effective flag is invalid. The final m-sequence code is generated at the comput _ start falling edge.
2) Real-time generation of m-sequence random truncation pulses
Generating m-sequence random truncation pulses according to the m-sequence code generated in the process 1) and the enabling pulse thereof and the code element width. The specific method comprises the following steps: when the m-sequence code enabling pulse is effective, starting to enter a m-sequence random truncation pulse generation process, wherein the effective enabling pulse only lasts for one FPGA system clock period, the value range is 50-150 MHz, the embodiment of the invention takes 80MHz, and if the effective enabling pulse appears again in the middle, the generation process is entered again; when the energy pulse is effective, after the energy pulse is effective for one period, calculation is started and a truncation pulse is generated; the first code element lasts for the code element width corresponding to the time T and then enters the generation of the second code element truncation pulse until the last code element truncation pulse is generated; if the energy pulse is still invalid when the energy pulse is valid, repeatedly generating a first code element truncation pulse, and thus generating a periodic m-sequence random truncation pulse signal; in this process, there is a process of zero padding, that is, zero padding is required when the symbol width and the number of clock cycles do not match.
3) Generating randomly truncated chirp continuous wave signals
And generating a random truncation linear frequency modulation continuous wave signal according to the m-sequence random truncation pulse generated in the step 2) and the input initial phase, frequency modulation period and the like. The specific method comprises the following steps: firstly, sine and cosine signals are obtained by using a cordic algorithm; inputting a phase by controlling a cordic algorithm to generate a linear frequency modulation signal; and finally, generating a random truncation linear frequency modulation continuous wave signal according to the input signals of the initial phase, the frequency modulation period and the like and the matching with the truncation pulse.
4) Generating an analog randomly truncated chirp continuous wave signal
And 3) generating an analog random truncation linear frequency modulation continuous wave signal according to the digital random truncation linear frequency modulation continuous wave signal generated in the step 3) by configuring the working mode and parameters of the DAC.
As shown in fig. 2, taking 7 symbols as an example, the m-sequence code of the present invention specifically includes: adopting binary m-sequence code, the number of code elements is 7, the initial value is 001, the primitive polynomial 101, the duration time Tm of each code element and the period Ts of the m-sequence; according to the m-sequence code generation module, the generated m-sequence code is 0111110; the m-sequence truncated pulse specifically comprises: generating random truncation pulse and truncation pulse enable by using a truncation pulse generation module according to the code element value and the code element duration Tm; generating a linear frequency modulation continuous wave signal matched with the m sequence, specifically: generating a linear frequency modulation continuous wave signal matched with the m sequence by using a linear frequency modulation continuous wave signal generation module according to an initial frequency, a frequency modulation rate and a frequency modulation period which are input from the outside by taking the truncated pulse enable as a starting point; generating an m-sequence truncated chirp continuous wave signal, specifically: according to the linear frequency modulation continuous wave signal and the m-sequence truncation pulse, the two signals are overlapped through a time sequence adjusting module, and finally a digital m-sequence truncation linear frequency modulation continuous wave signal is generated; generating an analog chirp continuous wave signal, specifically: and converting the digital linear frequency modulation continuous wave signal into an analog signal through a DAC module.
The finally output m-truncated linear frequency modulation continuous wave signal has the characteristics of flexible and variable code element number, configurable period, settable code element width, continuous phase, difficult decoding, strong anti-interference capability and the like, and can obtain frequency spectrum information and target information such as the distance, the speed, the direction and the like of a target in a detection range by combining a signal processing technology of a receiver.
Those skilled in the art will appreciate that the details of the invention not described in detail in the specification are within the skill of those skilled in the art.