DDS信号发生器外文资料翻译_第1页
DDS信号发生器外文资料翻译_第2页
DDS信号发生器外文资料翻译_第3页
DDS信号发生器外文资料翻译_第4页
DDS信号发生器外文资料翻译_第5页
已阅读5页,还剩12页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Design of Digital Controlled Signal Generator Based on DDS and MCUYinjun Chena, Zehuai YuanFaculty of Electronic Information and Mechanical Electrical Engineering, Zhaoqing University, Zhaoqing 526061, ChinaKeywords: DDS; MCU; Signal generator; Phase Accumulator; DACAbstract. Its advantage to use DD

2、S chip is output signal frequency bigger, and precision higher, But users cant change the output signal waveforms. The MCU can produce the required arbitrarywaveforms, but its program execution of the order limit the we use their Synergy to design the digital controlled signal generator. The System

3、has the advantage of output good quality waveform, frequency of precision and stability ,and high frequency, empty, amplitude and phase is to step into the need.IntroductionThe digitally synthesized sine waveform (Direct Digital Synthesis, DDS) is a well-known method and has been applied to many emb

4、edded applications 1. This technique can be used to create a positive digital sine waveform. Compared to other frequency composing method, Direct Digital Frequency Synthesis(DDS) has been the most popular trend in modern frequency synthetic technique for its excellent characteristics. The signal sou

5、rce that the DDS technology realizes can carry out accurate controlling on DDS frequency , extent , phase exporting wave forms etc. by numerical control circuit, the system making use of this method has many merits such as stability, reliably and accuracy. The commercial DDS chip can only export a s

6、ine wave for the data in the ROM form already has been solidified. If needing to come into being any wave form, it may come true by the way that FPGA adopts DDS IP core or hardware describe language etc, however,the cost of This way cost is high; on the other hand, any wave form can be achieved by m

7、aking use of micro controller unit (MCU) to carry out figure frequency combining and DA converting. The experiment and applying testing have shown that the numerical control signal source composed of STM32 micro controller and DDS chip can work well.DDS and wave form programming patternThe core of D

8、DS system is phase accumulator carriage, and it is composed of a ADR and one unit phase register. When any clock comes, the phase register increases by with the step length, phase register output and phase control word add together, and then the output is imported to sine inquiry form address. The s

9、ine inquiring form includes the numeral extent information of one-period sine wave, eachaddress corresponds to the phase dot of 0360 degrees of the sine wave. The mapping digital signal drives DAC and outputs analog value. The output sine circle and frequency are The phase register will return to th

10、e original state when the 2N/M fc clock is finished. Accordingly, the DDS system output a sine wave when the sine inquiring form finish a circle. The output sine circle and frequency is TO -output sine wave circle, unit: s; TC -external referenced clock circle, unit: s; M -accumulated step length of

11、 phase register, constant; f out -output sine wave frequency, unit: Hz; f c -external referenced clock frequency, unit: Hz; N -phase accumulator digit, constant.The relationship among the frequency control word, and the output signal frequency and thereferenced clock frequency are: Frequency control

12、 word is directly proportional to the output signal frequency. In order to describe clearly, the sine wave form is as one vector turns around phase circle, the phase circle matches along with a cycle sine wave. Every sampling pots in wave form corresponds to a phase dot of the phase circle. To synth

13、esis the required frequency signal, it needs to accomplish the following steps1. Controlling every sampling increment of phase and accumulating them (frequency control word K), output 2 pi cumulated phase (using phase accumulator).2. Converting 2 pi accumulating phase into the corresponding sine amp

14、litude, use ROM to store the corresponding phase-extent form of sine function in general.3. Use DAC to change extent code into the signal simulating voltage.4. The voltage signal that DAC exports is ladder wave form , the required simulation voltage out is achieved after LPF smoothing.Numerical cont

15、rol DDS signal source system designs analysisSystem uses the STM32 as control core and the AD9850 as generator. STM32 is 32-bit ARM-based micro controller with 128 K byte flash memory. The two signal output of STM32 can be achieved by controlling AD9850 and DAC0832 output simultaneously. The system

16、designs block diagram is shown in Fig. 1. One signal output can generate 30 MHz sine wave and rectangular wave by controlling AD9850, the other output generate any wave form with its frequency less than 10 KHz by numerical frequency mixture of DAC0832.Fig. 1 System designs block diagramHardware desi

17、gn AD9850 module AD9850 contains the DDS system and high-speed comparator. The AD9850 can realize the entire numerical frequency combining. The core of the programmable DDS is the phase accumulator, it is composed of a ADR and a N bit phase register, N is for 24 32. After connecting to the accurate

18、clock source and writing the frequency phase control word,AD9850 can generate the frequency-programmable and phase-programmable output of analog sine wave, which can be used as the direct frequency signal source or be transferred into rectangular wave through high-speed comparator. With the 125 MHz

19、clock, 32-bit frequency control word can carry out the output frequencyresolution ratio of AD9850 with 0.0291 Hz4. DAC0832 module The circuit exports the phase data sheet to DAC0832 from STM32 and gets corresponding wave form by DA converting. The step-by-step adjusting phase amounts can create arbi

20、trary frequency, the PWM signal from the STM32 transfers into the corresponding voltage by low-pass filter, therefore, the referenced voltage of DAC0832 is controlled, furthermore, the output wave form extent is tuned Fig. 2 DAC circuitPWM converting DA circuit The low-pass filtered PWM signal from

21、STM32 is then stable using the voltage follower, which will yield a stable output voltage; the voltage can be adjusted by tuning the PWM dutyfactor. The system output three PWM signals, which controls AD9850 output extent, dutyfactor and the output extent of DAC0832, respectively,. Fig. 3 shows the

22、PWM controls DA transferring circuit.Fig. 3 PWM controlled DA converting circuitFig. 4 Export amplification and the wave filtering circuit. (a) amplification circuit; (b) filteringcircuitAmplification and wave filtering circuitThe amplification circuit will export amplified wave form and modify the

23、factor of amplification. An excellent smooth output waveform can be achieved by using the low-pass active power filtering. The amplification circuit and the filtering circuit is showed in Fig. 4. Software design And the system software mainly include AD9850 driving module, DAC0832 driving module, th

24、e step-by-step automation module, PWM-converting-DA module and uC/GUI figure supportingsystem implanted in procedure. The operation interface is full of humanization for the multi-window pattern is adopted. The design process of the system software is shown in Fig. 5. Implanted uC/GUI The numerical

25、control signal source has used the uC/GUI software sufficiently to establish many windows and control buttons. By means of invoking the corresponding windows and control with the feedback information, the peripheral equipment operated under the control of the system. The external equipment is mainly

26、 separated into two drivers, the drive being an AD9850 module and DAC0832 module drive, respectively. The two modules can be controlled by means of the outside interruption and timing interruption. AD9850 Drive AD9850 has 40 control words, among them, 32-bit is used for frequency control, 5-bit is u

27、sed for the phase control, 1-bit is used for the power source dormancy control, 2-bit is used to choose operation pattern.Fig. 5 Systematic procedure flow chartThis 40 control words may arrive at AD9850 by concurrence way or serial way, in the concurrence way, 8 data highway generals can transfer th

28、e data to a register. After repeating 5 times, the 40-bit data is loaded into the frequency / phase data register (for refreshing DDS output frequency and phase) at the FQ-UD rising edge, meanwhile, the address pointer is reset to the first input registerThen the 8-bit data is loaded at the W-CLK ri

29、sing edge, and the pointer is set to the next input register. After repeating 5 times of W-CLK rising edge, the W-CLK rising edge will work no longer until the reset signal comes or the address pointer is reset to the first input register by the FQ-UD rising edge. The procedure operate AD9850 module

30、 through the bottom function, as void ad9850( double frequency, /frequency unsigned char phase, /phase unsigned char mode, /pattern unsigned char power /source ) The DAC0832 driven module In the design of the numerical control signal source, DAC0832 is defined as single bufferedpattern, when the 8 b

31、it Parallel data D0D7 is input, the DA will transfer data in the CS. The bottom function of void DA0832(u8 value)can invoke Out_To_DDS0832(doubleFrequency,u8 type) function and control the defined wave form and frequency. This function is based on figure frequency composes principle, it transfers th

32、e input frequency into corresponding control word, and then combing phase step-by-step expect, output wave form data sheet in memory. The extent and dutyfactor can be tuned through invoking Adjust_Vpp() and Adjust Duty() Step-by-step automation procedure A step-by-step automation procedure brick is

33、added to the design to define the frequency range, step-by-step rate , step-by-step amounts , ascending or lapse, cycling pattern. The step-by-step automation function can be realized through invoking Auto Step(AutoStepStr*AS) and passing memory structure type to a function.Test the experiment and d

34、ata analysisThe DDS numerical control signal source can import the various changeable control words by a touching screen, and then accurately control the signal frequency, dutyfactor, extent and phase. Figure 6 shows the corresponding experimental wave forms.Fig. 6 The oscillograph exports experimen

35、t picture (a) 1 KHz wave form output; (b) 1 MHz wave form output; (c) 20 MHz wave form output.With the oscillograph testing, it shows that the circuit work stably and rightly. The various parametric index exhibit fine numerical control effect. a. Output frequency range: 1Hz30MHz,peak-to-peak value:

36、50mV10V;dutyfactor: 10%100%, difference1%。 b. Export the sine wave, sawtooth wave rectangular wave, triangle wave and arbitrarily wave form. c. Continuous Step-by-step adjustment of frequency, dutyfactor, extent and phase.d. The operation of the touching screen includes suppositional keyboard, slidi

37、ng strip and various suppositional control carry out entering operation, and the every parameters can be demonstrated visually.e. Step-by-step automation, definition of: maximum value , minimum value , step-by-step rate , step-by-step amounts , ascending or lapse, cycling or not.Numerical control re

38、form advantage of signal sourceThe designed numerical control signal source is applied to the lathe reform experiment. The main targets of the numerical control system are the coordinate axis displacement (including displacement speed , direction , location etc.) , the control message originates fro

39、m numerical control treating or moving control procedure mainly. Therefore, systematic the most fundamental composition of the numerical control system should include three parts: The input/output procedure device, numerical control equipment and the servo drives.ConclusionsMaking compound use of DD

40、S and MCU controller, the system can exported the numerical control signal source as the consumer need, it has the merits such as good exporting wave form, frequency accuracy, reliable stability and high dutyfactor. Each parameter and be easily adjusted by touching a screen, the experiments show tha

41、t the various parametric indexes have fine numerical control effect.AcknowledgementsThis work was financially supported by the National Natural Science Foundation of China (No:61006075) and Guided Projects on Integration of Production, Education and Research of Guangdong Province (No:2011B090400253)

42、.References1 Lygouras J. N., Tarchanidis K. N., Tsalides Ph. G., “Suspended Sediment and Dye Concentration Measurements Using a Digital Techniques”, Int. J. Electronics, 87, No.1, pp 107, (2000).2 Webster J. G. Ed., “Tactile Sensors for Robotics and Medicine”, Wiley, New York, (1988).3 Dally J. W.,

43、Rilley W. F., Mcconnel K.G., “Instrumentation for Engineering Measurements”, Wiley, New York, (1993).4 Tarchanidis K. N., Ioannidis I. N., Kakkalis I. K. And Lygouras J. N., “FLEXIMAT, an Integrated System Scanning the Bending of Any Matress.”, Int. Workshop on Virtual andIntelligent Measurement Sys

44、tems, VIMS 2000, Annapolis, MD, USA, 29-30 April 2000, pp 115,(2000).5 Koukourlis C. S., Voulgaris N. C., “A Digital Method for Sinewave Generation.” Archiv furElectrotechnik, 72, pp 327, (1989).6 Koukourlis Chr. S, Trigonidis V. K., Sahalos J. N., “Differential Synchronous Demodulation for Small Si

45、gnal Amplitude Estimation.”, IEEE Instrumentation and Measurement, 42, No. 5, pp 926, (1993).基于DDS和单片机数字控制信号发生器的设计关键词: DDS; MCU;信号发生器;相位累加器;DAC摘要: 它的优点,使用DDS芯片输出信号的频率更大,精度更高,但用户不能改变输出信号的波形。MCU可以产生所需的任意波形,但其程序执行的顺序限制速度。因此,我们利用它们之间的协同设计数字控制信号发生器。该系统的优点是输出质量好的精度和稳定性,波形,频率和高频率的,空的振幅和相位是步入需要。介绍数字合成的正弦波形(

46、直接数字频率合成器DDS)是一种公知的方法已被应用到许多嵌入式应用1。这种技术可以用来创建一个积极的数字正弦波形。其它频率合成方法相比, 直接数字频率合成器(DDS)一直以其优良的特性在现代频率合成技术中最流行的趋势。DDS技术实现信号源,可以进行精确控制DDS的频率,程度,相输出波形的数值控制电路等,系统利用这种方法有许多优点,如安定,可靠和准确度。商业DDS芯片只能导出一个正弦波因为ROM表中的数据形式已经被凝固。如果需要进入任何波形,它可能会真正的由FPGA采用DDS的IP核或硬件描述语言等方式来实现,然而, 这种方式成本费用高;另一方面,可以任意波形通过开展数字频率结合使用的微控制器单

47、元(MCU)和DA转换实现。实验和应用测试表明,数控信号源所组成的STM32微控制器和DDS芯片可以很好地工作。DDS和波形编程模式DDS系统的核心是相位累加器的框架,它是由一个ADR和一单位相位寄存器组成的。当任何时钟到来时,相位寄存器增加步长,相寄存器的输出与相位控制字相加,然后输出导入到正弦查询形成地址。正弦查询表格包含一个周期正弦波,每个数字幅度信息地址对应于0360度的正弦波的相位点。测绘数字信号驱动DAC并模拟输出值。输出正弦波周期和频率是:相位寄存器将返回到原来的状态时,2N/ M fc时钟完成。因此,DDS系统输出一个正弦波的正弦查询表时,完成一个周期。输出正弦波的周期和频率为

48、TO - 输出正弦波周期,单位:秒; TC - 外部参考时钟周期,单位:秒; M - 相位寄存器累计步长,恒定f输出 - 输出正弦波频率,单位:赫兹; fc - 外部参考时钟频率,单位为赫兹; N - 相位累加器的位数,不变。频率控制字和输出信号的频率与参考时钟频率之间的关系是:频率控制字与输出信号的频率成正比。为了描述清楚,正弦波的形式是一个向量转换的相位周期,相位周期与正弦波的一个周期相匹配。在波形里的每个采样点对应一个相位点的相位周期。合成所需的频率信号,它需要完成以下步骤:1.控制每个采样相位增量和积累(频率控制字K),输出2 pi累计相位(使用相位累加器)。2.转换成相应的正弦振幅2

49、 pi积累阶段,使用ROM来存储相应的相位幅度的一般正弦函数形式。3.采用DAC代码转换成模拟信号电压变化幅度。4.电压信号,DAC出口是阶梯波的形式,实现所需的模拟电压输出低通滤波器平滑后的电压。数控DDS信号源系统设计分析系统使用STM32作为控制核心和AD9850作为发生器。STM32是基于ARM的32位微控制器与128 K字节的闪存。STM32的两个信号输出,可以实现同时通过控制AD9850的和DAC0832输出。该系统的设计的框图如图1所示。一个信号输出通过控制AD9850,可产生30 MHz正弦波和矩形波,其他输出的任意波形及其频率低于10千赫是通过频率数值混合器DAC0832产生

50、的。图1 系统设计框图硬件设计AD9850的模块AD9850包含DDS系统和高速比较器。 AD9850可以实现对整个数字频率相结合。可编程的DDS的核心是相位累加器,它是由ADR和一个N位相位寄存器组成,N为2432。连接到精确的时钟源和写入频率相位控制字后,AD9850的可以产生可编程频率和相位可编程的模拟正弦波输出波,这可以用来作为直接的高频信号源,或者通过高速比较器被转移到矩形波。通过125 MHz时钟,32位频率控制字可以把AD9850的输出频率分辨率展开到0.0291赫兹4。DAC0832模块电路是通过DA从STM32向DAC0832输出相位数据表并得到相应的波形。一步一步的调节相量

51、,可以创建任意的频率,PWM信号通过低通滤波器从STM32传输到相应的电压,因此,DAC0832的参考电压是被控制的,而且,输出的波形幅度调节适当。数字到模拟转换电路,如图2所示:图2 DAC电路PWM转换DA电路低通滤波器的PWM信号从STM32到稳定使用电压跟随器,然后稳定将产生一个稳定的输出电压,通过调整PWM占空比可调节电压。该系统输出的3个PWM信号,它分别控制AD9850的输出范围,占空比和输出DAC0832的范围。图3显示出的PWM控制DA传输电路。放大和滤波电路放大电路将输出放大波形和修改放大的因素。一个很好的平滑的输出波形,可以通过使用低通有源功率滤波实现。放大电路和滤波电路

52、在图4中显示。图3 PWM控制DA转换电路图4 导出放大和滤波电路:(a)放大电路(b)滤波电路软件设计系统软件主要包括AD9850的驱动模块,DAC0832驱动模块,一步一步的自动化模块,PWM转换DA模块和uC/ GUI图片支持的系统中植入程序。由于采用多窗口的图案使得操作界面充满人性化。系统软件的设计过程如图5所示。图5系统程序流程图植入的uC/ GUI数控信号源已足够多的使用的uC / GUI软件建立许多窗口和控制按钮。通过调用相应的窗口和控制反馈信息,外围设备在系统的控制下操作。外部设备主要分为两个驱动器,驱动器AD9850的模块和DAC0832模块驱动。这两个模块可以通过外侧中断和

53、定时中断被控制。AD9850的驱动器AD9850具有40个控制字,其中,32位用于频率控制,5位用于的相位控制,1位用于电源休眠控制,2位用于选择运作模式。这40个控制字可在允许的方式或串行方式到达AD9850,在允许的方式下,8位数据一般可高速将数据传送到寄存器。重复5次后,在40位的数据被加载到频率/相位数据寄存器(用于刷新的DDS输出频率和相位),同时,上面的FQ-UD上升沿地址指针复位到第一个输入寄存器。然后8位数据被加载在W-CLK上升沿,将指针设置到下一个输入注册。W-CLK上升沿重复5次后,在W-CLK上升沿将不再工作,直到复位信号或地址指针复位到第一个输入寄存器的FQ-UD上升

54、沿。程序操作AD9850模块通过底部的功能,作为:void ad9850( double frequency, /frequency unsigned char phase, /phase unsigned char mode, /pattern unsigned char power /source )DAC0832驱动模块在设计中的数字控制信号源,DAC0832被定义为单缓冲的模式,当8位并行数据D0D7被输入,DA将在CS中传输数据。空的DA0832(U8值)的底层函数可以调用Out_To_DDS0832(双频率,U8型)的功能和控制定义的波形和频率。此功能是基于数字频率合成原则,它把输入频率传送到相应的控制字,然后一步一步结合相位预计,在记忆体中输出波形数据表。通过的调用Adjust_Vpp

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论