Background technology
Amplitude modulation (Amplitude Modulation, AM) and amplitude-shift keying (Amplitude Shift Keying ASK) is basic function in the signal source generator.Wherein amplitude modulation is meant that the amplitude that makes carrier wave is along with modulation signal changes with the amplitude of modulation wave signal control carrier wave.If the carrier signal expression formula is U
c=A
cCos ω
cT, the expression formula of modulation wave signal is U
m=A
mCos ω
mT satisfies ω usually
m>>ω
c, then according to the definition of amplitude modulation(PAM), the expression formula of the modulated wave signal that produces at last should be U
AM=A
c(1+A
mCos ω
mT) cos ω
cT.Amplitude-shift keying is meant the break-make with digital modulation signals control carrier wave; It is in the AM modulation that realizes regarding special on the angle as; Both implementations in signal source generator are the same, only are that example describes in this application with AM therefore, and the realization of ASK can be referring to the realization of AM.
Existing implementation has two kinds of analog form and digital forms, because advantage such as digital form has the precision height, and controllability is strong, digital form is comparatively general at present, such as Direct Digital frequency synthesis (Direct Digital Synthesis, DDS) technology.See also Fig. 1; It is the theory diagram of a kind of DDS technology in the prior art, and visible by Fig. 1, it mainly is made up of phase accumulator, wave memorizer (ROM/RAM) and D/A converter; Rising edge at each clock; Phase accumulator is accomplished the one-accumulate operation, realizes last output valve and frequency control word K addition, and the phase information of its output is as the address signal of wave memorizer; According to the range value that finds out the respective phase place in the wave table of this phase information in wave memorizer, accomplish the conversion of phase place to amplitude.The range value of output send D/A converter to carry out digital-to-analog conversion, final acquisition simulation output.
Therefore, utilize DDS to produce the AM modulation signal in the prior art, be illustrated in figure 2 as the system chart of a kind of DDS of utilization generation AM modulation signal in the prior art.This scheme can be divided into two parts, the part in the frame of broken lines at the scene programmable gate array (Field-Programmable Gate Array realizes that the outside part of dotted line realizes with hardware circuit in FPGA).At first, software arrangements is carried out the parameter of AM modulation, like the carrier frequency control word, and frequency of modulated wave control word and depth of modulation control word.Under the control respectively of carrier wave, frequency of modulated wave control word, produce the phase information in the corresponding moment of modulation waveform, in wave memorizer, search wave table to produce carrier wave, modulation wave signal sequence according to this phase information by phase accumulator.This carrier wave, modulation wave signal sequence are after FPGA output, and (filter filtering has just obtained the analog carrier, the modulation wave signal that need for digital-to-analog converter, DAC) conversion to pass through digital to analog converter respectively.Carrier wave, modulating wave multiplies each other through multiplier, has just obtained the AM modulating wave.Under this implementation, can change the parameters such as depth of modulation of AM through the range parameter of revising modulating wave in depth of modulation control word and the modulating wave wave memorizer.
But above-mentioned prior art also exists following defective:
The first, externally use analog chips such as DAC converter, wave filter, multiplier in realizing, increased cost and printed circuit board (Printed Circuit Board, PCB) area of fabric swatch.
The second, signal brings noise can for the AM modulation signal of final output through external analog chips such as DAC converter, wave filter, multipliers.
When three, changing depth of modulation, all need change all range values in the wave table in the modulating wave wave memorizer at every turn, make that having spent the plenty of time is upgrading on the modulating wave wave table, and easy error.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of method, Apparatus and system of in signal source, realizing amplitude modulation and amplitude-shift keying function, to reduce cost, improves implementation efficiency and accuracy, and improves the quality of final output signal.
On the one hand; The embodiment of the invention provides a kind of method that in signal source, realizes amplitude modulation and amplitude-shift keying function; This method comprises on-site programmable gate array FPGA performing step and outside performing step, and wherein the FPGA performing step comprises: utilize phase accumulator and wave memorizer to obtain carrier wave sequence and modulating wave sequence respectively; Said modulating wave sequence and modulation amplitude multiplied each other obtain first output; With said first output with the addition of modulating wave amplitude offset after with said carrier wave sequence multiply each other obtain second output; Outside performing step comprises: utilize analog to digital converter DAC to convert said second output into simulating signal; Utilize wave filter that said simulating signal is carried out filtering to obtain final required AM modulation signal or amplitude-shift keying ASK modulation signal again.
Preferably, utilize phase accumulator and wave memorizer to obtain carrier wave sequence respectively in the method for the embodiment of the invention and the modulating wave sequence comprises: carrier frequency control word and frequency of modulated wave control word are set; With said carrier frequency control word and frequency of modulated wave control word respectively as the input of said phase accumulator, and successively through said phase accumulator and said wave memorizer to obtain said carrier wave sequence and modulating wave sequence.
On the other hand; The embodiment of the invention also provides a kind of device of in signal source, realizing amplitude modulation and amplitude-shift keying function; Comprise FPGA control module and external control unit, said FPGA control module is used for: utilize phase accumulator and wave memorizer to obtain carrier wave sequence and modulating wave sequence respectively; And said modulating wave sequence and modulation amplitude multiplied each other obtains first output; And, with said first output with the addition of modulating wave amplitude offset after with said carrier wave sequence multiply each other obtain second output; Said external control unit is used for: utilize analog to digital converter DAC to convert said second output into simulating signal; And, utilize wave filter that said simulating signal is carried out filtering to obtain final required AM modulation signal or amplitude-shift keying ASK modulation signal again.
Preferably, the FPGA control module utilizes phase accumulator and wave memorizer to obtain carrier wave sequence respectively and the modulating wave sequence specifically comprises in the device that provides of the embodiment of the invention: carrier frequency control word and frequency of modulated wave control word are set; With said carrier frequency control word and frequency of modulated wave control word respectively as the input of said phase accumulator, and successively through said phase accumulator and said wave memorizer to obtain said carrier wave sequence and modulating wave sequence.
On the other hand; The embodiment of the invention also provides a kind of system that in signal source, realizes amplitude modulation and amplitude-shift keying function; This system comprises FPGA internal subsystems and external subsystems, and said FPGA internal subsystems comprises: first phase accumulator, second phase accumulator, first wave memorizer, second wave memorizer, first multiplier, second multiplier and totalizer, wherein; Said first phase accumulator links to each other with said first wave memorizer, in order to produce carrier wave sequence; Said second phase accumulator links to each other with said second wave memorizer, in order to produce the modulating wave sequence; Said second multiplier links to each other with said second wave memorizer and totalizer respectively, be used for said modulating wave sequence and modulation amplitude multiply each other obtain first export to said totalizer; Said totalizer also links to each other with said first multiplier, is used for said first output and the addition of modulating wave amplitude offset, and addition result is inputed to said first multiplier; Said first multiplier also links to each other with said first wave memorizer, be used for said addition result and said carrier wave sequence multiply by mutually obtain second output; Said external subsystems comprises: analog to digital converter and wave filter; Said analog to digital converter links to each other with said first multiplier and said wave filter respectively; Be used for converting second output into simulating signal, said wave filter is used for said simulating signal is carried out filtering to obtain final required AM modulation signal or ASK modulation signal.
Preferably; The system that the embodiment of the invention provides comprises that also one is provided with the unit; Be used to said FPGA internal subsystems required carrier frequency control word, frequency of modulated wave control word, modulation amplitude and modulating wave amplitude offset are set; Said carrier frequency control word is as the input of said first phase accumulator, and said frequency of modulated wave control word is as the input of said second phase accumulator.
The embodiment of the invention comes the instead of external analog multiplier to realize the generation of AM modulation signal and ASK modulation signal through the stone multiplier among the FPGA; Thereby reduced the use of No. one analog to digital converter and wave filter; Reduce cost and reduced PCB fabric swatch area; Also reduced the complexity of hardware circuit, convenient debugging can also make that in addition the signal quality of final output is improved.At last, because the embodiment of the invention can be passed through software arrangements modulating wave amplitude, the modulating wave amplitude offset in the time of can avoiding changing depth of modulation, all will reconfigure wave table at every turn.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Be illustrated in figure 3 as a kind of system architecture synoptic diagram of in signal source, realizing amplitude modulation and amplitude-shift keying function that the embodiment of the invention provides; This system comprises FPGA internal subsystems 310 and external subsystems 320; In embodiments of the present invention; FPGA built-in system 310 i.e. this subsystem is to be achieved through the inner internal components of FPGA, and external subsystems 320 is achieved through the external analog device.
In the present embodiment; FPGA built-in system 310 comprises phase accumulator 311 and 313, wave memorizer 312 and 314; Multiplier 315 and 316, totalizer 317; Wherein the input end of wave memorizer 312 links to each other with the output terminal of phase accumulator 311, and an input end of the output terminal of wave memorizer 312 and multiplier 316 links to each other; The input end of wave memorizer 314 links to each other with the output terminal of phase accumulator 313, and an input end of the output terminal of wave memorizer 314 and multiplier 315 links to each other; An input end of the output terminal of multiplier 315 and totalizer 317 links to each other, and another input end of the output terminal of totalizer 317 and multiplier 316 links to each other.
External subsystems 320 comprises analog to digital converter 321 and wave filter 322, and wherein the input end of analog to digital converter 321 links to each other with the output terminal of multiplier 316, and the output terminal of analog to digital converter 321 then links to each other with the input end of wave filter 322.
As one embodiment of the present of invention; Based on above-mentioned system architecture; Native system can also comprise that is provided with a unit (not illustrating); This is provided with the unit can be provided with following several kinds of inputs for FPGA built-in system 310: be a carrier frequency control word that input end provided of phase accumulator 311; A frequency of modulated wave control word that input end provided for phase accumulator 313 is the modulation amplitude that another input end provided of multiplier 315, is the modulating wave amplitude offset that another input end provided of totalizer 317.In addition, unit further is set clock frequency Fc is set, make two-way phase accumulator and wave memorizer carry out work synchronously.This is provided with the unit both can be positioned at FPGA inside, also can be positioned at the FPGA outside, and the embodiment of the invention does not limit this.
Describe in the face of the process of said system generation AM modulation signal down, it is pointed out that the generation for the ASK modulation signal also is same process, therefore no longer be repeated in this description.
Phase accumulator 311 with carrier frequency control word and last output valve as input; Be about to after carrier frequency control word and the last output valve addition output result as this; The output result here is the phase information of carrier waveform, then this output result is inputed to wave memorizer 312; Wave memorizer 312 internal memories contain wave table; Can produce the digital carrier sequence according to the phase information and the wave table of phase accumulator 311 outputs; Can also in wave table, search in addition and the corresponding range value of this phase information, thereby accomplish the conversion of phase place to amplitude.Wave memorizer 312 can be exported to multiplier 316 with the carrier wave sequence that produces.
Phase accumulator 313 with frequency of modulated wave control word and last output valve as input; Be about to after carrier frequency control word and the last output valve addition output result as this; The output result here is the phase information of modulating wave waveform, then this output result is inputed to wave memorizer 314; Wave memorizer 314 is exported the digital modulation wave train to multiplier 315 according to the output result of phase accumulator 313; Multiplier 315 multiplies each other this modulating wave sequence and modulation amplitude, and multiplied result is exported to totalizer 317; 317 of totalizers are this multiplied result and the addition of modulating wave amplitude offset parameter, and addition result is exported to multiplier 316.
Multiplier 316 can multiply each other with the modulating wave sequence that the process amplitude that the carrier wave sequence and the wave memorizer 314 of wave memorizer 312 outputs are exported is adjusted; To obtain the AM modulation sequence of numeral, then this AM modulation sequence is exported to the analog to digital converter 321 in the external subsystems 320.
Analog to digital converter 321 can convert the AM modulation sequence into simulating signal, and exports to wave filter 322, by final AM modulation signal that obtains simulating after wave filter 322 filtering and output.
Can know through foregoing description; In embodiments of the present invention; Owing to utilized inner stone multiplier and the totalizer of FPGA, make present embodiment only need use No. one analog to digital converter and wave filter, therefore save analog to digital converter, wave filter and the analog multiplier chip of one tunnel costliness; Not only reduced cost thus, and reduced the influence of analog chip final generation quality of signals.In addition; The embodiment of the invention is in the amplitude of accommodation; Directly use these two parameters of modulation amplitude and modulating wave amplitude offset and come the amplitude of accommodation; Compare with range parameter and the depth of modulation control word of utilizing modification modulating wave wave memorizer internal modulation ripple in the prior art, no longer need all revise wave table at every turn, and only need a fixing wave table to get final product.This is owing to the range parameter of modification modulating wave wave memorizer internal modulation ripple and the purpose of depth of modulation control word in the prior art are exactly in order to revise modulation amplitude and modulating wave amplitude offset.
Be illustrated in figure 4 as a kind of method flow synoptic diagram of in signal source, realizing amplitude modulation and amplitude-shift keying function that the embodiment of the invention provides, this method comprises FPGA performing step and outside performing step, and wherein the FPGA performing step comprises:
S401: utilize phase accumulator and wave memorizer to obtain carrier wave sequence and modulating wave sequence respectively.
Promptly utilize two-way phase accumulator and wave memorizer to obtain carrier wave sequence and modulating wave sequence; When obtaining carrier wave sequence; With the input of carrier frequency control word and last output valve as one road phase accumulator; And with the output of this phase accumulator input, at last from wave memorizer outgoing carrier sequence as No. one wave memorizer; When obtaining the modulating wave sequence; With the input of frequency of modulated wave control word and last output valve as another road phase accumulator; And with the output of this phase accumulator input, at last from this wave memorizer output modulating wave sequence as another road wave memorizer.The generation that it is pointed out that carrier wave sequence and modulating wave sequence is carried out synchronously, specifically can control above-mentioned two-way phase accumulator and wave memorizer through same clock frequency.
S402: said modulating wave sequence and modulation amplitude multiplied each other obtains first output.
Can utilize an inner stone multiplier of FPGA that modulating wave sequence and modulation amplitude multiply by mutually in the present embodiment and obtain this first output.
S403: with said first output with the addition of modulating wave amplitude offset after with said carrier wave sequence multiply each other obtain second output.
Can utilize an inner totalizer of FPGA with first output and the addition of modulating wave amplitude offset in the present embodiment; And utilize another stone multiplier that addition result and above-mentioned carrier wave sequence are multiplied each other to obtain this second output, this second output is through the modulating wave sequence after the amplitude adjusted.
Outside performing step specifically comprises:
S404: utilize analog to digital converter to convert said second output into simulating signal.
S405: utilize wave filter that said simulating signal is carried out filtering to obtain final required AM modulation signal again.
The embodiment of the invention comes the instead of external analog multiplier to realize the generation of AM modulation signal and ASK modulation signal through the stone multiplier among the FPGA; Thereby reduced the use of No. one analog to digital converter and wave filter; Cost and PCB fabric swatch area have been reduced; Also reduce the complexity of hardware circuit, made things convenient for debugging, can also make the signal quality of final output be improved in addition.At last, because the embodiment of the invention can be passed through software arrangements modulating wave amplitude, the modulating wave amplitude offset in the time of can avoiding changing depth of modulation, all will reconfigure wave table at every turn.
Be illustrated in figure 5 as a kind of apparatus structure synoptic diagram of in signal source, realizing amplitude modulation and amplitude-shift keying function that the embodiment of the invention provides, this device comprises FPGA control module 510 and external control unit 520, wherein:
FPGA control module 510 is used to utilize phase accumulator and wave memorizer to obtain carrier wave sequence and modulating wave sequence respectively; And said modulating wave sequence and modulation amplitude multiplied each other obtains first output; And, obtaining second output with multiplying each other with said carrier wave sequence after said first output and the addition of modulating wave amplitude offset, second output here is through the modulating wave sequence after the amplitude adjusted.
As one embodiment of the present of invention, when FPGA control module 510 utilized phase accumulator and wave memorizer to obtain carrier wave sequence and modulating wave sequence respectively, it specifically comprised: carrier frequency control word and frequency of modulated wave control word are set; With said carrier frequency control word and frequency of modulated wave control word respectively as the input of said phase accumulator, and successively through said phase accumulator and said wave memorizer to obtain said carrier wave sequence and modulating wave sequence.
External control unit 520 is used to utilize analog to digital converter DAC to convert said second output into simulating signal; And, utilize wave filter that said simulating signal is carried out filtering to obtain final required AM modulation signal again.
The embodiment of the invention comes the instead of external analog multiplier to realize the generation of AM modulation signal and ASK modulation signal through the stone multiplier among the FPGA; Thereby reduced the use of No. one analog to digital converter and wave filter; Reduce cost and reduced PCB fabric swatch area; Also reduced the complexity of hardware circuit, convenient debugging can also make that in addition the signal quality of final output is improved.At last, because the embodiment of the invention can be passed through software arrangements modulating wave amplitude, the modulating wave amplitude offset in the time of can avoiding changing depth of modulation, all will reconfigure wave table at every turn.
Come the application of said method, Apparatus and system is further described through a concrete embodiment more below:
Be illustrated in figure 6 as the structural representation of a kind of binary channels random wave generator in the prior art, this random wave generator comprises peripheral interface 601, digital signal processor 602, mainboard 603, subcard 604 and 605, keyboard 606 and graphical user interface 607.
Peripheral interface 601 comprises GPIB, USB, LAN, and it can be connected to PC or network with the random wave generator, so that instrument can be received PC control.Digital signal processor 602 is as being the control center of generator, the difference output of the parameter control generator that can be provided with according to the user.Mainboard 603 is to add some peripheral components by a FPGA to constitute, and as data channel, various control commands or data by digital signal processor 602 sends all are transmitted to subcard 604 and 605 through mainboard 603. Subcard 604 and 605 can be realized two fully independently passage outputs.Keyboard 606 can make the user be used for being provided with various parameters.607 of graphical user interface can make the user realize mutual with generator.
The present invention promptly can be applied in above-mentioned subcard 604 or 605, to reach beneficial effect of the present invention.Be illustrated in figure 7 as the structural representation of a kind of binary channels random wave generator that the embodiment of the invention provides; Wherein main FPGA is the FPGA in the mainboard 603 among Fig. 6; By visible among the figure, subcard 604 can specifically comprise time FPGA 6041, analog to digital converter 6042 and 6045, wave filter 6043 and 6046, buffer amplifier circuit 6044, multiplier 6047 and amplifying circuit 6048.
Concrete in the present embodiment application part of the present invention is time FPGA 6041, analog to digital converter 6042 and wave filter 6043; Time FPGA 6041 FPGA subsystem 310 in can corresponding diagram 3 wherein, and analog to digital converter 6042 and wave filter 6043 analog to digital converter 321 and wave filter 322 in respectively can corresponding diagram 3.Other part in this subcard 604 belongs to prior art, just no longer it has been given unnecessary details.
It is thus clear that; Use random wave generator of the present invention and reduced the use of No. one analog to digital converter and wave filter, reduced cost and PCB fabric swatch area, also reduced the complexity of hardware circuit; Convenient debugging can also make that in addition the signal quality of final output is improved.At last, because the embodiment of the invention can be passed through software arrangements modulating wave amplitude, the modulating wave amplitude offset in the time of can avoiding changing depth of modulation, all will reconfigure wave table at every turn.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method; Can instruct relevant hardware to accomplish through computer program; Described program can be stored in the computer read/write memory medium; This program can comprise the flow process like the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above-described embodiment; The object of the invention, technical scheme and beneficial effect have been carried out further explain, and institute it should be understood that the above is merely embodiment of the present invention; And be not used in qualification protection scope of the present invention; All within spirit of the present invention and principle, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.