CN108923770A - A kind of triangular signal production method - Google Patents
A kind of triangular signal production method Download PDFInfo
- Publication number
- CN108923770A CN108923770A CN201810677969.0A CN201810677969A CN108923770A CN 108923770 A CN108923770 A CN 108923770A CN 201810677969 A CN201810677969 A CN 201810677969A CN 108923770 A CN108923770 A CN 108923770A
- Authority
- CN
- China
- Prior art keywords
- triangular signal
- range coefficient
- triangular
- time threshold
- edge range
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000004519 manufacturing process Methods 0.000 title claims abstract description 15
- 230000000630 rising effect Effects 0.000 claims abstract description 29
- 230000000295 complement effect Effects 0.000 claims abstract description 15
- 230000007547 defect Effects 0.000 abstract description 4
- 238000000034 method Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- 230000035945 sensitivity Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 239000003990 capacitor Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000010355 oscillation Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K4/00—Generating pulses having essentially a finite slope or stepped portions
- H03K4/06—Generating pulses having essentially a finite slope or stepped portions having triangular shape
Landscapes
- Manipulation Of Pulses (AREA)
Abstract
The present invention relates to triangular signals, more particularly to a kind of triangular signal production method, frequency control word is obtained, according to the symmetry acquisition time threshold value of triangular signal according to the period of triangular signal, rising edge range coefficient is obtained according to the amplitude of triangular signal and time threshold, obtains the failing edge range coefficient of complement form according to the amplitude and time threshold of triangular signal, in clock pulses TCFrequency control word is accumulated once when each rising edge to generate phase code, phase code and time threshold are compared to comparator to generate triangular wave mark, the failing edge range coefficient for exporting rising edge range coefficient or complement form in a period is judged according to triangular wave mark, and triangular signal is obtained according to phase code and the range coefficient of output;Technical solution provided by the present invention can effectively overcome the defect that triangular wave symmetry resolution ratio is low present in the prior art.
Description
Technical field
The present invention relates to triangular signals, and in particular to a kind of triangular signal production method.
Background technique
In test fields of measurement, the triangular signal generator for generating triangular wave is widely used.Such as radar, communication
The triangular signal that the electronic equipment in equal fields needs the linearity good is as modulated signal or reference signal, in the D with PWM modulation
In genus audio power amplifier, triangular wave is used to be converted to pulse signal as analog signal.
The main time domain parameter index of triangular signal includes amplitude, period, the linearity, symmetry etc..The wherein linearity
Refer to that triangular wave edge curve meets the degree of linear rule, symmetry refers to triangular wave rising time in entire signal
The percentage of shared time in period.
In the prior art, generate triangular signal method it is general there are two types of, the first using discrete component realize
Integral way, second is the wave table mode based on DDS technology.The product that traditional triangular-wave generator uses discrete component to realize
The mode of dividing, basic principle is that square wave is converted to triangular wave using integrating circuit.
The technical solution defect that integral way generates triangular wave is as follows:(1) integrating circuit is by operational amplifier and several electricity
Resistance, capacitor are constituted, and are influenced and resistance, capacitor by non-ideal factors such as the limited gain of operational amplifier, bandwidth and the amplitudes of oscillation
The thermal noise and process mismatch of introducing, integrating circuit are difficult to generate the good high-performance triangular signal of the linearity, and distorted signals is big;
(2) the resistance value tap number of the variable resistance of digital potentiometer X9241U is 64, and limited tap number causes triangle
The symmetry resolution ratio of wave is low;
(3) Standard resistance range of the variable resistance of digital potentiometer X9241U is 2K Ω to 50K Ω, that is, produced triangle
The symmetry of wave is up to 96%, is not achieved 100%.
With the application of large scale integrated circuit, many signal generators use DDS technology and FPGA (programmable logic
Array) chip generates triangular signal, and the defect of this method is as follows:(1) symmetry of triangular wave is by wave memorizer
Triangular wave sampling point determines, if that modify the symmetry of triangular wave, then needs to deposit according to modified symmetry toward waveform
New triangular wave sampling point is written in reservoir, this work is usually completed by host computer or processor.Therefore this mode needs
More processor resource is occupied, the response time is slow, and in other words, the sensitivity for modifying symmetry is poor;
(2) triangular wave sampling point is stored with wave memorizer, on the one hand occupies the storage resource of FPGA preciousness;Another party
The capacity in face, wave memorizer is limited, and the address bit wide of usual wave memorizer is much smaller than the data bit of phase accumulator
Width, such phase code will make cut position processing when giving wave memorizer, so as to cause Phase Truncation Error, show the three of time domain
It is exactly to shake on the wave signal of angle, especially when triangular wave symmetry is 100% or 0%, more harmonic component can be generated, from
And influence the test effect of triangular signal generator.
Summary of the invention
(1) the technical issues of solving
For disadvantages mentioned above present in the prior art, the present invention provides a kind of triangular signal production methods, can
Effectively overcome the defect that triangular wave symmetry resolution ratio is low present in the prior art.
(2) technical solution
In order to achieve the above object, the present invention is achieved by the following technical programs:
A kind of triangular signal production method, includes the following steps:
S1, frequency control word is obtained according to the period of triangular signal, according to the symmetry acquisition time of triangular signal
Threshold value;
S2, rising edge range coefficient is obtained according to the amplitude and time threshold of triangular signal, according to triangular signal
Amplitude and time threshold obtain the failing edge range coefficient of complement form;
S3, in clock pulses TCFrequency control word is accumulated once when each rising edge to generate phase code;
S4, phase code and time threshold are compared to comparator to generate triangular wave mark;
S5, the failing edge width that rising edge range coefficient or complement form are exported in a period is judged according to triangular wave mark
Spend coefficient;
S6, triangular signal is obtained according to the phase code and the range coefficient of output.
Preferably, obtaining frequency control word according to the period of the triangular signal can be used following formula:
K=2N* Tc/T,
Wherein, K is the frequency control word of triangular signal;N is the bit wide of phase-accumulated module, also as data of phase code
Bit wide;T is triangle wave period;Tc is the clock cycle of triangular wave generation unit.
Preferably, obtaining rising edge range coefficient according to the amplitude of the triangular signal and time threshold can be used down
Formula:
Ar=A/Kr,
Wherein, Kr is time threshold, and A is the Amplitude maxima of triangular signal, and Ar is rising edge range coefficient.
Preferably, the failing edge range coefficient of complement form is obtained according to the amplitude of the triangular signal and time threshold
Following formula can be used:
A′f=A/ (2N-Kr);
Af=(2N-1)-A 'f,
Wherein, Kr is time threshold, and A is the Amplitude maxima of triangular signal, A 'fFor the failing edge width under source code form
Spend coefficient, AfFor the failing edge range coefficient of complement form, N is the data bit width of phase code.
Preferably, the data bit width of the rising edge range coefficient Ar is N+M, wherein high N is rising edge amplitude system
The integer part of number Ar, the low M fractional part for rising edge range coefficient Ar.
Preferably, the data bit width of the failing edge range coefficient is N+M, wherein high N is failing edge amplitude system
Several integer parts, the low M fractional part for failing edge range coefficient.
(3) beneficial effect
Compared with prior art, a kind of triangular signal production method provided by the present invention is using FPGA as main function
Energy component, is aided with a small amount of analog device, structure is simple, easy to accomplish, integrated level is high, at low cost, and the ginseng of triangular signal
Number can flexibly be set, and when modifying triangle wave parameter, respond fast, high sensitivity, while the triangular wave that this method obtains
The linearity is good, the high resolution of symmetry, and inhibit symmetry be 100% or 0% when harmonic component.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, to the technology in the embodiment of the present invention
Scheme is clearly and completely described.Obviously, described embodiments are some of the embodiments of the present invention, rather than whole
Embodiment.Based on the embodiments of the present invention, those of ordinary skill in the art are obtained without creative efforts
The every other embodiment obtained, shall fall within the protection scope of the present invention.
A kind of triangular signal production method, includes the following steps:
S1, frequency control word is obtained according to the period of triangular signal, according to the symmetry acquisition time of triangular signal
Threshold value;
S2, rising edge range coefficient is obtained according to the amplitude and time threshold of triangular signal, according to triangular signal
Amplitude and time threshold obtain the failing edge range coefficient of complement form;
S3, in clock pulses TCFrequency control word is accumulated once when each rising edge to generate phase code;
S4, phase code and time threshold are compared to comparator to generate triangular wave mark;
S5, the failing edge width that rising edge range coefficient or complement form are exported in a period is judged according to triangular wave mark
Spend coefficient;
S6, triangular signal is obtained according to phase code and the range coefficient of output.
Obtaining frequency control word according to the period of triangular signal can be used following formula:
K=2N* Tc/T,
Wherein, K is the frequency control word of triangular signal;N is the bit wide of phase-accumulated module, also as data of phase code
Bit wide;T is triangle wave period;Tc is the clock cycle of triangular wave generation unit.
Obtaining rising edge range coefficient according to the amplitude of triangular signal and time threshold can be used following formula:
Ar=A/Kr,
Wherein, Kr is time threshold, and A is the Amplitude maxima of triangular signal, and Ar is rising edge range coefficient.
Following formula can be used according to the failing edge range coefficient that the amplitude of triangular signal and time threshold obtain complement form:
A′f=A/ (2N-Kr);
Af=(2N-1)-A 'f,
Wherein, Kr is time threshold, and A is the Amplitude maxima of triangular signal, A 'fFor the failing edge width under source code form
Spend coefficient, AfFor the failing edge range coefficient of complement form, N is the data bit width of phase code.
The data bit width of rising edge range coefficient Ar is N+M, wherein the high N integer for rising edge range coefficient Ar
Part, the low M fractional part for rising edge range coefficient Ar.
The data bit width of failing edge range coefficient is N+M, wherein the high N integer part for failing edge range coefficient,
The low M fractional part for failing edge range coefficient.
The parameter that triangular wave parameter processing unit to be configured is passed to phase accumulator inside FPGA, compared by processor
In device and selector.Wherein, phase accumulator generates phase code according to frequency control word K is cumulative, and phase code gives comparator and multiplication
Device;Comparator compares phase code and time threshold Kr, generates triangular wave flag bit and gives selector;Selector is according to triangular wave mark
The failing edge range coefficient A of position selection rising edge range coefficient Ar and complement formfIn one give multiplier;Multiplier will
Phase code is multiplied with range coefficient, and product is the triangular signal of digital form.FPGA internal module is all T in the periodCWhen
It works under clock.
Triangular wave symmetry is indicated with τ, and range is (0,1), then processor calculates Kr according to the following formula:
Kr=(2N- 1) * τ,
Particularly, when symmetry is 1, the triangular wave of linear increment can drop suddenly;When symmetry is 0, linear decrease
Triangular wave can increase suddenly, and both of these case is known as amplitude abrupt change.Inside FPGA, there is no problem for the amplitude abrupt change of digital form, but
The bandwidth of analog device outside FPGA is limited, therefore can generate more harmonic component.From the point of view of time domain waveform, due to
Bandwidth limitation, by analog device, treated that triangular wave symmetry is no longer stringent 1 or 0.
In order to inhibit harmonic component, when processor calculates Kr according to above-mentioned formula, when symmetry τ is equal to 1, Kr=(2 is allowedN-
1) -2, such amplitude will not drop suddenly;When symmetry τ is equal to 0, Kr=2 is allowed, such amplitude will not increase suddenly, would not generate harmonic wave
Component.
Triangular wave generation unit uses large scale integrated chip FPGA, and integrated level is high, avoids excessive analog device
The influence of non-ideal factor, and phase code is Strict linear, therefore the triangular wave linearity generated is good, can be avoided integrating circuit
Distorted signals problem.
There is no the limitation of wave memorizer capacity, phase accumulator and range coefficient Ar, AfData bit width can be very
Height, and Ar, AfInteger, fractional part be involved in operation, therefore the resolution ratio of triangular wave symmetry can be very high.It compares existing
64 taps of the digital potentiometer X9241U of technology integral way, it is with the obvious advantage.
When symmetry is 1 or 0, formula is finely tuned, amplitude abrupt change will not be generated, so as to inhibit multiple-harmonic point
The generation of amount.The symmetry scope limitation of prior art integral way is compared, the present invention can accomplish to be in close proximity to 1 or 0.
A kind of triangular signal production method provided by the present invention is aided with a small amount of using FPGA as main function components
Analog device, structure is simple, easy to accomplish, integrated level is high, at low cost, and the parameter of triangular signal can flexibly be set, and
And when modifying triangle wave parameter, fast, high sensitivity is responded, while the triangular wave linearity that this method obtains is good, symmetry
High resolution, and inhibit symmetry be 100% or 0% when harmonic component.
The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to the foregoing embodiments
Invention is explained in detail, those skilled in the art should understand that:It still can be to aforementioned each implementation
Technical solution documented by example is modified or equivalent replacement of some of the technical features;And these modification or
Replacement, can't be such that the essence of corresponding technical solution departs from the spirit and scope of the technical scheme of various embodiments of the present invention.
Claims (6)
1. a kind of triangular signal production method, it is characterised in that:Include the following steps:
S1, frequency control word is obtained according to the period of triangular signal, according to the symmetry acquisition time threshold value of triangular signal;
S2, rising edge range coefficient is obtained according to the amplitude and time threshold of triangular signal, according to the amplitude of triangular signal
The failing edge range coefficient of complement form is obtained with time threshold;
S3, in clock pulses TCFrequency control word is accumulated once when each rising edge to generate phase code;
S4, phase code and time threshold are compared to comparator to generate triangular wave mark;
S5, the failing edge amplitude system that rising edge range coefficient or complement form are exported in a period is judged according to triangular wave mark
Number;
S6, triangular signal is obtained according to the phase code and the range coefficient of output.
2. triangular signal production method according to claim 1, it is characterised in that:According to the week of the triangular signal
Phase, which obtains frequency control word, can be used following formula:
K=2N* Tc/T,
Wherein, K is the frequency control word of triangular signal;N is the bit wide of phase-accumulated module, also the as data bit of phase code
It is wide;T is triangle wave period;Tc is the clock cycle of triangular wave generation unit.
3. triangular signal production method according to claim 1, it is characterised in that:According to the width of the triangular signal
Value and time threshold, which obtain rising edge range coefficient, can be used following formula:
Ar=A/Kr,
Wherein, Kr is time threshold, and A is the Amplitude maxima of triangular signal, and Ar is rising edge range coefficient.
4. triangular signal production method according to claim 1, it is characterised in that:According to the width of the triangular signal
Following formula can be used in the failing edge range coefficient that value and time threshold obtain complement form:
A′f=A/ (2N-Kr);
Af=(2N-1)-A 'f,
Wherein, Kr is time threshold, and A is the Amplitude maxima of triangular signal, A 'fFor the failing edge amplitude system under source code form
Number, AfFor the failing edge range coefficient of complement form, N is the data bit width of phase code.
5. triangular signal production method according to claim 3, it is characterised in that:The rising edge range coefficient Ar's
Data bit width is N+M, wherein the high N integer part for rising edge range coefficient Ar, low M is rising edge range coefficient
The fractional part of Ar.
6. triangular signal production method according to claim 4, it is characterised in that:The number of the failing edge range coefficient
It is N+M according to bit wide, wherein the high N integer part for failing edge range coefficient, low M is the small of failing edge range coefficient
Number part.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810677969.0A CN108923770A (en) | 2018-06-27 | 2018-06-27 | A kind of triangular signal production method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810677969.0A CN108923770A (en) | 2018-06-27 | 2018-06-27 | A kind of triangular signal production method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108923770A true CN108923770A (en) | 2018-11-30 |
Family
ID=64423824
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810677969.0A Pending CN108923770A (en) | 2018-06-27 | 2018-06-27 | A kind of triangular signal production method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108923770A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111931669A (en) * | 2020-08-14 | 2020-11-13 | 山东大学 | Signal self-adaptive interception method and system of solar radio observation system |
-
2018
- 2018-06-27 CN CN201810677969.0A patent/CN108923770A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111931669A (en) * | 2020-08-14 | 2020-11-13 | 山东大学 | Signal self-adaptive interception method and system of solar radio observation system |
CN111931669B (en) * | 2020-08-14 | 2022-03-29 | 山东大学 | Signal self-adaptive interception method and system of solar radio observation system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9973178B1 (en) | Method and apparatus for clock frequency multiplier | |
US8115519B2 (en) | Phase accumulator generating reference phase for phase coherent direct digital synthesis outputs | |
US9124244B2 (en) | Method and device for generating a filter coefficient in real time | |
CN102723931A (en) | Wide-dynamic high-accuracy and edge time adjustable impulse wave producing method | |
CN1232031C (en) | High-precision optional waveform generator based on FPGA | |
US11949420B2 (en) | Clock spread spectrum circuit, electronic equipment, and clock spread spectrum method | |
CN103297047A (en) | Atomic frequency standard and servo locking method | |
CN102317803A (en) | Testing device, testing method, and phase shifter | |
CN108923770A (en) | A kind of triangular signal production method | |
CN109617540B (en) | Signal delay device | |
CN103873025B (en) | A kind of triangular signal production method and triangular-wave generator | |
CN109714032A (en) | A kind of impulse wave FM circuit and frequency modulation method based on DDS | |
CN112290934B (en) | Controllable jitter clock generating device based on Bias-Tee signal synthesis | |
CN103888105A (en) | Method and system for generating pulse width wave digits with continuously-adjusted wide frequency | |
CN209488539U (en) | A kind of impulse wave FM circuit and frequency modulation system based on DDS | |
CN104660218A (en) | Arbitrary waveform synthesizer | |
CN112688671A (en) | Linear frequency modulation pulse generating device | |
CN207234737U (en) | A kind of low nose signal generator | |
CN108322189B (en) | Method for generating perturbation phase modulation DDS signal | |
Samarah | A novel approach for generating digital chirp signals using FPGA technology for synthetic aperture radar applications | |
Daodong et al. | Design of DDS Signal Generator Based on FPGA | |
Gupta et al. | An Improved Analog Waveforms Generation Technique using Direct Digital Synthesizer | |
Bilgin et al. | Low cost laboratory type signal generator using DDS method | |
Tiankai et al. | Method of Controlling the Single-Ended Clock Bus Interference to the RF Bands | |
CN109358698B (en) | Direct digital frequency synthesis method and device based on composite frequency control word |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20181130 |