CN102111129B - There is the signal generator of output noise semiotic function and the method for output noise signal - Google Patents
There is the signal generator of output noise semiotic function and the method for output noise signal Download PDFInfo
- Publication number
- CN102111129B CN102111129B CN200910243141.5A CN200910243141A CN102111129B CN 102111129 B CN102111129 B CN 102111129B CN 200910243141 A CN200910243141 A CN 200910243141A CN 102111129 B CN102111129 B CN 102111129B
- Authority
- CN
- China
- Prior art keywords
- signal generator
- initial value
- pseudo
- random number
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 16
- 238000006243 chemical reaction Methods 0.000 claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 25
- 230000006870 function Effects 0.000 claims abstract description 8
- 238000010586 diagram Methods 0.000 description 10
- 238000012360 testing method Methods 0.000 description 9
- 230000015556 catabolic process Effects 0.000 description 7
- 230000008901 benefit Effects 0.000 description 3
- 230000000875 corresponding effect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000001276 controlling effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000005284 excitation Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Landscapes
- Tests Of Electronic Circuits (AREA)
Abstract
本发明公开了一种具有输出噪声信号功能的信号发生器2,信号发生器2包括控制单元21、输入单元24、非易失性存储器22、波形处理单元25和数模转换单元26,输入单元24、非易失性存储器22和波形处理单元25分别与控制单元21相连接,数模转换单元26与波形处理单元25相连接,非易失性存储器22存储有特征参数221,特征参数包括开机次数222,控制单元21用于产生一个与开机次数222相关联的初始值,波形处理单元25用于利用初始值来产生伪随机数序列,数模转换单元26用于将伪随机数序列进行数模转换。本发明信号发生器2改善了用户在多次使用信号发生器时产生噪声相同的问题。
The invention discloses a signal generator 2 with the function of outputting noise signals. The signal generator 2 includes a control unit 21, an input unit 24, a non-volatile memory 22, a waveform processing unit 25, and a digital-to-analog conversion unit 26. The input unit 24. The non-volatile memory 22 and the waveform processing unit 25 are respectively connected to the control unit 21, and the digital-to-analog conversion unit 26 is connected to the waveform processing unit 25. The non-volatile memory 22 stores characteristic parameters 221, and the characteristic parameters include power-on The number of times 222, the control unit 21 is used to generate an initial value associated with the power-on times 222, the waveform processing unit 25 is used to use the initial value to generate a pseudo-random number sequence, and the digital-to-analog conversion unit 26 is used to count the pseudo-random number sequence Modular conversion. The signal generator 2 of the present invention solves the problem that the same noise is generated when the user uses the signal generator for many times.
Description
技术领域 technical field
本发明涉及一种具有输出噪声信号功能的多路信号发生器,特别涉及一种输出的噪声的随机性较高的多路信号发生器。The invention relates to a multi-channel signal generator with the function of outputting noise signals, in particular to a multi-channel signal generator whose output noise has high randomness.
背景技术 Background technique
信号发生器作为常见的激励源,已经被广泛的应用到科学研究以及工业工程领域。信号发生器的一个典型应用就是在实验室中模拟各种信号,作为待测电路和系统的输入激励,为测试待测电路和系统的各种性能指标提供模拟环境。传统意义上的信号发生器按其信号波形分为四大类:(1)正弦信号发生器:主要用于测量电路和系统的频率特性、非线性失真、增益及灵敏度等;(2)函数(波形)信号发生器:产生某些特定的周期性时间函数波形(正弦波、方波、三角波、锯齿波和脉冲波)信号,除可供通信、仪表和自动控制系统测试用外,还广泛用于其他非电测量领域;(3)脉冲信号发生器:产生宽度、幅度和重复频率可调的矩形脉冲的发生器,可用于测试线性系统的瞬态响应,或用作模拟信号来测试雷达、多路通信和其他脉冲数字系统的性能;(4)随机信号发生器:可用于模拟实际工作条件中的噪声,将产生的随机信号引入待测系统,从而测定系统性能;可以给被测系统外加一个已知噪声信号与系统内部噪声比较以测定噪声系数;还可以用随机信号代替正弦或脉冲信号,以测定系统动态特性等。As a common excitation source, signal generators have been widely used in scientific research and industrial engineering. A typical application of the signal generator is to simulate various signals in the laboratory, as the input stimulus of the circuit and system under test, and provide a simulation environment for testing various performance indicators of the circuit and system under test. Signal generators in the traditional sense are divided into four categories according to their signal waveforms: (1) sinusoidal signal generators: mainly used to measure frequency characteristics, nonlinear distortion, gain and sensitivity of circuits and systems; (2) function ( Waveform) signal generator: generate some specific periodic time function waveform (sine wave, square wave, triangle wave, sawtooth wave and pulse wave) signal, in addition to being used for communication, instrumentation and automatic control system testing, it is also widely used (3) Pulse signal generator: a generator that generates rectangular pulses with adjustable width, amplitude and repetition frequency, which can be used to test the transient response of linear systems, or used as analog signals to test radar, The performance of multi-channel communication and other pulse digital systems; (4) random signal generator: it can be used to simulate the noise in actual working conditions, and introduce the generated random signal into the system under test to measure the performance of the system; it can be added to the system under test A known noise signal is compared with the internal noise of the system to determine the noise figure; a random signal can also be used instead of a sinusoidal or pulse signal to determine the dynamic characteristics of the system, etc.
随着电子技术的飞速发展,集成度越来越高,现在一般的信号发生器均可以将上述四类信号发生器的基本功能集于一身。其中,随机信号的产生方法有很多,大致可分为两类,一类是用纯模拟电路产生随机噪声;另一类是利用微处理器和软件系统用伪随机序列产生随机噪声。这里提到的随机噪声均指白噪声,有特殊用途的有色噪声可通过对白噪声的滤波处理得到。With the rapid development of electronic technology, the integration level is getting higher and higher, and now general signal generators can integrate the basic functions of the above four types of signal generators into one. Among them, there are many ways to generate random signals, which can be roughly divided into two categories. One is to use pure analog circuits to generate random noise; the other is to use microprocessors and software systems to generate random noise with pseudo-random sequences. The random noise mentioned here refers to the white noise, and the colored noise with special purpose can be obtained by filtering the white noise.
公开号为CN85102755A的名称为“多功能随机信号发生器”的中国专利申请公开说明书公开了一种多功能随机信号发生器。下面简要介绍该专利公开的多功能随机信号发生器的工作原理。请参照图1,两个独立的正态白噪声源[1]、[2],用于产生正态分布的白噪声。韦布尔噪声形成电路[3],用于形成韦布尔白噪声。对数-正态白噪声形成电路[4],用于形成对数-正态白噪声。相关噪波形成电路[5],用于形成各种相关性噪波。功放电路[6],用于将产生的噪声信号放大后输出。噪声参数测试电路[7],用于指示输出韦布尔白噪声的形状及尺度参数以及其他噪波的有效电压值。开关元件[8]、[9],实现噪声信号的选择性输出。The Chinese Patent Application Publication No. CN85102755A titled "Multifunctional Random Signal Generator" discloses a multifunctional random signal generator. The following briefly introduces the working principle of the multifunctional random signal generator disclosed in this patent. Please refer to Figure 1, two independent normal white noise sources [1], [2] are used to generate normally distributed white noise. The Weibull noise forming circuit [3] is used to form Weibull white noise. The logarithmic-normal white noise forming circuit [4] is used to form logarithmic-normal white noise. The correlation noise forming circuit [5] is used to form various correlation noises. The power amplifier circuit [6] is used to amplify the generated noise signal and output it. The noise parameter test circuit [7] is used to indicate the shape and scale parameters of the output Weibull white noise and the effective voltage value of other noise waves. The switching elements [8], [9] realize the selective output of the noise signal.
两个独立正态白噪声源[1]、[2]产生的正态白噪声,输入到韦布尔白噪声形成电路[3]后,变为韦布尔白噪声经功放[6]输出,正态白噪声经对数-正态白噪声形成电路[4]后,变为对数-正态白噪声经功放[6]输出。上述三种白噪声经相关噪波形成电路[5]作用及功放后,可输出相应的相关噪波。开关元件[8]用于在上述三种白噪声,即正态白噪声、韦布尔白噪声、对数-正态白噪声,中选择一种作为相关噪波电路[5]的输入或直接作为功放[6]的输入,由开关元件[9]选择将白噪声或者其相关噪声送入功放[6]电路,经放大后输出。The normal white noise generated by two independent normal white noise sources [1] and [2] is input to the Weibull white noise forming circuit [3], and then becomes Weibull white noise and output through the power amplifier [6]. After the white noise passes through the logarithmic-normal white noise forming circuit [4], it becomes logarithmic-normal white noise and is output through the power amplifier [6]. The above-mentioned three kinds of white noise can output the corresponding correlated noise after being acted on by the correlative noise formation circuit [5] and power amplifier. The switch element [8] is used to select one of the above three kinds of white noise, namely, normal white noise, Weibull white noise, and logarithmic-normal white noise, as the input of the correlation noise circuit [5] or directly as The input of the power amplifier [6] is selected by the switch element [9] to send white noise or its related noise into the power amplifier [6] circuit, and output after amplification.
请参照图2,图2为正态白噪声源[1]、[2]的电路图。其中,D1为齐纳二极管,是该电路中的关键部件。当齐纳二极管发生雪崩击穿时,会产生大量噪声。利用这一特性,让齐纳二极管工作在噪声区,然后将产生的白噪声电流用晶体管放大,并以射随器做缓冲级,即可获得正态分布的白噪声。Please refer to Fig. 2, Fig. 2 is the circuit diagram of normal white noise source [1], [2]. Among them, D1 is a Zener diode, which is a key component in the circuit. When a Zener diode avalanche breaks down, a lot of noise is generated. Using this feature, let the zener diode work in the noise area, and then amplify the white noise current generated by a transistor, and use the emitter follower as a buffer stage to obtain white noise with a normal distribution.
但是,利用齐纳二极管的反向击穿特性,要求较好的控制反向击穿电压。如果加载的电压过低,则无法达到击穿电压的大小,从而无法发生反向击穿,也就无法产生噪声;如果加载的电压过大,则可能会烧坏元器件。不仅如此,温度对反向击穿电压也有影响。当温度升高时,反向击穿电压会上升,而且这种影响并非严格线性的。这就更加加大了为齐纳二极管提供恰当的击穿电压的难度。However, utilizing the reverse breakdown characteristic of the Zener diode requires better control of the reverse breakdown voltage. If the applied voltage is too low, the breakdown voltage cannot be reached, so that reverse breakdown cannot occur, and noise cannot be generated; if the applied voltage is too high, components may be burned out. Not only that, temperature also has an effect on the reverse breakdown voltage. As the temperature increases, the reverse breakdown voltage increases, and this effect is not strictly linear. This makes it even more difficult to provide the correct breakdown voltage for the Zener diode.
另外,模拟电路产生随机噪声的方法还存在以下几个问题:In addition, the method of generating random noise in analog circuits also has the following problems:
(1)模拟电路的理论设计和实际差距较大,实际需要花费大量的时间进行调试,包括各分立元件的匹配工作等,会大大增加项目开发时间。(1) There is a large gap between the theoretical design and the actual design of analog circuits, and it takes a lot of time to debug, including the matching of discrete components, which will greatly increase the project development time.
(2)模拟电路的抗干扰能力较差,当外界干扰较大时,往往会导致性能的降低。(2) The anti-interference ability of the analog circuit is poor, and when the external interference is large, it will often lead to a decrease in performance.
(3)模拟电路设计生产定型后,由于其器件型号和位置都已经固定,难以根据需要对参数进行调整。(3) After the design and production of the analog circuit is finalized, it is difficult to adjust the parameters according to the needs because the device type and position have been fixed.
现有技术为克服模拟电路的上述问题,经常采用的是利用微处理器执行程序产生伪随机数序列,再将伪随机数序列进行数模转换产生随机噪声。其中,伪随机数序列是指:如果一个序列,一方面它是可以预先确定的,并且是可以重复生产和复现的;另一方面它又具有某种随机序列的随机特性(即统计特性),我们便称这种序列为伪随机序列。In order to overcome the above-mentioned problems of analog circuits in the prior art, a microprocessor is often used to execute a program to generate a pseudo-random number sequence, and then perform digital-to-analog conversion on the pseudo-random number sequence to generate random noise. Among them, the pseudo-random number sequence refers to: if a sequence, on the one hand, it can be determined in advance, and can be repeatedly produced and reproduced; on the other hand, it has the random characteristics of a random sequence (that is, statistical characteristics) , we call this sequence a pseudo-random sequence.
但是,该方法的缺点是,产生伪随机数序列消耗微处理器的处理时间,且所用的随机序列不宜过长,这使得随机序列的周期受此限制而非常有限,无法逼近真正意义上的随机序列。However, the disadvantage of this method is that the processing time of the microprocessor is consumed to generate a pseudo-random number sequence, and the random sequence used should not be too long, which makes the period of the random sequence very limited due to this limitation, and cannot approach the real random number sequence. sequence.
为克服上述两种方法的缺点,现有技术提出了一种基于可编程逻辑器件来实现伪随机序列产生的方法。下面介绍一种利用FPGA产生伪随机数序列的方法。首先,通过编程在FPGA内部构成一个n位线性反馈移位寄存器,编程可以使用VHDL语言、Verilog语言等。请参照图3,该线性反馈以为寄存器1包括n个依序串联的寄存单元a0~an-1,n-1个开关C1~Cn-1,n-1个异或门D1~Dn-1。寄存单元a0的输出端连接到寄存单元a1的输入端,寄存单元a1的输出端连接到寄存单元a2的输入端,以此类推至寄存单元an-2的输出端连接到寄存单元an-1的输入端。寄存单元an-1连接到异或门Dn-1的一个输入端,异或门Dn-1的输出端连接到异或门Dn-2的一个输入端,以此类至异或门D1的输出端连接至寄存单元a0的输入端。寄存单元an-2的输出端经过开关Cn-1连接到异或门Dn-1的另一个输入端,寄存单元an-2的输出端经过开关Cn-1连接到异或门Dn-1的另一个输入端,以此类推至寄存单元a0的输出端经过开关C1连接到异或门D1的另一个输入端。In order to overcome the shortcomings of the above two methods, the prior art proposes a method for realizing pseudo-random sequence generation based on programmable logic devices. The following introduces a method of using FPGA to generate pseudo-random number sequences. First, an n-bit linear feedback shift register is formed inside the FPGA through programming, and programming can use VHDL language, Verilog language, etc. Please refer to FIG. 3 , the linear feedback thinks that register 1 includes n serially connected register units a 0 to a n-1 , n-1 switches C 1 to C n-1 , and n-1 exclusive OR gates D 1 ~ Dn-1 . The output end of the register unit a 0 is connected to the input end of the register unit a 1 , the output end of the register unit a 1 is connected to the input end of the register unit a 2 , and so on until the output end of the register unit a n-2 is connected to the register Input to cell a n-1 . The register unit a n-1 is connected to an input end of the exclusive OR gate D n -1 , and the output end of the exclusive OR gate D n-1 is connected to an input end of the exclusive OR gate D n-2 , and so on to the exclusive OR The output terminal of gate D1 is connected to the input terminal of register unit a0 . The output terminal of the register unit a n-2 is connected to the other input terminal of the exclusive OR gate D n-1 through the switch C n -1, and the output terminal of the register unit a n-2 is connected to the exclusive OR gate through the switch C n-1 The other input terminal of Dn-1 , and so on, the output terminal of the register unit a0 is connected to the other input terminal of the XOR gate D1 through the switch C1 .
对于开关C1~Cn-1,连通则用值为1来表示,断开则用值为0来表示。另外,增加C0=1用来表示异或门D1的输出端连接至寄存单元a0的输入端,增加Cn=1用来表示寄存单元an-1连接到异或门Dn-1的一个输入端。这样,上述C0~Cn的值则反映了线性反馈以为寄存器1的反馈连接状态。用多项式f(x)来描述线性反馈移位寄存器的反馈连接状态:For the switches C 1 -C n-1 , a value of 1 is used to indicate that they are connected, and a value of 0 is used to indicate that they are disconnected. In addition, adding C 0 =1 is used to indicate that the output terminal of the exclusive OR gate D 1 is connected to the input terminal of the register unit a 0 , and adding C n=1 is used to indicate that the register unit a n-1 is connected to the exclusive OR gate D n- 1 input. In this way, the values of C 0 -C n above reflect the feedback connection status of the linear feedback register 1 . The feedback connection state of the linear feedback shift register is described by the polynomial f(x):
若该n次多项式f(x)满足下列条件:If the polynomial f(x) of degree n satisfies the following conditions:
(1)f(x)为既约多项式(即不能分解因式的多项式);(1) f(x) is a reduced polynomial (that is, a polynomial that cannot be factored);
(2)f(x)可整除(xp+1),p=2n-1;(2) f(x) is divisible by (xp+1), p=2n-1;
(3)f(x)除不尽(xq+1),q<p。(3) f(x) is indivisible (xq+1), q<p.
则称f(x)为本原多项式。Then f(x) is called a primitive polynomial.
理论已经证明,当使用本原多项式的系数C0~Cn来作为线性反馈移位寄存器1的反馈连接状态时,线性反馈移位寄存器1可以得到m序列。Theory has proved that when the coefficients C 0 -C n of the primitive polynomial are used as the feedback connection state of the linear feedback shift register 1 , the linear feedback shift register 1 can obtain m sequences.
m序列就是一种常用的伪随机序列,该序列又被称作最长线性反馈移存序列。m序列是由线性反馈移位寄存器产生的周期最长的一种序列。如果选用n级线性反馈移位寄存器,则m序列的周期为(2n-1)个时钟周期。也就是说,最多进行(2n-1)次移位后,输出序列开始重复,即n级线性反馈移位寄存器1产生的序列的最大周期为(2n-1)。在一个周期内,各寄存单元中的值不具备任何周期性,因此,在一个周期内,可以认为n级移位寄存器的输出为随机数。The m-sequence is a commonly used pseudo-random sequence, which is also called the longest linear feedback shift sequence. The m-sequence is a sequence with the longest period generated by a linear feedback shift register. If an n-level linear feedback shift register is selected, the cycle of the m sequence is (2 n -1) clock cycles. That is to say, the output sequence begins to repeat after performing (2 n −1) shifts at most, that is, the maximum period of the sequence generated by the n-stage linear feedback shift register 1 is (2 n −1). In one cycle, the values in each register unit do not have any periodicity, therefore, in one cycle, the output of the n-stage shift register can be regarded as a random number.
通常,可以将最后一级的寄存单元an-1的值作为输出。请参照图4,也可以任取其中i个寄存单元的值合并成一个i位的数输出。Usually, the value of the register unit a n-1 of the last stage can be used as an output. Please refer to FIG. 4 , it is also possible to combine the values of i register units arbitrarily into an i-bit number output.
例如,请参照图5,使用的本原多项式f(x)=x120+x113+x9+x2+1作为反馈连接状态配置线性反馈移位寄存器1,则需要另n=120,将开关C2、C9、C113导通而其他开关断开,即取出寄存单元a1、a8、a112、a119中的值反馈进行异或操作,并将操作结果作为寄存单元a0的输入即可。For example, referring to Fig. 5, the original polynomial f(x)=x 120 +x 113 +x 9 +x 2 +1 used as the feedback connection state to configure the linear feedback shift register 1 requires another n=120, and The switches C 2 , C 9 , and C 113 are turned on while the other switches are turned off, that is, the values in the register units a 1 , a 8 , a 112 , and a 119 are fed back for XOR operation, and the operation result is used as the register unit a 0 input.
再例如,请参照图6,使用的本原多项式f(x)=x25+x3+1作为反馈连接状态配置线性反馈移位寄存器1,则需要另n=25,将开关C3导通而其他开关断开,即取出寄存单元a0、a2、a24中的值反馈进行异或操作,并将操作结果作为寄存单元a0的输入即可。For another example, please refer to Fig. 6, use the primitive polynomial f(x)=x 25 +x 3 +1 as the feedback connection state to configure the linear feedback shift register 1, then another n=25 is required to turn on the switch C 3 When the other switches are turned off, the values in the register units a 0 , a 2 , and a 24 are fed back for XOR operation, and the operation result is used as the input of the register unit a 0 .
当线性反馈移位寄存器1各个寄存单元的初始值为全0时,线性反馈网络就失去了作用,输出序列一直为0,因此移位寄存器的初始值不能为0,需要赋予线性反馈移位寄存器1一个非零初始值。一般而言,可以为线性反馈移位寄存器1配置一个固定的非零初始值来解决上述问题。When the initial value of each register unit of the linear feedback shift register 1 is all 0, the linear feedback network loses its function, and the output sequence is always 0, so the initial value of the shift register cannot be 0, and the linear feedback shift register needs to be assigned 1 A non-zero initial value. Generally speaking, a fixed non-zero initial value can be configured for the linear feedback shift register 1 to solve the above problems.
但是,线性反馈移位寄存器1为固定的非零初始值的条件下,线性反馈移位寄存器1每次上电开始移位时都是从该固定的非零初始值开始的,又由于伪随机数序列的特点是周期性的,因此,线性反馈移位寄存器1每次上电后输出的伪随机数序列是相同的,这难以满足使用者对噪声信号随机性的要求。However, under the condition that the linear feedback shift register 1 is a fixed non-zero initial value, the linear feedback shift register 1 starts from the fixed non-zero initial value every time it is powered on, and due to the pseudo-random The characteristic of the number sequence is periodic, therefore, the pseudo-random number sequence output by the linear feedback shift register 1 is the same every time it is powered on, which is difficult to meet the user's requirement for the randomness of the noise signal.
发明内容 Contents of the invention
为了解决现有技术产生噪声的随机性较低的问题,本发明提供一种产生噪声随机性较高的信号发生器。In order to solve the problem of low randomness of noise generated in the prior art, the present invention provides a signal generator that generates noise with high randomness.
同时,本发明还提供一种产生噪声随机性较高的输出噪声信号的方法。At the same time, the invention also provides a method for generating an output noise signal with high noise randomness.
一种具有输出噪声信号功能的信号发生器,所述信号发生器包括一个控制单元、一个输入单元、一个非易失性存储器、一个波形处理单元和一个数模转换单元,所述输入单元、所述非易失性存储器和所述波形处理单元分别与所述控制单元相连接,所述数模转换单元与所述波形处理单元相连接,所述非易失性存储器存储有特征参数,所述特征参数包括开机次数,所述控制单元用于产生一个与所述开机次数相关联的初始值,所述波形处理单元用于利用所述初始值来产生伪随机数序列,所述数模转换单元用于将所述伪随机数序列进行数模转换。A signal generator with the function of outputting noise signals, the signal generator includes a control unit, an input unit, a non-volatile memory, a waveform processing unit and a digital-to-analog conversion unit, the input unit, the The non-volatile memory and the waveform processing unit are respectively connected to the control unit, the digital-to-analog conversion unit is connected to the waveform processing unit, the non-volatile memory stores characteristic parameters, and the The characteristic parameters include the number of power-on times, the control unit is used to generate an initial value associated with the number of power-on times, the waveform processing unit is used to use the initial value to generate a pseudo-random number sequence, and the digital-to-analog conversion unit It is used to perform digital-to-analog conversion on the pseudo-random number sequence.
一种用于如上述的信号发生器的输出噪声信号的方法,包括如下步骤:产生与所述信号发生器的特征参数中的开机次数相关联的一个初始值;利用所述初始值来产生伪随机数序列;将所述伪随机数序列进行数模转换。A method for outputting a noise signal of a signal generator as described above, comprising the steps of: generating an initial value associated with the number of power-on times in the characteristic parameters of the signal generator; using the initial value to generate a pseudo A random number sequence; performing digital-to-analog conversion on the pseudo-random number sequence.
本发明信号发生器和输出噪声信号的方法的优点在于:由于信号发生器产生一个与开机次数相关联的初始值,而开机次数在每次开机上电后会发生改变,因此可以保证信号发生器每次开机后所获得的初始值与上一次开机后所获得的初始值不同,这样就改善了用户在多次使用信号发生器时产生噪声相同的问题,使得产生噪声的随机性较高。The advantages of the signal generator and the method for outputting noise signals of the present invention are: since the signal generator generates an initial value associated with the number of power-on times, and the number of power-on times will change after each power-on, it can ensure that the signal generator The initial value obtained after each power-on is different from the initial value obtained after the last power-on, which solves the problem that the user generates the same noise when using the signal generator multiple times, making the noise more random.
附图说明 Description of drawings
图1是现有技术信号发生器的模块结构示意图。FIG. 1 is a schematic diagram of a module structure of a prior art signal generator.
图2是为正态白噪声源[1]、[2]的电路图。Fig. 2 is the circuit diagram of normal white noise source [1], [2].
图3是线性反馈以为寄存器的模块结构示意图。Fig. 3 is a schematic diagram of the module structure of the linear feedback register.
图4是线性反馈以为寄存器的另一种输出方式的示意图。FIG. 4 is a schematic diagram of another output mode of the linear feedback register.
图5是线性反馈以为寄存器一种反馈连接状态配置的示意图。FIG. 5 is a schematic diagram of a linear feedback configured for a feedback connection state of a register.
图6是线性反馈以为寄存器另一种反馈连接状态配置的示意图。Fig. 6 is a schematic diagram of another feedback connection state configuration of the linear feedback to the register.
图7是本发明第一实施方式的信号发生器2的模块结构示意图。Fig. 7 is a schematic diagram of the module structure of the signal generator 2 according to the first embodiment of the present invention.
图8是信号发生器2的120位的线性反馈移位寄存器251的模块结构示意图。FIG. 8 is a block diagram of the 120-bit linear feedback shift register 251 of the signal generator 2 .
图9是信号发生器2工作的步骤流程图。FIG. 9 is a flow chart of the working steps of the signal generator 2 .
图10是本发明第二实施方式信号发生器工作原理示意图。Fig. 10 is a schematic diagram of the working principle of the signal generator according to the second embodiment of the present invention.
具体实施方式 detailed description
下面介绍本发明信号发生器的第一实施方式。The first embodiment of the signal generator of the present invention will be described below.
请参照图7,该信号发生器2包括一个控制单元21、一个非易失性存储器22、一个接口单元23、一个输入单元24、一个波形处理单元25和一个数模转换单元26。非易失性存储器22、接口单元23、输入单元24、波形处理单元25分别连接到控制单元21,数模转换单元26连接到波形处理单元25。Referring to FIG. 7 , the signal generator 2 includes a control unit 21 , a non-volatile memory 22 , an interface unit 23 , an input unit 24 , a waveform processing unit 25 and a digital-to-analog conversion unit 26 . The non-volatile memory 22 , the interface unit 23 , the input unit 24 , and the waveform processing unit 25 are respectively connected to the control unit 21 , and the digital-to-analog conversion unit 26 is connected to the waveform processing unit 25 .
控制单元21负责接收并解析输入单元24输入的指令信息、负责控制接口单元23进行数据发送和接受工作、控制对非易失性存储器22中保存的数据进行读取和存储工作、以及负责根据该指令信息对波形处理单元25和数模转换单元26进行配置等工作。波形处理单元25负责产生一个对应输出波形的数字序列,数模转换单元26负责将所述数字序列进行数模转换,进而输出模拟形式的波形。The control unit 21 is responsible for receiving and analyzing the instruction information input by the input unit 24, responsible for controlling the interface unit 23 to carry out data sending and receiving work, controlling the data stored in the non-volatile memory 22 to be read and stored, and responsible for according to the The instruction information configures the waveform processing unit 25 and the digital-to-analog conversion unit 26 . The waveform processing unit 25 is responsible for generating a digital sequence corresponding to the output waveform, and the digital-to-analog conversion unit 26 is responsible for performing digital-to-analog conversion on the digital sequence, and then outputting a waveform in an analog form.
在本实施方式当中,控制单元21由DSP构成,非易失性存储器22闪存(FLASH)构成,接口单元23包括LAN、GPIB、USB,输入单元24由键盘构成,波形处理单元25由FPGA构成,数模转换单元26由DAC构成。Among the present embodiment, control unit 21 is made of DSP, and nonvolatile memory 22 flash memory (FLASH) is made of, and interface unit 23 comprises LAN, GPIB, USB, and input unit 24 is made of keyboard, and waveform processing unit 25 is made of FPGA, The digital-to-analog conversion unit 26 is constituted by a DAC.
请一起参照图7和图8,波形处理单元25通过编程配置有一个120位的线性反馈移位寄存器251,线性反馈移位寄存器251以本原多项式f(x)=x120+x113+x9+x2+1的系数来配置。并且取出线性反馈移位寄存器251的低14位作为数字序列输出至数模转换单元26用于数模转换。Please refer to FIG. 7 and FIG. 8 together. The waveform processing unit 25 is configured with a 120 -bit linear feedback shift register 251 through programming. 9 +x 2 +1 coefficient to configure. And the lower 14 bits of the linear feedback shift register 251 are taken out as a digital sequence and output to the digital-to-analog conversion unit 26 for digital-to-analog conversion.
请再参照图7,非易失性存储器22中存储有特征参数221,该特征参数221包括开机次数222和产品序列号223。开机次数222为信号发生器2开机上电的次数,开机次数222每关机掉电再开机上电一次后,开机次数222的值便加1。产品序列号223为该信号发生器2一个固定数字,任何两台该信号发生器2产品的产品序列号223均不相同。Referring to FIG. 7 again, the non-volatile memory 22 stores characteristic parameters 221 , and the characteristic parameters 221 include boot times 222 and product serial numbers 223 . The number of power-on times 222 is the number of power-on times of the signal generator 2, and the value of the number of power-on times 222 will be increased by 1 every time the power-on time 222 is turned off and powered on again. The product serial number 223 is a fixed number of the signal generator 2 , and the product serial numbers 223 of any two products of the signal generator 2 are different.
当信号发生器2开机上电以后,如果信号发生器2通过输入单元24被设置成开机默认输出噪声状态,或者,如果用户通过输入单元24输入一个输出噪声命令后,信号发生器2按照如下流程工作,请一并参照图7至图9:After the signal generator 2 is turned on and powered on, if the signal generator 2 is set to the default output noise state through the input unit 24, or if the user inputs an output noise command through the input unit 24, the signal generator 2 follows the following process work, please refer to Figure 7 to Figure 9:
步骤S1:控制单元21产生一个与开机次数222和产品序列号223相关联的初始值;Step S1: the control unit 21 generates an initial value associated with the boot times 222 and the product serial number 223;
控制单元21从非易失性存储器22中读取开机次数222和产品序列号223,产生一个与线性反馈移位寄存器251位数相同的初始值。在本实施例中,开机次数222为一个32bit数,例如当前开机20次用十六进制数可以表示为00000014。产品序列号223为一个72bit数,例如为000901040000020208。将00000014加在000901040000020208的后面可以得到104位数,再将00000014前面16位补0,即可以得到120位初始值000000090104000002020800000014。The control unit 21 reads the boot times 222 and the product serial number 223 from the non-volatile memory 22 to generate an initial value identical to the 251 digits of the linear feedback shift register. In this embodiment, the number of booting times 222 is a 32-bit number, for example, the current 20 booting times can be expressed as 00000014 in hexadecimal notation. The product serial number 223 is a 72-bit number, for example, 000901040000020208. Add 00000014 to the end of 000901040000020208 to get 104 digits, and then add 0 to the first 16 digits of 00000014 to get the initial value of 120 digits 000000090104000002020800000014.
作为变形,还可以将00000014的高位补1,即可以得到120位初始值111100090104000002020800000014。As a modification, the high bit of 00000014 can also be supplemented by 1, that is, the 120-bit initial value 111100090104000002020800000014 can be obtained.
步骤S2:波形处理单元251利用所述初始值来产生伪随机数序列;Step S2: the waveform processing unit 251 uses the initial value to generate a pseudo-random number sequence;
控制单元21将该初始值发送给波形处理单元25,波形处理单元25将该初始值加载到线性反馈移位寄存器251,并使线性反馈移位寄存器251开始移位,不断产生伪随机数序列。在本实施例当中,0x000000000000000000000000000014被加载到线性反馈移位寄存器251的120位上,虽然可以推知,上一次开机所获得的初始值为0x000000000000000000000000000013,虽然两个初始值仅仅差1,但是由于相邻数在伪随机数序列中的位置一般不连续,所以就实现了从伪随机数序列中不同位置开始移位的目的。The control unit 21 sends the initial value to the waveform processing unit 25, and the waveform processing unit 25 loads the initial value into the linear feedback shift register 251, and makes the linear feedback shift register 251 start shifting to continuously generate pseudo-random number sequences. In this embodiment, 0x000000000000000000000000000014 is loaded to 120 bits of the linear feedback shift register 251. Although it can be deduced that the initial value obtained at the last power-on is 0x000000000000000000000000000013, although the difference between the two initial values is only 1, due to the adjacent number The positions in the pseudo-random number sequence are generally discontinuous, so the purpose of shifting from different positions in the pseudo-random number sequence is achieved.
步骤S3:数模转换单元26将该伪随机数序列进行数模转换。Step S3: The digital-to-analog conversion unit 26 performs digital-to-analog conversion on the pseudo-random number sequence.
在本实施例中,取出线性反馈移位寄存器251每次移位后寄存器中低14位数,数模转换单元26将每次取出的低14位数进行数模转换,得到连续的模拟噪声信号。In this embodiment, the lower 14 digits in the register after each shift of the linear feedback shift register 251 are taken out, and the digital-to-analog conversion unit 26 performs digital-to-analog conversion on the lower 14 digits taken out each time to obtain a continuous analog noise signal .
作为变形,根据实际需要,还可以取出线性反馈移位寄存器251每次移位后寄存器的全部120位数,也可以取出线性反馈移位寄存器251的任意寄存器的数来进行数模转换。As a modification, according to actual needs, all 120 digits of the register after each shift of the linear feedback shift register 251 can also be taken out, and the number of any register of the linear feedback shift register 251 can also be taken out for digital-to-analog conversion.
本实施方式信号发生器的优点在于:由于信号发生器2的控制单元21产生一个与开机次数222和产品序列号223相关联的初始值,而开机次数222在每次开机上电后会发生改变,每台信号发生器2的产品序列号223又各不相同,因此可以保证两点:一、一台信号发生器2每次开机后所获得的初始值与上一次开机后所获得的初始值不同;二、任意两台信号发生器2在同样的开机次数下所获得的初始值也不相同。这样就改善了用户在单独多次使用一台信号发生器2、或者同时使用多台信号发生器2产生噪声相同的问题。The advantage of the signal generator in this embodiment is that: since the control unit 21 of the signal generator 2 generates an initial value associated with the number of times of power-on 222 and the product serial number 223, the number of times of power-on 222 will change after each power-on , the product serial number 223 of each signal generator 2 is different, so two points can be guaranteed: 1. The initial value obtained after each power-on of a signal generator 2 is the same as the initial value obtained after the last power-on Different; 2. The initial values obtained by any two signal generators 2 under the same number of power-on times are also different. In this way, the problem that the user generates the same noise when using one signal generator 2 alone or using multiple signal generators 2 at the same time is improved.
作为变形实施方式,信号发生器2可以在开机上电后便开始执行步骤S1和S2使线性反馈移位寄存器开始移位。当用户通过输入单元24输入一个输出噪声命令后,信号发生器2执行步骤S3开始输出噪声。As a variant implementation, the signal generator 2 may start to execute steps S1 and S2 after being powered on to make the linear feedback shift register start shifting. After the user inputs a command to output noise through the input unit 24, the signal generator 2 executes step S3 to start outputting noise.
上述变形实施方式的优点在于:请参照图10,即便假设一台信号发生器2两次开机时、或者两台信号发生器2开机时所获得的初始值是相同的,即线性反馈移位寄存器是从m序列的同一个位置开始移位的,例如都是在图10中t0时刻开始从初始值D0开始移位,但是由于用户通过输入单元24输入输出噪声命令的时间点是随机的,当一台信号发生器2两次开机后不同时间t1、t2输入输出噪声命令、或者两台信号发生器2开机后不同时间t1、t2输入输出噪声命令,又由于m序列是周期性的,这使得t1、t2所对应的值D1、D2是不同的,因此进一步降低了输出噪声相同的可能。The advantage of the above variant implementation is: please refer to FIG. 10 , even if it is assumed that the initial values obtained when one signal generator 2 is turned on twice or when two signal generators 2 are turned on are the same, that is, the linear feedback shift register It starts to shift from the same position of the m sequence, for example, it starts to shift from the initial value D 0 at time t 0 in FIG. , when a signal generator 2 inputs and outputs noise commands at different times t 1 and t 2 after starting up twice, or two signal generators 2 input and output noise commands at different times t 1 and t 2 after starting up, and because the m sequence is Periodically, this makes the values D 1 , D 2 corresponding to t 1 , t 2 different, thus further reducing the possibility of the same output noise.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200910243141.5A CN102111129B (en) | 2009-12-28 | 2009-12-28 | There is the signal generator of output noise semiotic function and the method for output noise signal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200910243141.5A CN102111129B (en) | 2009-12-28 | 2009-12-28 | There is the signal generator of output noise semiotic function and the method for output noise signal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102111129A CN102111129A (en) | 2011-06-29 |
| CN102111129B true CN102111129B (en) | 2016-04-20 |
Family
ID=44175175
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN200910243141.5A Active CN102111129B (en) | 2009-12-28 | 2009-12-28 | There is the signal generator of output noise semiotic function and the method for output noise signal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102111129B (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103677743B (en) * | 2013-11-22 | 2016-08-24 | 航天恒星科技有限公司 | A FPGA-based PN sequence parallel generation method and device |
| CN105577177B (en) * | 2015-12-14 | 2018-06-15 | 北京无线电计量测试研究所 | A kind of controllable frequency source of part frequency deviation phase noise |
| CN107561328B (en) * | 2017-08-22 | 2019-06-14 | 北京交通大学 | A kind of signal data generation method and device for simulating hardware |
| CN112307695B (en) * | 2020-09-22 | 2024-03-08 | 北京九天翱翔科技有限公司 | FPGA-based universal digital circuit fault simulation injection system and method |
| CN115755098A (en) * | 2022-10-31 | 2023-03-07 | 南京国立电子科技有限公司 | Interference equipment and interference method for unmanned aerial vehicle satellite navigation system |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1189029A (en) * | 1996-12-27 | 1998-07-29 | 索尼公司 | PN code generating circuit and termianl unit |
| CN1725714A (en) * | 2004-07-20 | 2006-01-25 | 华为技术有限公司 | Pseudo-random number generator and test system using it |
| WO2007026287A1 (en) * | 2005-08-30 | 2007-03-08 | Koninklijke Philips Electronics N.V. | Method and device for generating random number generator seeds |
| US7571199B1 (en) * | 2000-11-15 | 2009-08-04 | Microsoft Corporation | Method and apparatus for generating random numbers |
| CN101610066A (en) * | 2009-07-20 | 2009-12-23 | 北京交通大学 | A White Noise Amplitude Compensation Method |
-
2009
- 2009-12-28 CN CN200910243141.5A patent/CN102111129B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1189029A (en) * | 1996-12-27 | 1998-07-29 | 索尼公司 | PN code generating circuit and termianl unit |
| US7571199B1 (en) * | 2000-11-15 | 2009-08-04 | Microsoft Corporation | Method and apparatus for generating random numbers |
| CN1725714A (en) * | 2004-07-20 | 2006-01-25 | 华为技术有限公司 | Pseudo-random number generator and test system using it |
| WO2007026287A1 (en) * | 2005-08-30 | 2007-03-08 | Koninklijke Philips Electronics N.V. | Method and device for generating random number generator seeds |
| CN101610066A (en) * | 2009-07-20 | 2009-12-23 | 北京交通大学 | A White Noise Amplitude Compensation Method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102111129A (en) | 2011-06-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102111129B (en) | There is the signal generator of output noise semiotic function and the method for output noise signal | |
| KR101176611B1 (en) | Self-calibrating digital pulse-width modulator dpwm | |
| CN202512559U (en) | Variable structure for random number generator | |
| CN101657731A (en) | Testing apparatus and testing method | |
| CN102468806B (en) | A kind of white noise signal generator | |
| KR100922846B1 (en) | Pwm signal generating circuit and power supply apparatus comprising such pwm signal generating circuit | |
| CN102970013B (en) | Resetting method and resetting control device of register inside chip based on scanning chain | |
| CN102736891A (en) | Design of parallel adjustable pseudorandom sequence generator | |
| US6457148B1 (en) | Apparatus for testing semiconductor device | |
| CN101567692B (en) | Method for matching parallel high-speed dynamic elements | |
| CN108736892A (en) | Random time intertexture digital analog converter | |
| CN103812447B (en) | White Gaussian noise method for generation and device | |
| CN107819456B (en) | High-precision delay generator based on FPGA carry chain | |
| CN103927147A (en) | Delay device and method for random number generator and random number generator thereof | |
| WO2004023286A3 (en) | Feedback random number generation method and system | |
| CN102109875B (en) | Signal generator with pulse signal generation function, and method for generating pulse signal | |
| JP5670849B2 (en) | Pseudorandom number generation device and pseudorandom number generation method | |
| CN103427795B (en) | A kind of rectangular pulse signal generating circuit and production method | |
| CN103034473B (en) | A kind of Pseudo-random number generator | |
| Morales et al. | Design and evaluation of an all-digital programmable delay line in 130-nm CMOS | |
| JP4951378B2 (en) | Waveform generator and test equipment | |
| US6011500A (en) | Integrated circuit with a built-in D/A converter | |
| CN107911208B (en) | Chaotic sequence generation method and generator | |
| CN120276707B (en) | Flexible optimized random number generation method based on FPGA lookup table | |
| JP4666462B2 (en) | Counter circuit and semiconductor device including the same |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant |