Sine Wave Generation

合集下载

简易波形发生器的设计

简易波形发生器的设计

XXXX学院课程设计报告课程名称:单片机课程设计院系:电气与信息工程学院专业班级:自动化09102班学生姓名: X X指导教师: X X X完成时间: 2012年6月10日报告成绩:简易波形发生器简易波形发生器是一种常用的信号源,它广泛地应用在电子技术实验、自动控制系统和其他科研领域。

本系统能够准确产生方波、正弦波、锯齿波及三角波。

基于数模转换芯片DAC0832技术的简易波形发生器由六个部分组成:MCU模块、波形发生模块、静态LED 数码管显示模块、键盘输入模块、在线下载模块以及电源模块。

MCU模块采用STC89C51RC 单片机进行数据处理,波形发生模块采用DAC0832及LM324进行波形发生及变换,静态LED数码管显示模块利用3位八段共阳极数码管及3个74LS164显示当前波形频率,键盘模块采取外部中断方式扫描键值,在线下载模块选用MAX232芯片进行单片机程序下载,电源模块使用三端稳压器为系统提供能源。

运用Altium Designer软件绘制了单元电路以及总体电路图,借助Proteus仿真软件对电路进行了虚拟实验,通过仿真分析,满足了课题性能指标的要求,成功地实现了简易波形发生器的设计。

关键词波形发生器;DAC0832;STC89C51RC;静态显示Simple waveform generator is a common source, it is widely used in the experiment of electronic technology, automatic control system and other scientific fields. The system can accurately produce a square wave, sine wave, sawtooth wave and triangle wave. Based on the digital-analog conversion chip DAC0832 simple waveform generator consists of six parts: MCU module, waveform generator module, static LED digital display module, keyboard input module, the download module and power supply. The MCU STC89C51RC microcontroller is for data processing. The waveform generation module which made of DAC0832 and LM324 is used to generate waveform and transform. The static LED digital display module uses three eight out common anode digital and three 74LS164 to show the current waveform frequency. The keyboard module to take external interrupt the scan key. Download module use a MAX232 chip microcontroller program download. The power supply uses three-terminal regulator to provide energy for the system. Altium Designer were used to draw a unit circuit as well as the overall circuit. With Proteus simulation software to conduct virtual experiments on the circuit, simulation analysis, to meet the requirements of the subject of performance indicators, the successful implementation of a simple waveform generator design.Keywords waveform generator ;DAC0832;STC89C51RC; static LED digital display目录摘要 (I)Abstract (II)第一章简易波形发生器的方案设计 (1)1.1简易波形发生器的方案分析与比较 (1)1.1.1 基于数模转换芯片DAC0832的简易波形发生器的设计 (1)1.1.2 基于MAX038函数发生器的简易波形发生器的设计 (1)1.1.3 基于DDS波形发生技术的简易波形发生器的设计 (2)1.2 简易波形发生器的总体结构说明 (2)第二章简易波形发生器的电路设计 (3)2.1 MCU模块 (3)2.1.1 STC89C51RC单片机 (3)2.1.2 复位电路 (5)2.1.3 时钟电路 (5)2.2 DAC0832模块 (5)2.2.1 DAC0832芯片基本介绍 (6)2.2.2 DAC0832波形发生电路 (7)2.3 静态LED数码管显示模块 (7)2.3.1 移位寄存器74LS164 (7)2.3.2 静态显示电路 (8)2.4 键盘输入模块 (8)2.5 在线下载模块 (9)2.6 电源模块 (9)2.7 总体电路说明 (9)第三章简易波形发生器的程序设计 (10)3.1系统接口定义 (10)3.2 主程序 (10)3.3 外部总中断1中断服务程序 (11)第四章简易波形发生器仿真分析 (13)4.1初始界面 (13)4.2 波形发生仿真 (13)4.2.1 正弦波的仿真分析 (13)4.2.2 锯齿波发生仿真分析 (14)4.2.3 三角波发生仿真分析 (15)4.2.4 方波发生仿真分析 (17)总结 (19)参考文献 (20)致谢 (21)附录1:简易波形发生器原理图 (22)附录2:简易波形发生器Protues仿真图 (23)附录3:简易波形发生器元器件明细表 (24)附录4:简易波形发生器源程序 (25)第一章 简易波形发生器的方案设计简易波形发生器是一种常用的信号源,它广泛地应用在电子技术实验、自动控制系统和其他科研领域。

LabVIEW中的波形数据

LabVIEW中的波形数据

LabVIEW中的波形数据与其他基于文本模式的编程语言不同,在LabVIEW中有一类被称为波形数据的数据类型,这种数据类型更类似于“簇”的结构,由一系列不同数据类型的数据构成。

但是波形数据又具有与“簇”不同的特点,例如它可以由一些波形发生函数产生,可以作为数据采集后的数据进行显示和存储。

这一节将主要介绍创建波形数据以及处理波形数据的方法。

1 波形数据的创建LabVIEW中的波形数据既可以由一些用于产生波形的函数、VIs以及Express VIs生成,也可以由数据采集函数从数据采集卡中采集数据而得到。

下面主要介绍用函数、VIs以及Express VIs生成波形数据的方法。

在LabVIEW中,与创建波形数据相关的函数、VIs以及Express VIs主要位于函数选板中的波形(Waveform)子选板以及信号处理(Signal Processing)子选板中,两个选板分别如图6-19以及图6-20所示。

图6-19 波形子选板图6-20 信号处理子选板下面介绍一些常用的用于产生波形数据的函数、VIs以及Express VIs的使用方法。

1.基本函数发生器函数(Basic Function Generation.vi)基本函数发生器函数可以产生正弦波、锯齿波、方波和三角波四种波形,并可以任意设定波形的频率、幅值、相位以及偏移量(叠加的直流分量)等属性。

图6-21所示的程序演示了基本函数发生器函数产生多种波形的方法,在例程中,用户可以指定波形的类型(正弦波、锯齿波、方波或三角波)、幅值、频率、相位以及叠加的直流分量的幅值等属性,根据这些属性生成相应的波形。

程序的后面板如图6-22所示。

图6-21 基本函数发生器函数演示程序的前面板图6-22 基本函数发生器函数演示程序的后面板2.调谐与噪声波形发生函数(Tones and Noise Waveform.vi)调谐与噪声波形发生函数用以产生多个一定频率、幅值、相位的正弦信号叠加的波形数据,同时可以模拟噪声和直流分量,并叠加到已有的波形数据上面。

SINE-WAVE GENERATOR

SINE-WAVE GENERATOR

专利名称:SINE-WAVE GENERATOR 发明人:HAGA HIROYUKI申请号:JP8378088申请日:19880404公开号:JPH01255305A公开日:19891012专利内容由知识产权出版社提供摘要:PURPOSE:To reduce a waveform distortion and a noise by providing a rectangular wave oscillating circuit, a multiplying circuit to multiply a rectangular wave and an external signal together, and a low-pass active filter to which the output of the multiplying circuit is supplied through an AC coupling capacitor. CONSTITUTION:From a rectangular wave oscillating circuit 21, a rectangular wave signal V1 with a fixed period, a fixed amplitude and a duty 50% is outputted. The rectangular wave signal V1 is supplied to a multiplying circuit 22, and it is multiplied by an external signal V2 from a terminal 23. An output V3 of the multiplying circuit 22 is supplied through an AC coupling capacitor 24 and a bias circuit 25 composed of resistors to a low-pass active filter 26. Thus, by equalizing the cut-off frequency of the active filter 26 and the frequency of the rectangular wave signal V1, the frequency components of the high order of the rectangular wave signal V1 is sufficiently attenuated, and a sine wave signal can be obtained in which the waveform distortion and noise are small.申请人:SANYO ELECTRIC WORKS LTD更多信息请下载全文后查看。

仿真信号与波形数据实验

仿真信号与波形数据实验

实验报告学生姓名:学号:指导教师:一、实验项目名称:仿真信号与波形数据二、实验目的:1、了解仿真信号和实际信号概念;2、了解仿真信号在虚拟仪器设计、数据分析中等的应用;3、学习波形数据类型及其使用方法;4、学习三种正弦信号发生器的使用。

三、实验要求:1、完成类似图4、图5程序设计,当采样点数(samples)为1024,周期数(cycles)为2时得到的整周期正弦波序列,使用创建波形函数产生频率为10Hz的正弦波形并显示。

2、完成类似图9、图10的程序设计,产生频率1000Hz的正弦波形;3、完成图11、图12程序设计;四、实验器材(设备、元器件):每组:安装LabVIEW软件的PC机一台。

五、实验内容及步骤:1、LabVIEW的仿真信号仿真信号:指的是用等时间间隔取函数值得到的用离散时间序列(值)表示的信号。

如图1,f(t)是连续函数,取等间隔的时刻t0,t1,t2,t3....tn处的函数值得到f(t0),f(t1),f(t2),f(t3)......f(tn)这样的离散时间序列(值)。

图1 函数的等间隔离散采样实际信号:由数据采集卡(DAQ)对真实信号采样获得的离散时间序列。

那么在仿真分析时,可以用仿真信号模拟实际信号,这时仿真信号不涉及数据采集卡,对设计分析非常方便。

在“Singal Processing信号处理”函数选板下的“Singal Generation信号生成”子模板里有许多能生成仿真信号波形的功能函数。

图2“Singal Processing”函数选板2、正弦波序列发生器(Sine Pattern.vi正弦信号)图3 Sine Pattern.vi正弦信号其中:采样表示正弦信号序列由多少个点组成的;周期表示这么多个点组成几个周期的正弦信号序列;所以同样的点数表示周期越少,图形越光滑;或者说同样周期数,点数越多图形越光滑。

图4 正弦波序列的生成与正弦波形生成前面板图5 正弦波序列的生成与正弦波形生成框图程序3、正弦波发生器(Sine Wave.vi正弦波)图6 Sine Wave.vi正弦波频率使用的是归一化频率;在给定周期数(cycles)的情况下,周期数除以采样数就得到归一化频率;在给定以Hz(周期数/每秒)为单位的频率的情况下,如果用以Hz为单位的频率除以以Hz为单位的采样率,就可以得到归一化频率。

AWG5000系列混合信号伪随机波形生成器说明书

AWG5000系列混合信号伪随机波形生成器说明书

Arbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002)The AWG5000 Series of Arbitrary Waveform Generators Delivers the Industry’s Best Mixed Signal Stimulus Solution for Today’s Complex Measurement ChallengesThe AWG5000 Series of Arbitrary Waveform Generators delivers theoptimal combination of industry leading sample rate, vertical resolution, signal fidelity and waveform memory length,all in an easy-to-use self-contained package.The series offers the industry’s best solution to the challenging signal stim-ulus issues faced by designers verifying,characterizing and debugging sophisti-cated electronic designs.Meeting the needs of today’s design engineers, the series provides excellent signal dynamic range and integrity.AWG5000 Series models, with a 14bits DA converter based sample rate from 600MS/s to 1.2GS/s, two to four output channels, synchronized four to eight digital marker outputs, and 28-channels of digital data outputs, easily solve the toughest measurement chal-lenges in wireless base band I/Q communications, digital consumer product design such as imaging devices, data conversion equipment and semiconductor design and test. The open Windows (Windows XP)-based instruments are easy and convenient to use and connect easily with peripherals and third-party software.AWG5000 Series.Features & Benefits1.2Gs/s and 600MS/s Models 14 bit Vertical Resolution 2 or 4Arbitrary WaveformDifferential/Single-ended Outputs –Up to 4.5V p-p Single-ended and 9V p-p at Differential Output into 50Ω–0.95ns Tr/Tf (10 to 90%) at 0.6V p-p–+/– 5ns Range (50ps Resolution) Inter Channel Skew Control–SFDR: 80dBc (1MHz),64dBc (10MHz)4 or 8Variable Level Marker Outputs–Up to 3.7V p-p Single-ended Output into 50Ω–300ps Tr/Tf (20 to 80%)at 0 to 1V–Up to 1ns Range (50ps Resolution) Delay Control28 Bits Ch 1/Ch 2Variable Level Digital Data Output–Up to 3.7V p-p Single-ended Output into 50Ω–300ps Tr/Tf (20 to 80%)at 0 to 1VUp to 32M Point Record Length For Longer Data Streams Down to 800ps Resolution Edge Timing Shift Control Real-time Sequencing Creates Infinite Waveform Loops, Jumps,and Conditional BranchesEasy to Use and Learn Shortens Test TimeIntuitive User Interface Based on Windows 2000 XP Convenient Bench Top Form FactorIntegrated PC Supports Network Integration and Provides a Built-in DVD, Removable Hard Drive,LAN and USB portsApplicationsDesigning, Testing and Deploying Wireless Communications: –High Fidelity QuadratureModulation I and Q Base-band Signals (Polar Modulation:I/Q + Magnitude Control, Two Pair of I/Q for MIMO)Imaging–Stimulus Signals for Imaging Display and Recording Devices (CCD, LCD)Data Conversion–Stimulus Signals for DataConversion Devices (ADC, DAC)Mixed Signal Design and Test –2/4Ch Analog + 4/8Ch Marker Outputs + 28 Bit Digital Data OutputsReal-world, Ideal or Distorted Signal Generation – Including All the Glitches, Anomalies and ImpairmentsEnhanced/Corrupted Playback of DSO Captured SignalsWaveform Vectors Imported from Third-party T ools such as MathCAD,MATLAB, Excel and OthersArbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002)AWG5000 Series • /signal_sources2EVM/Constellation measurement.Typical Signal Injection.Arbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002) RTSA Spectrum view.9-PAM with 250 Mbps.Mixed signal test by TDS/TLA iView.™AWG5000 Series • /signal_sources3Arbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002)4AWG5000 Series • /signal_sourcesArbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002)AWG5014AWG5012AWG5004AWG5002Arbitrary WaveformsWaveform Length 1 to 16,200,000 points (or 1 to 32,400,000 points,option 01)Number of Waveforms 1 to 16,000Sequence Length 1 to 4,000stepsSequence Repeat Counter 1 to 65,536 or infiniteSequence Control Repeat count,Trigger,Go-to-N and JumpJump Mode Synchronous and AsynchronousRun ModesContinuous Waveform is iteratively output.If a sequence is defined,the sequence order and repeat functions are appliedTriggered Waveform is output only once when an external,internal,GPIB,LAN or manual trigger is receivedGated Waveform begins output when gate is true and resets to beginning when falseSequence Waveform is output as defined by the sequenceClock GeneratorSampling Frequency10 MS/s to 1.2GS/s10 MS/s to 600 MS/sResolution8digitsInternal ClockAccuracy Within ±(1 ppm + Aging),Aging:within ±1 ppm/yearClock Phase Noise Less than –90dBc/Hz at 100kHz offsetInternal Trigger GeneratorInternal Trigger RateRange 1.0μs to 10.0sResolution3digits,0.1μs minimumSkew Control Between OutputsRange– 5 ns to + 5nsResolution5psAWG5000 Series • /signal_sources5Arbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002)AWG5000 Series • /signal_sources6AWG5014AWG5012AWG5004AWG5002Main Arbitrary Waveform Output Resolution14 bitsAnalog OutputOutput StyleDifferential Output Impedance 50ΩConnectorBNC FrontAmplitude Output Voltage Normal:–4.5 V to + 4.5V,Direct –0.3V to +0.3V Amplitude Normal:20mV p-p to 4.5V p-p ,Direct; 20mV p-p to 0.6V p-pResolution 1mVDC Accuracy±(2.0% of Amplitude + 2mV) at offset = 0V Offset (into 50Ω) Range Normal:–2.25V to +2.25V,Direct:N/A Resolution 1mVAccuracy±(2% of offset +10mV at minimum amplitudePulse Response Rise/Fall time:(10% to 90%).Normal:1.4ns (2.0V p-p ),Direct:0.95ns (0.6V p-p )Bandwidth (–3dB)Normal:250MHz (2.0V p-p ),Direct:370MHz (0.6V p-p )Ringing Normal:750mV p-p (4.5V p-p filter through),80mV p-p (2.0V p-p filter through),Direct:60mV p-p (0.6V p-p )Low Pass Filter High range:100MHz,20MHz,Low range:through,100MHz,20MHz,Direct:N/ADelay from Marker Normal:17.5ns to 19.4ns (20MHz filter),3.8ns to 5.7ns (100MHz filter),0 to 1.9ns (Through),Direct:–1.5ns to 0.4nsSine Wave Characteristics (1.2GS/s clock,32 waveform points,37.5MHz signal frequency)(600MS/s clock,32 waveform points,18.75MHz signal frequency)Harmonics Normal:≤–40dBc (2.0V p-p ),Direct ≤=–49dBc (0.6V p-p )Normal:≤–46dBc (2.0V p-p ),Direct ≤=–55dBc (0.6V p-p )Non Harmonics Normal:≤–60dBc (2.0V p-p ,DC to 600MHz)Normal:≤–60dBc (2.0V p-p ,DC to 300MHz)Phase noise ≤–85dBc/Hz (2.0V p-p ,10kHz offset) –85dBc/Hz (2.0V p-p ,10kHz offset) SFDR 50dBc (Normal,37.5MHz,1.2GS/s,2.0V p-p )56dBc (Normal,18.75MHz,600MS/s,2.0V p-p )60dBc (Normal,10MHz,600MS/s,1.0V p-p )60dBc (Normal,10MHz,600MS/s,1.0V p-p )80dBc (Normal,1MHz,600MS/s,1.0V p-p )80dBc (Normal,1MHz,600MS/s,1.0V p-p )64dBc (Direct,10MHz,600 MS/s,0.6V p-p )64dBc (Direct,10MHz,600MS/s,0.6V p-p )80dBc (Direct,1MHz,600 MS/s,0.6V p-p )80dBc (Direct,1MHz,600MS/s,0.6V p-p )Arbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002) Auxiliary OutputsOutput Style Single-endedOutput Impedance50ΩConnector BNC FrontLevel (into 50Ω)(Twice for Hi_Z input)Output Windows–1.00 V to + 2.7VAmplitude0.10 Vp-p to 3.7 Vp-pResolution10mVDC Accuracy±(10% of setting +120mV) Maximum Output Current±54mA /chRise/Fall Time (20% to 80%)300 ps(1.0 Vp-p,Hi +1.0V,Lo 0V) Skew Adjust Between MarkersRange0 to 1000ps Resolution50psRandom Jitter (Typical)1010 clock patternRMS5psrmsTotal Jitter (Typical)2^15–1PN data patternPeak to Peak (p-p)80psp-pClock (VCO) OutRange600MHz to 1.2GHzAmplitude0.4 Vp-pinto 50Ωto GND Impedance:50Ω,AC coupling Connector BNC Rear10MHz Reference OutAmplitude 1.2 Vp-p into 50Ω.Max 2.5 Vp-popenImpedance50Ω,AC couplingConnector BNC RearDC OutputsNumber of Outputs4:independently controlled outputsRange–3.0 to +5.0VResolution10mVMax.Current±100mAConnector2x4 pin header on front panelAWG5000 Series • /signal_sources7Arbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002)AWG5000 Series • /signal_sources8Trigger In Impedance 1 k Ωor 50ΩPolarity POS or NEG ConnectorBNC FrontInput Voltage Range1 k Ω:±10V.50 Ω:±5V Threshold Level –5.0 V to 5.0VResolution 0.1VTrigger Jitter2.0ns to 4.5ns (Typical) Trigger Mode Minimum Pulse Width 20nsTrigger Hold-off 832* sampling_period – 100ns Delay to Analog Out128* sampling_period + 250ns Gate Mode Minimum Pulse Width 1024* sampling_period + 10ns Delay to Analog Out640* sampling_period + 260ns Event Input Impedance 1 k Ωor 50ΩPolarity POS or NEG ConnectorBNC FrontInput Voltage Range 1 k Ω:±10V.50 Ω:±5V Threshold –5.0 V to 5.0VResolution0.1VSequence Mode Mode Minimum Pulse Width 20nsEvent Hold Off 1024* Sampling Period + 10nsDelay to Analog Out640* Sampling Period + 280 ns (Jump timing:Asynchronous jump)External Clock IN Input Voltage Range 0.2 V p-p to 0.8 V p-p Impedance50Ω,AC coupledConnectorBNC RearReference Clock IN Input Voltage Range 0.2 V p-p to 3.0 V p-p Impedance50Ω,AC coupledFrequency Range 10MHz,20MHz,100MHz (with ±0.1%)ConnectorBNC RearPhase Lock IN Input Ranges5MHz to 600MHz (acceptable frequency drift is ±0.5%)Input Voltage Range 0.2 V p-p to 3 V p-pConnectorBNC RearAdd IN For each analog channel Impedance 50Ω,DC coupledDC Gain 1BandwidthDC to 100MHz at –3 dBInput Voltage Range ±1.0V ConnectorBNC RearArbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002)(Third party software creation waveform data:MATLAB,MathCad,Excel)S/W driver for 3rd party S/W IVI-com driver and MATLAB libraryInstrument Control/Data Transfer PortsGPIB Remote control and data transfer.(Conforms to IEEE-Std 488.1,compatible with IEEE 488.2 and SCPI-1999.0)Ethernet (10/100/1000Base-T)Remote control and data transfer.(Conforms to IEEE 802.3).RJ-45Computer System & Peripherals Windows XP Professional,512 MB SDRAM,80 GB removable Hard Drive at rear (available front mount kit),CD-RW/DVD drive at front,included USB compact keyboard and mousePC I/O Ports USB 2.0 compliant ports (6 total,2 front,4 rear),PS/2mouse and keyboard connectors (rear panel),RJ-45 Ethernet connector (rear panel) supports 10/100/1000BASE-T,XGA outDisplay Characteristics10.4inch,LCD color display with touch screen,1024 (H)x768 (V) (XGA)Power Supply100 to 240VAC,47 to 63HzPower Consumption450WSafety UL61010-1,CAN/CSA-22.2,No.61010-1-04,EN61010-1,IEC61010-1Emissions EN 55011 (Class A),IEC61000-3-2,IEC61000-3-3Immunity IEC61326,IEC61000-4-2/3/4/5/6/8/11Regional CertificationsEurope EN61326Australia/New Zealand AS/NZS 2064AWG5000 Series • /signal_sources9Arbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002)Ordering Information Arbitrary WaveformGenerator MainframeAWG50141.2GS/s,4-channel,14bits,16M point/channel Arbitrary Waveform Generator.AWG50121.2GS/s,2-channel,14bits,16M point/channel Arbitrary Waveform Generator.AWG5004600MS/s,4-channel,14bits,16M point/channel Arbitrary Waveform Generator.AWG5002600MS/s,2-channel,14bits,16M point/channel Arbitrary Waveform Generator.All Models Include:Accessory pouch,front cover, USB mouse,compact USB key board,lead set for DC output,stylus for touch screen 2 each, Windows®XP operating system restore DVD and instructions,AWG5000 Series product software CD and instructions,Document CD with Browser,Quick Start User Manual,registration card,Certificate of Calibration,power cable.Note:Please specify power cord and language option when ordering.Instrument OptionsAWG5014/AWG5012,AWG5004/AWG5002Opt.01 – Waveform Length Expansion (from 16 M to 32 M).AWG5012/AWG5002Opt. 03 –28 bits digital data outputs (digital data of ch 1 and ch 2).Common OptionsInternational Power PlugsOpt. A0 – North America power.Opt. A1 –Universal EURO power.Opt. A2 – United Kingdom power.Opt. A3 – Australia power.Opt. A5 – Switzerland power.Opt.A6 –Japan power.Opt.A10 – China power.Opt.A99 – No power cord or AC adapter.Language OptionsOpt. L0 – English.Opt. L5 – Japanese.Opt. L7 –Simplified Chinese.Opt. L8 – Traditional Chinese.ServiceOpt. CA1 – A single calibration event.Opt. C3 – Calibration service 3 years.Opt. C5 – Calibration service 5 years.Opt. D1 –Calibration data report.Opt. D3 – Calibration data report 3 years (withoption C3).Opt. D5 – Calibration data report 5 years (withoption C5).Opt. R3 –Repair service 3 years.Opt. R5 –Repair service 5 years.Post-sales Service Options:(e.g.,AWG5012-CA1).CA1 – A single calibration event.R3DW – Repair service coverage 3 years.R5DW – Repair service coverage 5 years.R2PW –Repair service coverage 2 yearspost warranty.R1PW –Repair service coverage 1 yearpost warranty.Product UpgradeAWG5014, AWG50UPOpt.M14 – Waveform Length Expansionfrom 16 M point to 32 M point.Product UpgradeAWG5012, AWG50UPOpt. M12 – Waveform Length Expansionfrom 16 M point to 32 M point.Opt.D13 –Digital Data Outputs.Product UpgradeAWG5004, AWG50UPOpt. M04 – Waveform Length Expansionfrom 16 M point to 32 M point.Product UpgradeAWG5002, AWG50UPOpt.M02 – Waveform Length Expansionfrom 16 M point to 32 M point.Opt.D03 –Digital Data Outputs.AWG5000 Series • /signal_sources 10Arbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002)WarrantyOne-year parts and labor.AWG5000 Series • /signal_sources11Arbitrary Waveform GeneratorAWG5000 Series (AWG5014 • AWG5012 • AWG5004 • AWG5002)For Further InformationTektronix maintains a comprehensive, constantly expanding collection of application notes, technical briefs and other resources to help engineers working on the cutting edge of technology. Please visit Copyright © 2008, Tektronix. All rights reserved. Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication supersedes that in all previously published material.Specification and price change privileges reserved. TEKTRONIX and TEK are registered trademarks of Tektronix, Inc. All other trade names referenced are the service marks, trademarks or registered trademarks of their respective companies. 07/08 JS/WOW 76W-20381-3Contact Tektronix:ASEAN/Australasia (65) 6356 3900Austria +41 52 675 3777Balkans, Israel, South Africa and other ISE Countries +41 52 675 3777Belgium 07 81 60166Brazil & South America (11) 40669400Canada 1 (800) 661-5625Central East Europe, Ukraine and the Baltics +41 52 675 3777Central Europe & Greece +41 52 675 3777Denmark +45 80 88 1401Finland +41 52 675 3777France +33 (0) 1 69 86 81 81Germany +49 (221) 94 77 400Hong Kong (852) 2585-6688India (91) 80-22275577Italy +39 (02) 25086 1Japan 81 (3) 6714-3010Luxembourg +44 (0) 1344 392400Mexico, Central America & Caribbean 52 (55) 5424700Middle East, Asia and North Africa +41 52 675 3777The Netherlands ***********Norway 800 16098People’s Republic of China 86 (10) 6235 1230Poland +41 52 675 3777Portugal 80 08 12370Republic of Korea 82 (2) 6917-5000Russia & CIS +7 (495) 7484900South Africa +27 11 206 8360Spain (+34) 901 988 054Sweden 020 08 80371Switzerland +41 52 675 3777Taiwan 886 (2) 2722-9622United Kingdom & Eire +44 (0) 1344 392400USA 1 (800) 426-2200For other areas contact Tektronix, Inc. at: 1 (503) 627-7111Updated 12 November 2007roduct(s) are manufactured in ISO registered facilitie Product(s) complies with IEEE Standard 488.1-1987,RS-232-C,and with Tektronix Standard Codes and Formats.。

施耐德sinewave滤波器

施耐德sinewave滤波器

from 20 to 480 AmpsN E Wthe best way to neutralise harmonics: active harmonics conditionersThere are several solutionsfor limiting the harmonic currents of distorting loads.The best known include the installation of interconnected passive filters, the installation of several parallel medium section cables and the connection of polluting loads and sensitive receivers to an isolation transformer at the head of each sub-system ...All these solutions have two major drawbacks - they are specificto existing installations andthe addition or suppressionof loads can totally invalidatethe initial investment, and they are often difficult to install.what makes activeconditioners different?The main advantages of activeconditioners is that they continueto guarantee efficient harmoniccompensation even when changes aremade to the installation. They are alsoexceptionally easy to use as theyfeature:auto-configuration to harmonic loadswhatever their order of magnitude,elimination of overload risks,compatibility with electrical generatorsets,connection to any point of theelectrical network,several conditioners can be usedin the same installation to increasedepollution efficiency (for examplewhen a new machine is installed).how do active conditionerswork?Active conditioners analyse theharmonics drawn by the load and theninject the same harmonic current tothe load with the appropriate phase.As a result, the harmonic currentsare totally neutralised at the pointconsidered. This means they no longerflow upstream and are no longersupplied by the source.where should activeconditioners be installed?Treating harmonics requires accurate,in-depth knowledge of the installation.In new installations we recommendcalculating global harmonic distortionfor various key points during the designphase. In existing installations it isoften best to have an expert audit thesite and prepare a full diagnosis. In allcases it is essential to define the mainobjective:basic diagram for parallel conditionerlow voltage diagram showing possible “connection” points for active conditioners depending on the compensation level requiredeither compliance with standardsIn this case, the active conditioner mustbe placed upstream from the installation(with an “injection” point close to theutility supply network),or reduction in pollution level withinthe installationIn this case the solution is to neutraliseharmonics as close as possibleto the main nonlinear loads.Active conditioners should be locateddownstream (in the secondaryswitchboard or final distribution boards).SineWave THM active conditioners the market leader in harmonic control automatically handle single and three phase loads, data processing equipment, fluorescent lighting,variable speed drives, etc. To enhance compensation at a given point in the installation they can be connected in parallel. Up to four SineWave TM active conditioners can be installed in parallel or mounted in series if your system changes.unrivalled operator-friendliness.Located on the front panel of the SineWave TM unit the man/machine interface (MMI) is written in seven standard languages (English, French,German, Spanish, Italian, Dutch and American). It provides :assistance with commissioning andmaintenance, parameter control (display language,harmonic compensation type),operation (reports, audits, alarms andcontrols).The detachable Man /Machine Interface has a 3 metre lead to enable, for example, installation on the front panel of the SineWave TM unit housing. Additionally, dry contacts and optionalimpressive harmonic attenuation Using state-of-the-art technologies,SineWave TM reduces harmonic currentsby a factor of 10 which, depending onthe type of loads, can rise to a factor of20.Compensation covers 2nd to 25th orderharmonics allowing a wide regulationspan to cover every type of load.Additionally, you can choose betweentwo operating modes :global compensation,pre-selected order of compensation.improvements to cos ϕSineWave TM also improves cos ϕandthe power factor and saves on energycosts.easy installation Specific architecture and carefully selected mechanical components make the SineWave TM an industry referencefor integration. These units areextremely compact. For example, the 30A unit only requires a space of 94 dm 3.This means you can install SineWave TMunits on walls, in switchboards and inpanelboards.SineWave TM units are compatible withevery 3-phase power network and SineWave TM is the first 2ndgeneration active harmonicsconditioner. We have uniqueexperience in this field backedby a powerful, internationaldevelopment programme andthe experienced gained fromthe 1st generation conditionerslaunched in 1994.SineWave TM active harmonics conditioners are remarkably compact For installations from 10 to2000 kVA, SineWave TM gives youthe tomorrow’s performance -today!all categories savings championthe ideal rating at the lowestpriceSineWave TM units are extremely flexibleand there is no need to buy oversizedunit. You can always add on to yourSineWave TM solution to cover futurerequirements. This means unbeatableeconomic solutions for theextraordinary benefits they offer.extended equipment lifeThe reduction in effective current bySineWave TM units prolongs equipmentservice life by up to 30%.no expensive surprisesOnce your current is cleaned up youare protected from surprises such asmalfunctions in critical applications andfines from utility operators for notrespecting standards.SineWave TM units contribute to servicecontinuity too.lower electricity billsReducing harmonics also reduces kVAconsumption. This means you canprobably down-scale your utilitycontract. By improving the cos ϕ,you also reduce absorbed kVA andavoid penalties from power suppliersdue to excessively low cos ϕfactors.Return on investment is rapid and insome cases pay-back can be withintwo years.RS 485 serial connections areavailable for remote control.exceptional operatingreliability, safety and securitySineWave TM units use thoroughlytested circuit layouts and state-of-the-arttechnologies such as fast IGBTtransistors and DSP(Digital Signal Processing)components. This design totallyprotects the unit from overloads.If the demand for harmoniccompensation exceeds its ratedcapacity, conditioning continues up tothe maximum limit.By reducing effective currentconsumption, SineWave TM unitseliminate risks of power failures andcable heating. In this way theycontribute to improving operating safetyand security.SineWave TM man-machine interface, all the data in7 languagesthe smallest activeconditioner on the marketOne of the major advantages ofSineWave TM is that it can be fittedanywhere. This feature is essential inexisting installations where the spacein low voltage systems, processcontrollers, motor control equipmentand technical rooms is often difficultto find.easy connection: a fewpractical hintsSineWave TM units are extremely easyto install. They require 3-phaseelectrical power with or without neutraland the insertion of the measurementsensor into the polluted power supply.trouble-free installationweight : 110 kgSW 45, SW 60weight : 220 kgSW 90, SW 120weight : 65 kgSW 20, SW 30technical specifications(1) maximum capacity on PC type load and on balanced 3-phase network(2) 208 V, 220 V and 480 V voltages are available upon request SineWave TM : the industry reference in harmonic compensationfeaturescompensation of the harmonics: globalor selected harmonics (parameter control)compensation of the displacement factor(cos ϕ) (parameter control)parameter control of load type: dataprocessing, rectifier,...compensation of the power factorIGBT technology and control by DSP circuit3 LEDs to show operation statuts7 language alphanumeric displaydiagnostic and maintenance systemconfiguration and parameter control menudry contacts for remote signallingremote control (lockable)complies with IEC standards andEC markingredundancy and parallel configurationwide range of current transformersOptional Jbus /RS 485 communicationinterfacethe absolute weapon for fighting harmonics: “Total Harmonics Management” (THM)manage your harmonics before they manage youIf you can no longer live with the threat from harmonics, you can relax as now there is a global solution - “Total Harmonics Management“ (THM). THM starts with an accurate harmonic pollution audit for every point in your installation and then develops a flexible, high-performance solution with guaranteed results.THM is only a phone call awayJust call your local MGE UPSSYSTEMS service centre.an expert audits every point in yourinstallation from your low voltage panelto the final panelboards and recordsthe results. He notes down all thelimitations and your specificrequirements.a detailed report is written including aproposal for a solution based onSineWave TM active harmonicconditioner units.This offer defines:- the equipment needed and the cost,- the time required for installation,- the new harmonic distortion valueguaranteed at different points in theinstallation.Once you have received the report,all you have to do is decide when youwant to start fighting harmonics!Installation control and performancemonitoring ensure that the guaranteedresults are effectively obtained.the SineWave TM at A and B.MGE0023UKO measurements with FLUKE 41B analyserMGE UPS SYSTEMS S.A.7 chemin du vieux chêneZIRST 420238942 Meylan CedexFRANCEMGE UPS SYSTEMS S.A. designs, manufactures and markets Merlin Gerin brand UPSs.Austria : 0660 6215Belgium : 0800 7 2189China Hong-Kong :(852) 2 811 2399Denmark : 8001 0137France : 0800 33 68 58Germany : 0130 81 9431Italy : 1678 700 98Netherlands : 06022 3057North america : 1 800 344 0570Norway : 800 11 221United Kingdom : 0800 96 8558South-East Asia (Singapore) :(65) 288 43 23Spain : 900 99 3384Sweden : 020 795 475Switzerland : 155 1107Other countries : (33) (0)4 76 33 91 36Internet :As standards, specifications and designs change from time to time,please ask confirmation of the information given in this publication.Product names mentioned herein may be trademarks and/orregistered trademarks of their respective companies.This document is printed on environment-friendly paper.Published by: MGE UPS SYSTEMS - 03.97Designed by: Paco, Image LangagePhotos: Lucy in the skyPrinted by:。

很详细地dspic逆变svpwm程序

很详细地dspic逆变svpwm程序

F:\dspic\CE003_Sinusoidal_BLDC_010908\CE003_Sinusoidal_BLDC\source\SinusoidalBLDC v1.1.c/* SOFTWARE LICENSE AGREEMENT:* Microchip Technology Incorporated ("Microchip") retains all ownership and* intellectual property rights in the code accompanying this message and in all* derivatives hereto. You may use this code, and any derivatives created by* any person or entity by or on your behalf, exclusively with Microchip's* proprietary products. Your acceptance and/or use of this code constitutes* agreement to the terms and conditions of this notice.** CODE ACCOMPANYING THIS MESSAGE IS SUPPLIED BY MICROCHIP "AS IS". NO* WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED* TO, IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A* PARTICULAR PURPOSE APPLY TO THIS CODE, ITS INTERACTION WITH MICROCHIP'S* PRODUCTS, COMBINATION WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION.** YOU ACKNOWLEDGE AND AGREE THAT, IN NO EVENT, SHALL MICROCHIP BE LIABLE, WHETHER* IN CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE OR BREACH OF STATUTORY DUTY),* STRICT LIABILITY, INDEMNITY, CONTRIBUTION, OR OTHERWISE, FOR ANY INDIRECT, SPECIAL,* PUNITIVE, EXEMPLARY, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, FOR COST OR EXPENSE OF * ANY KIND WHATSOEVER RELATED TO THE CODE, HOWSOEVER CAUSED, EVEN IF MICROCHIP HAS BEEN * ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT* ALLOWABLE BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO* THIS CODE, SHALL NOT EXCEED THE PRICE YOU PAID DIRECTLY TO MICROCHIP SPECIFICALLY TO* HAVE THIS CODE DEVELOPED.** You agree that you are solely responsible for testing the code and* determining its suitability. Microchip has no obligation to modify, test,* certify, or support the code.** REVISION HISTORY:*/////---------------------------------------------------------------------// File: sinusoidalBLDC v1.1.c//// Written By: Jorge Zambada, Microchip Technology//// The following files should be included in the MPLAB project://// sinusoidalBLDC v1.1.c -- Main source code file// SVM.c -- Space Vector Modulation file// SVM.h// p30f4012.gld -- Linker script file//---------------------------------------------------------------------//// Revision History//// July/5/2005 -- first version//----------------------------------------------------------------------#include "p30f4012.h"#include "svm.h"//--------------------------Device Configuration------------------------_FOSC(CSW_FSCM_OFF & XT_PLL16);_FWDT(WDT_OFF);_FBORPOR(PBOR_ON & BORV_20 & PWRT_64 & MCLR_EN);//----------------------------------------------------------------------// Hurst Motor Terminals | MC LV PICDEM Board Connection// -----------------------|---------------------------------// Ground Phase ---------|-- G// Phase Red ---------|-- M1// Phase Black ---------|-- M2// Phase White ---------|-- M3// Hall White ---------|-- HA// Hall Brown ---------|-- HB// Hall Green ---------|-- HCtypedef signed int SFRAC16;#define CLOSED_LOOP // if defined the speed controller will be enabled#define PHASE_ADVANCE // for extended speed ranges this should be defined#define FCY 20000000 // xtal = 5Mhz; PLLx16 -> 20 MIPS#define FPWM 20000 // 20 kHz, so that no audible noise is present.#define _10MILLISEC 10 // Used as a timeout with no hall effect sensors// transitions and Forcing steps according to the// actual position of the motor#define _100MILLISEC 100 // after this time has elapsed, the motor is// consider stalled and it's stopped1F:\dspic\CE003_Sinusoidal_BLDC_010908\CE003_Sinusoidal_BLDC\source\SinusoidalBLDC v1.1.c #define _1000MILLISEC 1000// These Phase values represent the base Phase value of the sinewave for each// one of the sectors (each sector is a translation of the hall effect sensors// reading#define PHASE_ZERO 57344#define PHASE_ONE ((PHASE_ZERO + 65536/6) % 65536)#define PHASE_TWO ((PHASE_ONE + 65536/6) % 65536)#define PHASE_THREE ((PHASE_TWO + 65536/6) % 65536)#define PHASE_FOUR ((PHASE_THREE + 65536/6) % 65536)#define PHASE_FIVE ((PHASE_FOUR + 65536/6) % 65536)#define MAX_PH_ADV_DEG 40 // This value represents the maximum allowed phase// advance in electrical degrees. Set a value from// 0 to 60. This value will be used to calculate// phase advance only if PHASE_ADVANCE is defined// This is the calculation from the required phase advance to the actual// value to be multiplied by the speed of the motor. So, if PHASE_ADVANCE is// enabled, a certain amount of shit angle will be added to the generated// sine wave, up to a maximum of the specified value on MAX_PH_ADV_DEG. This // maximum phase shift will be present when the MeasuredSpeed variable is a // fractional 1.0 (for CW) or -1.0 (for CCW).#define MAX_PH_ADV (int)(((float)MAX_PH_ADV_DEG / 360.0) * 65536.0)#define HALLA 1 // Connected to RB3#define HALLB 2 // Connected to RB4#define HALLC 4 // Connected to RB5#define CW 0 // Counter Clock Wise direction#define CCW 1 // Clock Wise direction#define SWITCH_S2 (!PORTCbits.RC14) // Push button S2// Period Calculation// Period = (TMRClock * 60) / (RPM * Motor_Poles)// For example>// Motor_Poles = 10// RPM = 6000 (Max Speed)// Period = ((20,000,000 / 64) * 60) / (6000 * 10) = 312.5// RPM = 60 (Min Speed)// Period = ((20,000,000 / 64) * 60) / (60 * 10) = 31250#define MINPERIOD 313 // For 6000 max rpm and 10 poles motor#define MAXPERIOD 31250 // For 60 min rpm and 10 poles motor// Use this MACRO when using floats to initialize signed 16-bit fractional// variables#define SFloat_To_SFrac16(Float_Value) \((Float_Value < 0.0) ? (SFRAC16)(32768 * (Float_Value) - 0.5) \: (SFRAC16)(32767 * (Float_Value) + 0.5))void InitADC10(void); // Initialization of ADC used for Speed Commandvoid InitMCPWM(void); // Initialization for PWM at 20kHz, Center aligned,// Complementary mode with 1 us of deadtimevoid InitTMR1(void); // Initialization for TIMER1 used for speed control// and motor stalled protectionvoid InitTMR3(void); // Initialization for TIMER3 used as a timebase// for the two input capture channelsvoid InitUserInt(void); // This function initializes all ports// (inputs and outputs) for the applicationvoid InitICandCN(void); // Initializes input captures and change notification,// used for the hall sensor inputsvoid RunMotor(void); // This function initializes all variables// and interrupts used for starting and running// the motorvoid StopMotor(void); // This function clears all flags, and stops anything// related to motor control, and also disables PWMsvoid SpeedControl(void); // This function contains all ASM and C operations// for doing the PID Control loop for the speedvoid ForceCommutation(void); // When motor is to slow to generate interrupts// on halls, this function forces a commutationvoid ChargeBootstraps(void); // At the begining of the motor operation, the// bootstrap caps are charged with this function// Constants used for properly energizing the motor depending on the// rotor's positionint PhaseValues[6] __attribute__((far,section(".const,r")))={PHASE_ZERO, PHASE_ONE, PHASE_TWO, PHASE_THREE, PHASE_FOUR, PHASE_FIVE};// In the sinewave generation algorithm we need an offset to be added to the// pointer when energizing the motor in CCW. This is done to compensate an2F:\dspic\CE003_Sinusoidal_BLDC_010908\CE003_Sinusoidal_BLDC\source\SinusoidalBLDC v1.1.c // asymetry of the sinewaveint PhaseOffset = 4100;// Flags used for the applicationstruct{unsigned MotorRunning :1; // This bit is 1 if motor runningunsigned unused :15;}Flags;unsigned int Phase; // This variable is incremented by the PWM interrupt// in order to generate a proper sinewave. Its value// is incremented by a value of PhaseInc, which// represents the frequency of the generated sinewavesigned int PhaseInc; // Delta increments of the Phase variable, calculated// in the TIMER1 interrupt (each 1 ms) and used in// the PWM interrupt (each 50 us)signed int PhaseAdvance; // Used for extending motor speed range. This value// is added directly to the parameters passed to the// SVM function (the sine wave generation subroutine)unsigned int HallValue; // This variable holds the hall sensor input readingsunsigned int Sector; // This variables holds present sector value, which is// the rotor positionunsigned int LastSector; // This variable holds the last sector value. This// is critical to filter slow slew rate on the Hall// effect sensors hardwareunsigned int MotorStalledCounter = 0; // This variable gets incremented each// 1 ms, and is cleared everytime a new// sector is detected. Used for// ForceCommutation and MotorStalled// protection functions// This array translates the hall state value read from the digital I/O to the// proper sector. Hall values of 0 or 7 represent illegal values and therefore// return -1.char SectorTable[] = {-1,4,2,3,0,5,1,-1};unsigned char Current_Direction; // Current mechanical motor direction of// rotation Calculated in halls interruptsunsigned char Required_Direction; // Required mechanical motor direction of// rotation, will have the same sign as the// ControlOutput variable from the Speed// Controller// Variables containing the Period of half an electrical cycle, which is an// interrupt each edge of one of the hall sensor inputunsigned int PastCapture, ActualCapture, Period;// Used as a temporal variable to perform a fractional divide operation in// assemblySFRAC16 _MINPERIOD = MINPERIOD - 1;SFRAC16 MeasuredSpeed, RefSpeed; // Actual and Desired speeds for the PID// controller, that will generate the errorSFRAC16 ControlOutput = 0; // Controller output, used as a voltage output,// use its sign for the required direction// Absolute PID gains used by the controller. Position form implementation of// a digital PID. See SpeedControl subroutine for detailsSFRAC16 Kp = SFloat_To_SFrac16(0.1); // P GainSFRAC16 Ki = SFloat_To_SFrac16(0.01); // I GainSFRAC16 Kd = SFloat_To_SFrac16(0.000); // D Gain// Constants used by the PID controller, since a MAC operation is used, the// PID structure is changed (See SpeedControl() Comments)SFRAC16 ControlDifference[3] \__attribute__((__space__(xmemory), __aligned__(4)));SFRAC16 PIDCoefficients[3] \__attribute__((__space__(ymemory), __aligned__(4)));// Used as a temporal variable to perform a fractional divide operation in// assemblySFRAC16 _MAX_PH_ADV = MAX_PH_ADV;/*********************************************************************Function: void __attribute__((__interrupt__)) _T1Interrupt (void)PreCondition: The motor is running and is generating hall effect sensorsinterrupts. Also, the actual direction of the motor usedin this interrupt is assumed to be previously calculated.3F:\dspic\CE003_Sinusoidal_BLDC_010908\CE003_Sinusoidal_BLDC\source\SinusoidalBLDC v1.1.c Input: None.Side Effects: None.Overview: In this ISR the Period, Phase Increment and MeasuredSpeed are calculated based on the input capture of one of thehalls. The speed controller is also called in this ISRto generate a new output voltage (ControlOutput). ThePhase Advance is calculated based on the maximum allowedphase advance (MAX_PH_ADV) and the actual speed of themotor. The last thing done in this ISR is the forcedcommutation, which happens each time the motor doesn'tgenerate a new hall interrupt after a programmed periodof time. If the timeout for generating hall ISR is too much(i.e. 100 ms) the motor is then stopped.Note: The MeasuredSpeed Calculation is made in assembly to take advantage of the signed fractional division.********************************************************************/void __attribute__((interrupt, no_auto_psv)) _T1Interrupt (void){IFS0bits.T1IF = 0;Period = ActualCapture - PastCapture; // This is an UNsigned substraction // to get the Period between one// hall effect sensor transition// These operations limit the Period value to a range from 60 to 6000 rpm if (Period < (unsigned int)MINPERIOD) // MINPERIOD or 6000 rpm Period = MINPERIOD;else if (Period > (unsigned int)MAXPERIOD) // MAXPERIOD or 60 rpm Period = MAXPERIOD;// PhaseInc is a value added to the Phase variable to generate the sine// voltages. 1 electrical degree corresponds to a PhaseInc value of 184,// since the pointer to the sine table is a 16bit value, where 360 Elec// Degrees represents 65535 in the pointer.// __builtin_divud(Long Value, Int Value) is a function of the compiler// to do Long over Integer divisions.PhaseInc = __builtin_divud(512000UL, Period); // Phase increment is used // by the PWM isr (SVM)// This subroutine in assembly calculates the MeasuredSpeed using// fractional division. These operations in assembly perform the following // formula:// MINPERIOD (in fractional)// MeasuredSpeed = ---------------------------// Period (in fractional)//{ int divr;__asm__ volatile("repeat #17\n\t": /* output */ "=a"(divr): /* input */ "r"(_MINPERIOD),"e"(Period));MeasuredSpeed = divr;}// MeasuredSpeed sign adjustment based on current motor direction of// rotationif (Current_Direction == CCW)MeasuredSpeed = -MeasuredSpeed;// The following values represent the MeasuredSpeed values from the// previous operations://// CONDITION RPM SFRAC16 SINT HEX// Max Speed CW -> 6000 RPM -> 0.996805 -> 32663 -> 0x7F97// Min Speed CW -> 60 RPM -> 0.009984 -> 327 -> 0x0147// Min Speed CCW -> -60 RPM -> -0.009984 -> -327 -> 0xFEB9// Max Speed CCW -> -6000 RPM -> -0.996805 -> -32663 -> 0x8069SpeedControl(); // Speed PID controller is called here. It will use// MeasuredSpeed, RefSpeed, some buffers and will generate// the new ControlOutput, which represents a new amplitude// of the sinewave that will be generated by the SVM// subroutine.4F:\dspic\CE003_Sinusoidal_BLDC_010908\CE003_Sinusoidal_BLDC\source\SinusoidalBLDC v1.1.c #ifdef PHASE_ADVANCE// Calculate Phase Advance Based on Actual Speed and MAX_PH_ADV define// The following assembly instruction perform the following formula// using fractional multiplication://// PhaseAdvance = MAX_PH_ADV * MeasuredSpeed//#if !defined(__C30_VERSION__) || (__C30_VERSION__ < 200) || (__C30_VERSION__ == 300) || defined(TEST_ASM){ register int wreg4 asm("w4") = _MAX_PH_ADV;register int wreg5 asm("w5") = MeasuredSpeed;asm volatile("mpy %0*%1, A" : /* no outputs */: "r"(wreg4), "r"(wreg5));asm volatile("sac A, %0" : "=r"(PhaseAdvance));}#else{ register int a_reg asm("A");a_reg = __builtin_mpy(_MAX_PH_ADV, MeasuredSpeed, 0,0,0,0,0,0);PhaseAdvance = __builtin_sac(a_reg, 0);}#endif#endifMotorStalledCounter++; // We increment a timeout variable to see if the // motor is too slow (not generating hall effect// sensors interrupts frequently enough) or if// the motor is stalled. This variable is cleared// in halls ISRsif ((MotorStalledCounter % _10MILLISEC) == 0){ForceCommutation(); // Force Commutation if no hall sensor changes// have occured in specified timeout.}else if (MotorStalledCounter >= _1000MILLISEC){StopMotor(); // Stop motor is no hall changes have occured in// specified timeout}return;}/********************************************************************* Function: void __attribute__((__interrupt__)) _CNInterrupt (void) PreCondition: The inputs of the hall effect sensors should have low pass filters. A simple RC network works.Input: None.Output: None.Side Effects: None.Overview: This interrupt represent Hall A ISR. Hall A -> RB3 -> CN5. This is generated by the input change notification CN5.The purpose of this ISR is to Calculate the actualmechanical direction of rotation of the motor, and to adjustthe Phase variable depending on the sector the rotor is in.Note 1: The sector is validated in order to avoid any spuriousinterrupt due to a slow slew rate on the halls inputs due tohardware filtering.Note 2: For Phase adjustment in CCW, an offset is added to compensate non-symetries in the sine table used.********************************************************************/void __attribute__((interrupt, no_auto_psv)) _CNInterrupt (void){IF = 0; // Clear interrupt flagHallValue = (unsigned int)((PORTB >> 3) & 0x0007); // Read halls Sector = SectorTable[HallValue]; // Get Sector from table// This MUST be done for getting around the HW slow rate5F:\dspic\CE003_Sinusoidal_BLDC_010908\CE003_Sinusoidal_BLDC\source\SinusoidalBLDC v1.1.c if (Sector != LastSector){// Since a new sector is detected, clear variable that would stop// the motor if stalled.MotorStalledCounter = 0;// Motor current direction is computed based on Sectorif ((Sector == 5) || (Sector == 2))Current_Direction = CCW;elseCurrent_Direction = CW;// Motor commutation is actually based on the required direction, not// the current dir. This allows driving the motor in four quadrantsif (Required_Direction == CW){Phase = PhaseValues[Sector];}else{// For CCW an offset must be added to compensate difference in// symmetry of the sine table used for CW and CCWPhase = PhaseValues[(Sector + 3) % 6] + PhaseOffset;}LastSector = Sector; // Update last sector}return;}/*********************************************************************Function: void __attribute__((__interrupt__)) _IC7Interrupt (void)PreCondition: The inputs of the hall effect sensors should have low passfilters. A simple RC network works.Input: None.Output: None.Side Effects: None.Overview: This interrupt represent Hall B ISR. Hall B -> RB4 -> IC7.This is generated by the input Capture Channel IC7.The purpose of this ISR is to Calculate the actual Periodbetween hall effect sensor transitions, calculate the actualmechanical direction of rotation of the motor, and also toadjust the Phase variable depending on the sector the rotoris in.Note 1: The sector is validated in order to avoid any spuriousinterrupt due to a slow slew rate on the halls inputs due tohardware filtering.Note 2: For Phase adjustment in CCW, an offset is added tocompensate non-symetries in the sine table used.********************************************************************/void __attribute__((interrupt, no_auto_psv)) _IC7Interrupt (void){IFS1bits.IC7IF = 0; // Cleat interrupt flagHallValue = (unsigned int)((PORTB >> 3) & 0x0007); // Read hallsSector = SectorTable[HallValue]; // Get Sector from table// This MUST be done for getting around the HW slow rateif (Sector != LastSector){// Calculate Hall period corresponding to half an electrical cyclePastCapture = ActualCapture;ActualCapture = IC7BUF;IC7BUF;IC7BUF;IC7BUF;// Since a new sector is detected, clear variable that would stop// the motor if stalled.MotorStalledCounter = 0;// Motor current direction is computed based on Sectorif ((Sector == 3) || (Sector == 0))6F:\dspic\CE003_Sinusoidal_BLDC_010908\CE003_Sinusoidal_BLDC\source\SinusoidalBLDC v1.1.c Current_Direction = CCW;elseCurrent_Direction = CW;// Motor commutation is actually based on the required direction, not// the current dir. This allows driving the motor in four quadrantsif (Required_Direction == CW){Phase = PhaseValues[Sector];}else{// For CCW an offset must be added to compensate difference in// symmetry of the sine table used for CW and CCWPhase = PhaseValues[(Sector + 3) % 6] + PhaseOffset;}LastSector = Sector; // Update last sector}return;}/********************************************************************* Function: void __attribute__((__interrupt__)) _IC8Interrupt (void) PreCondition: The inputs of the hall effect sensors should have low pass filters. A simple RC network works.Input: None.Output: None.Side Effects: None.Overview: This interrupt represent Hall C ISR. Hall C -> RB5 -> IC8. This is generated by the input Capture Channel IC8.The purpose of this ISR is to Calculate the actualmechanical direction of rotation of the motor, and to adjustthe Phase variable depending on the sector the rotor is in.Note 1: The sector is validated in order to avoid any spurious interrupt due to a slow slew rate on the halls inputs due tohardware filtering.Note 2: For Phase adjustment in CCW, an offset is added to compensate non-symetries in the sine table used.********************************************************************/void __attribute__((interrupt, no_auto_psv)) _IC8Interrupt (void){IFS1bits.IC8IF = 0; // Cleat interrupt flagHallValue = (unsigned int)((PORTB >> 3) & 0x0007); // Read halls Sector = SectorTable[HallValue]; // Get Sector from table// This MUST be done for getting around the HW slow rateif (Sector != LastSector){// Since a new sector is detected, clear variable that would stop// the motor if stalled.MotorStalledCounter = 0;// Motor current direction is computed based on Sectorif ((Sector == 1) || (Sector == 4))Current_Direction = CCW;elseCurrent_Direction = CW;// Motor commutation is actually based on the required direction, not // the current dir. This allows driving the motor in four quadrantsif (Required_Direction == CW){Phase = PhaseValues[Sector];}else{// For CCW an offset must be added to compensate difference in// symmetry of the sine table used for CW and CCWPhase = PhaseValues[(Sector + 3) % 6] + PhaseOffset;}LastSector = Sector; // Update last sector7F:\dspic\CE003_Sinusoidal_BLDC_010908\CE003_Sinusoidal_BLDC\source\SinusoidalBLDC v1.1.c }return;}/*********************************************************************Function: void __attribute__((__interrupt__)) _PWMInterrupt (void)PreCondition: None.Input: None.Output: None.Side Effects: None.Overview: in this ISR the sinewave is generated. If the current motordirection of rotation is different from the requireddirection then the motor is operated in braking mode andstep commutation is performed. Once both directions areequal then the sinewave is fed into the motor windings.If PHASE_ADVANCE is defined, a value corresponding to themultiplication of the actual speed * maximum phase advanceis added to the sine wave phase to produce the phase shiftNote: None.********************************************************************/void __attribute__((interrupt, no_auto_psv)) _PWMInterrupt (void){IFS2bits.PWMIF = 0; // Clear interrupt flagif (Required_Direction == CW){if (Current_Direction == CW)Phase += PhaseInc; // Increment Phase if CW to generate the// sinewave only if both directions are equal// If Required_Direction is CW (forward) POSITIVE voltage is applied#ifdef PHASE_ADVANCESVM(ControlOutput, Phase + PhaseAdvance); // PhaseAdvance addition// produces the sinewave// phase shift#elseSVM(ControlOutput, Phase);#endif}else{if (Current_Direction == CCW)Phase -= PhaseInc; // Decrement Phase if CCW to generate// the sinewave only if both// directions are equal// If Required_Direction is CCW (reverse) NEGATIVE voltage is applied#ifdef PHASE_ADVANCESVM(-(ControlOutput+1), Phase + PhaseAdvance);// PhaseAdvance addition// produces the sinewave// phase shift#elseSVM(-(ControlOutput+1), Phase);#endif}return;}/*********************************************************************Function: void __attribute__((__interrupt__)) _ADCInterrupt (void)PreCondition: None.Input: None.Output: None.Side Effects: None.Overview: The ADC interrupt loads the reference speed (RefSpeed) withthe respective value of the POT. The value will be a signedfractional value, so it doesn't need any scaling.Note: None.8F:\dspic\CE003_Sinusoidal_BLDC_010908\CE003_Sinusoidal_BLDC\source\SinusoidalBLDC v1.1.c ********************************************************************/void __attribute__((interrupt, no_auto_psv)) _ADCInterrupt (void){IFS0bits.ADIF = 0; // Clear interrupt flagRefSpeed = ADCBUF0; // Read POT value to set Reference Speedreturn;}/*********************************************************************Function: int main(void)PreCondition: None.Input: None.Output: None.Side Effects: None.Overview: main function of the application. Peripherals areinitialized, and then, depending on the motor status(running or stopped) and if the push button is pressed,the motor is started or stopped. All other operations andstate machines are performed with interrupts.Note: None.********************************************************************/ int main(void){InitUserInt(); // Initialize User Interface I/OsInitADC10(); // Initialize ADC to be signed fractionalInitTMR1(); // Initialize TMR1 for 1 ms periodic ISRInitTMR3(); // Initialize TMR3 for timebase of capture InitICandCN(); // Initialize Hall sensor inputs ISRsInitMCPWM(); // Initialize PWM @ 20 kHz, center aligned, 1 us of // deadtimefor(;;){if ((SWITCH_S2) && (!Flags.MotorRunning)){while(SWITCH_S2);RunMotor(); // Run motor if push button is pressed and motor is // stopped}else if ((SWITCH_S2) && (Flags.MotorRunning)){while(SWITCH_S2);StopMotor();// Stop motor if push button is pressed and motor is // running}}return 0;}/********************************************************************* Function: void ChargeBootstraps(void)PreCondition: None.Input: None.Output: None.Side Effects: None.Overview: In the topology used, it is necessary to charge the bootstrap caps each time the motor is energized for thefirst time after an undetermined amount of time. ChargeBootstraps subroutine turns ON the lower transistorsfor 10 ms to ensure voltage on these caps, and then ittransfers the control of the outputs to the PWM module.Note: None.********************************************************************/ void ChargeBootstraps(void){unsigned int i;9F:\dspic\CE003_Sinusoidal_BLDC_010908\CE003_Sinusoidal_BLDC\source\SinusoidalBLDC v1.1.c OVDCON = 0x0015; // Turn ON low side transistors to chargefor (i = 0; i < 33330; i++) // 10 ms Delay at 20 MIPs;PWMCON2bits.UDIS = 1;PDC1 = PTPER; // Initialize as 0 voltagePDC2 = PTPER; // Initialize as 0 voltagePDC3 = PTPER; // Initialize as 0 voltageOVDCON = 0x3F00; // Configure PWM0-5 to be governed by PWM modulePWMCON2bits.UDIS = 0;return;}/*********************************************************************Function: void RunMotor(void)PreCondition: None.Input: None.Output: None.Side Effects: None.Overview: Call this subroutine when first trying to run the motor andthe motor is previously stopped. RunMotor will chargebootstrap caps, will initialize application variables, andwill enable all ISRs.Note: None.********************************************************************/void RunMotor(void){ChargeBootstraps();// init variablesControlDifference[0] = 0; // Error at K (most recent)ControlDifference[1] = 0; // Error at K-1ControlDifference[2] = 0; // Error at K-2 (least recent)PIDCoefficients[0] = Kp + Ki + Kd; // Modified coefficient for using MACsPIDCoefficients[1] = -(Ki + 2*Kd); // Modified coefficient for using MACsPIDCoefficients[2] = Kd; // Modified coefficient for using MACsTMR1 = 0; // Reset timer 1 for speed controlTMR3 = 0; // Reset timer 3 for speed measurementActualCapture = MAXPERIOD; // Initialize captures for minimum speed//(60 RPMs)PastCapture = 0;// Initialize direction with required direction// Remember that ADC is not stopped.。

stm32的正弦波代码

stm32的正弦波代码

stm32的正弦波代码近年来,随着微控制器技术的不断发展,STM32系列微控制器凭借其高性能、低功耗、丰富的外设资源等优势,广泛应用于各种嵌入式系统中。

在众多应用场景中,生成正弦波信号是一种常见的需求。

本文将介绍如何使用STM32编写正弦波代码,并详细阐述创建正弦波的方法、代码实现细节以及测试与调试过程。

一、STM32正弦波代码概述STM32生成正弦波的方法主要有两种:一种是通过数模转换器(DAC)输出,另一种是通过定时器中断实现。

在以下内容中,我们将主要介绍通过DAC输出正弦波的方法。

二、创建正弦波的方法1.配置DAC模块首先,需要对DAC模块进行配置。

根据STM32的型号和外设配置,初始化DAC通道、设置数据格式等。

2.生成正弦波数据创建一个正弦波数据缓冲区,用于存储正弦波采样点。

可以通过数学公式计算正弦波值,或者使用离散正弦波数据表格。

3.数据发送至DAC模块将生成的正弦波数据发送至DAC模块,实现模拟信号输出。

三、代码实现细节1.初始化DAC模块```cvoid DAC_Init(void){GPIO_InitTypeDef GPIO_InitStructure;DAC_InitStructure.DAC_Channel = DAC_Channel_1;DAC_InitStructure.DAC_WaveFormGeneration =DAC_WaveFormGeneration_Sine;DAC_InitStructure.DAC_OutputBuffer =DAC_OutputBuffer_Enable;DAC_InitStructure.DAC_ReferenceVoltage =DAC_ReferenceVoltage_3.3V;DAC_Init(&DAC_InitStructure);DAC_SetValue(DAC_Channel_1, DAC_DataAlign_Left, 0);}```2.生成正弦波数据```cvoid GenerateSineWave(uint16_t *buffer, uint16_t bufferSize, uint32_t sampleRate){for (uint16_t i = 0; i < bufferSize; i++){buffer[i] = (int16_t)(sin(i * M_PI * 2 / sampleRate) * 4095);}}```3.将数据发送至DAC模块```cvoid SendSineWaveToDAC(uint16_t *buffer, uint16_t bufferSize){for (uint16_t i = 0; i < bufferSize; i++){DAC_SetValue(DAC_Channel_1, DAC_DataAlign_Left, buffer[i]);}}```四、测试与调试1.使用示波器捕捉正弦波信号,观察波形、频率、幅值等参数。

(秦荻辉)科技英语写作PPT课件

(秦荻辉)科技英语写作PPT课件
12
第一节 词 类
(7)在人名的所有格之前不用冠词。 这个式子被称为欧姆定律。 This equation is known as Ohm's law. 根据法拉第定律,在初级绕组中感应出来的电压与 初级电感成正比。 The voltage induced in the primary winding is proportional to the primary inductance according to Faraday's law.
8
第一节 词 类
中国 China 北京大学 Beijng University 西电大学 Xidian University 西北工业大学 the Northwestern Polytechnical University 计算机科学系 the Department of Computer Science
科技英语写作教程
秦荻辉 编著 西安电子科技大学出版社
1
第一章 科技英语单句写作
• 对于研究生、专业教师和科技工作者来说,所 谓科技英语写作,就是把中文的论文翻译成英 语文本的问题。目前我们在进行科技英语写作 学习过程中最迫切的任务是一定要把单句写好。
• 另外,写作和翻译具有很强的实践性,一些国 内外著名专家一再强调,写作课就是要“写”, 翻译课就是要“译”,理论并不多,只有通过 大量实践才能掌握必要的写作和翻译技巧。
2
第一节 词 类
一、冠词 在写作时,冠词用错的情况极为普遍,多数人 往往漏用冠词,有些人是乱用冠词。对冠词的使 用应注意以下几点。
3
第一节 词 类
1.一般应加冠词的情况 (1)在单数可数名词前一般要有冠词,泛指时多用不
定冠词。如:
电动势加在铜导线的两端。 An emf is applied across the ends of a copper wire. 发射机通常是由几部分构成的。 A transmitter consists commonly of several parts.

三相正弦波发生器

三相正弦波发生器

嵌入式系统综合实训说明书题目:三相正弦波发生器院(系):信息与通信学院专业:电子信息工程学生姓名:闫朝明学号: 1100220429 指导教师:孙安青2015年1月10日基于DDS的正弦波发生器摘要DDS(Direct Digital Synthesizer)是直接数字频率合成器技术。

基于Altera公司的cycloneII利用DDS技术实现正弦波发生器是一种新的频率合成技术,它主要是通过相位累加器、波形ROM构成,与传统的相比,DDS具有低成本、低功耗、高分辨率和快速转换时间等优点,广泛使用在电信与电子仪器领域,是实现设备全数字化的一个关键技术。

通过正弦波发生器还可以拓展出任意波形器。

关健词:DDS nuc-140 ROM modelsimSine Wave Generator Based on DDSAbstractDDS (Direct Digital Synthesizer) is the Direct Digital frequency Synthesizer technology. Based on Altera corporation cycloneII using DDS technology to realize the sine wave generator is a kind of new frequency synthesis technology, it mainly through the phase accumulator, waveform ROM composition, compared with the traditional, DDS has low cost, low power consumption, and the advantages of high resolution and fast conversion time, widely used in the field of telecommunications and electronic instruments, is one of the key technologies to realize full digital equipment. Through sine wave generator can also expand the arbitrary waveform.Keywords: DDS nuc-140 ROM modelsim目录引言 (1)1 设计目的及意义 (3)1.1 设计目的 (3)1.2 设计意义 (4)2 设计方案 (6)2.1 设计要求 (6)2.2设计思路 (6)3 硬件电路设计 (10)3.1开发板及主要芯片介绍 (10)3.2 硬件框图 (11)3.3 硬件模块说明 (12)4 软件设计 (12)4.1 程序流程图 (12)4.2 正弦波的产生过程 (12)5 结论 (13)谢辞 (14)参考文献 (15)附录 (16)引言波形发生器是能够产生大量的标准信号和用户定义信号,并保证高精度、高稳定性、可重复性和易操作性的电子仪器。

虚拟调制解调器

虚拟调制解调器

虚拟调制解调器一.La bV IE W简介。

L ab VI E W是一种程序开发环境,由美国国家仪器(N I)公司研制开发,类似于C和BA SI C开发环境,但是L ab VI EW与其他计算机语言的显著区别是:其他计算机语言都是采用基于文本的语言产生代码,而La b VI EW使用的是图形化编辑语言G编写程序,产生的程序是框图的形式。

L ab VI E W软件是N I设计平台的核心,也是开发测量或控制系统的理想选择。

L ab VI EW开发环境集成了工程师和科学家快速构建各种应用所需的所有工具,旨在帮助工程师和科学家解决问题、提高生产力和不断创新。

1.解析:与 C 和BA SI C一样,Lab VI EW也是通用的编程系统,有一个完成任何编程任务的庞大函数库。

La bV IE W 的函数库包括数据采集、GPI B、串口控制、数据分析、数据显示及数据存储,等等。

La bV IE W 也有传统的程序调试工具,如设置断点、以动画方式显示数据及其子程序(子V I)的结果、单步执行等等,便于程序的调试。

L a bV IE W (La bo rat o ry Vi rt ua l In str u me nt En gi ne er in g W o rk be nc h)是一种用图标代替文本行创建应用程序的图形化编程语言。

传统文本编程语言根据语句和指令的先后顺序决定程序执行顺序,而La bV IE W 则采用数据流编程方式,程序框图中节点之间的数据流向决定了VI及函数的执行顺序。

VI 指虚拟仪器,是La b VI EW 的程序模块。

L a bV IE W 提供很多外观与传统仪器(如示波器、万用表)类似的控件,可用来方便地创建用户界面。

用户界面在L a bV IE W 中被称为前面板。

使用图标和连线,可以通过编程对前面板上的对象进行控制。

这就是图形化源代码,又称G 代码。

L ab VI EW 的图形化源代码在某种程度上类似于流程图,因此又被称作程序框图代码。

Agilent Technologies 33120A功能 随机波形生成器说明书

Agilent Technologies 33120A功能 随机波形生成器说明书

Uncompromising performance for standard waveformsThe Agilent Technologies 33120A function/arbitrary waveform genera-tor uses direct digital-synthesis tech-niques to create a stable, accurate output signal for clean, low-distortion sine waves. It also gives you fast rise-and fall-time square wave, and linear ramp waveforms down to 100µHz.Custom waveform generationUse the 33120A to generate complex custom waveforms such as a heart-beat or the output of a mechanical transducer. With 12-bit resolution,and a sampling rate of 40MSa/s, the 33120A gives you the flexibility to create any waveform you need. It also lets you store up to four 16,000-deep waveforms in nonvolatile memory.Easy-to-use functionalityFront-panel operation of the 33120A is straightforward and intuitive. You can access any of ten major func-tions with a single key press or two,then use a simple knob to adjust fre-quency, amplitude and offset. To save time, you can enter voltage val-ues directly in Vp-p, Vrms or dBm.Internal AM, FM, FSK and burst mod-ulation make it easy to modulate waveforms without the need for aseparate modulation source. Linear and log sweeps are also built in, with sweep rates selectable from 1ms to 500 s. GPIB and RS-232 interfaces are both standard, plus you get full pro-grammability using SCPI commands.Optional phase-lock capabilityThe Option 001 phase lock/TCXO timebase gives you the ability to gen-erate synchronized phase-offset sig-nals. An external clock input/output lets you synchronize with up to three other 33120As or with an external 10-MHz clock.Option 001 also gives you a TCXO timebase for increased frequency sta-bility. With accuracy of 4 ppm/yr, the TCXO timebase make a 33120A ideal for frequency calibrations and other demanding applications.With Option 001, new commands let you perform phase changes on the fly, via the front panel or from a computer, allowing precise phase calibration and adjustment.Link the Agilent 33120A to your PCTo further increase your productivity,use the 33120A in conjunction with Agilent 34811A BenchLink Arb soft-ware. The Windows®-based program lets you create and edit waveforms on your PC and download them to your 33120A with the click of amouse. Create complex waveforms in a math or statistics program—or use the freehand drawing tool—then pass them into the instrument. Used in conjunction with an Agilent BenchLink Scope, the software also lets you capture a waveform withyour Agilent oscilloscope or DMM and send it to your 33120A for output.3-year warrantyWith your 33120A, you get operating and service manuals, a quick refer-ence guide, test date, and a full 3-year warranty, all for one low price.• 15 MHz sine and square wave outputs• Sine, triangle, square, ramp, noise and more• 12-bit, 40MSa/s, 16,000-point deep arbitrary waveforms •Direct digital synthesis for excellent stabilityAgilent 33120AFunction/Arbitrary Waveform GeneratorData Sheet1981WaveformsStandard Sine, square, triangle, ramp,noise, sin(x)/x, exponentialrise exponential fall, cardiac,dc volts.ArbitraryWaveform length8 to 16,000 points Amplitude resolution12 bits (including sign) Sample rate40 MSa/sNon-volatile memory Four (4) 16,000 waveforms Frequency CharacteristicsSine100 µHz - 15 MHzSquare100 µHz - 15 MHz Triangle100 µHz - 100 kHzRamp100 µHz - 100 kHzWhite noise10 MHz bandwidth Resolution10 µHz or 10 digits Accuracy10 ppm in 90 days,20 ppm in 1 year,18°C - 28°CTemp. Coeff< 2 ppm/°CAging< 10 ppm/yr Sinewave Spectral PurityHarmonic distortiondc to 20 kHz-70 dBc20 kHz to 100 kHz-60 dBc100 kHz to 1 MHz-45 dBc1 MHz to 15 MHz-35 dBcSpurious (non-harmonic)DC to 1 MHz< -65 dBc1 MHz to 15 MHz< -65 dBc + 6 dB/octave Total harmonic distortionDC to 20 kHz<0.04%Phase noise<-55 dBc in a 30 kHz band Signal CharacteristicsSquarewaveRise/Fall time< 20 nsOvershoot4%Asymmetry1% + 5nsDuty cycle20% to 80% (to 5 MHz)40% to 60% (to 15 MHz) Triangle, Ramp, ArbRise/Fall time40 ns (typical)Linearity<0.1% of peak output Setting Time<250 ns to 0.5% offinal valueJitter<25ns Output CharacteristicsAmplitude (into 50Ω)50 mVpp - 10 Vpp [1]Accuracy (at 1 kHz)±1% of specified outputFlatness (sinewave relative to 1 kHz)< 100 kHz±1% (0.1 dB)100 kHz to 1 MHz±1.5% (0.15 dB)1 Mz to 15 MHz±2% (0.2 dB) Ampl ≥3Vrms±3.5% (0.3 dB) Ampl<3VrmsOutput Impedance50Ω(fixed)Offset (into 50Ω) [2]+ 5 Vpk ac + dcAccuracy±2% of setting + 2 mVResolution 3 digits, amplitude and off-setUnits Vpp, Vrms, dBmIsolation42 Vpk maximum to earthProtection Short circuit protected±15Vpk overdrive < 1 minuteModulationAMCarrier -3dB Freq.10 MHz (typical)Modulation any internal waveformincluding ArbFrequency10 mHz - 20 kHzDepth0% - 120%Source Internal/ExternalFMModulation any internal waveformincluding ArbFrequency10 mHz - 10 kHzDeviation10 mHz - 15 MHzSource Internal onlyFSKInternal rate10 mHz - 50 kHzFrequency Range10 mHz - 15 MHzSource Internal/External(1 MHz max.)BurstCarrier Freq. 5 MHz max.Count 1 to 50,000 cycles or infiniteStart Phase-360°to +360°Internal Rate10 mHz - 50 kHz ±1%Gate Source Internal/External GateTrigger Single, External orInternal RateSweepType Linear or LogarithmicDirection Up or DownStart F/Stop F10 mHz - 15 MHzSpeed 1 ms to 500 s ±0.1%Trigger Single, External, or InternalRear Panel InputsExt. AM Modulation±5 Vpk = 100% modulation5kΩinput resistanceExternal Trigger/TTL low trueFSK/Burst GateSystem Characteristics[3]Configuration Times[4]Function Change:[5]80 msFrequency Change:[5]30 msAmplitude Change:30 msOffset Change:10 msSelect User Arb:100 msModulation ParameterChange:<350 msArb Download Times over GPIBArb Length Binary ASCII Integer ASCII Real[6]16,000 points8 sec81 sec100 sec8,192 points 4 sec42 sec51 sec4,096 points 2.5 sec21 sec26 sec2,048 points 1.5 sec11 sec13 secArb Download Times over RS-232 at 9600 Baud:[7]Arb Length Binary ASCII Integer ASCII Real[8]16,000 points35 sec101 sec134 sec8,192 points18 sec52 sec69 sec4,096 points10 sec27 sec35 sec2,048 points 6 sec14 sec18 sec[1] 100 mVpp - 20 Vpp into open circuit[2] Offset ≤2x pk - pk amplitude[3] Times are typical. May vary based on controllerperformance[4] Time to change parameter and output the newsignal.[5] Modulation or sweep off[6] Times for 5-digit and 12-digit numbers[7] For 4800 baud, multiply the download times bytwo; For2400 baud, multiply the download timesby four, etc.[8] Time for 5-digit numbers; for 12-digit numbers,multiply the 5-digit numbers by two2Option 001 Phaselock/TCXO TimebaseTimebase AccuracySetability< 0.01 ppmStability±1 ppm 0°- 50°Aging< 2ppm in first 30 days(continuous operation)0.1 pm/month(after first 30 days)External Reference InputLock Range10 MHz ±50 HzLevel-10 dBm to + 15 dBm+25 dBm or 10 Vpp maxinputImpedance50Ω±2%, 42 Vpk isola-tion to earthLock Time< 2 secondsInternal Reference OutputFrequency10 MHzLevel> 1 Vpp into 50 ΩPhase OffsetRange+ 360°to - 360°Resolution0.001°Accuracy25 nsTrigger OutputLevel5V zero-going pulse Pulse Width> 2µs typicalFanout Capable of driving up tothree 33120As Ordering InformationAgilent 33120A Function/Arb GeneratorOpt. 001 Phase Lock/TCXO Timebase Option GeneralPower Supply110V/120V/220V/240V ±10%Power Line Frequency45 Hz to 66 Hz and 360 Hzto 440 HzPower Consumption50VA peak (28 W aveage) Operating Environment0°C to 55°CStorage Environment-40°C to 70°CState Storage Memory Power Off state automati-cally saved, 3 UserConfigurable StoredStatesInterface IEEE-488 and RS-232standardLanguage SCPI - 1993, IEEE-488.2 Dimensions (W x H x D)Bench top254.4mm x 103.6mm x374mmRack mount212.6mm x 88.5mm x348.3mmWeight 4 kg (8.8 lbs)Safety Designed to UL-1244, CSA 1010,EN61010EMC Tested to MIL-461C, EN55011,EN50082-1Vibration and Shock MIL-T-28800, Type III,Class5Acoustic Noise30 dBaWarm-up Time 1 hourWarranty 3 years standard3Ordering Information33120A Function/Arbitrary Waveform GeneratorAccessories includedOperating manual, service manual, quick reference guide, test data, and power cordOptionsOpt. 001Phase lock/TCXO timebaseOpt. 106BenchLink Arb software (34811A)Opt. 1CM Rack Mount Kit (34190A)*Opt. W50Additional 2-year warranty (5-year total)Opt. 910Extra manual setManual language options (please specify one)ABA US EnglishABD GermanABE SpanishABF FrenchABJ JapaneseABZ ItalianABO Taiwan ChineseAB1 KoreanAccessoriesAgilent 34161A Accessory pouchAgilent 34811A BenchLink Arb software*For racking two side-by-side, order both items belowLock-link Kit (P/N 5061-9694)Flange Kit (P/N 5063-9212)Windows®is a U.S. registered trademark of Microsoft Corporation.Agilent Technologies’ Test and Measurement Support, Services, and AssistanceAgilent Technologies aims to maximize the value you receive, while minimizing your risk and problems. We strive to ensure that you get the test and measure-ment capabilities you paid for and obtain the support you need. Our extensive sup-port resources and services can help you choose the right Agilent products for your applications and apply them successfully. Every instrument and system we sell has a global warranty. Support is availablefor at least five years beyond the produc-tion life of the product. Two concepts underlie Agilent’s overall support policy:“Our Promise” and “Your Advantage.”Our Promise“Our Promise” means your Agilent test and measurement equipment will meet its advertised performance and functionality. When you are choosing new equipment, we will help you with product informa-tion, including realistic performance spec-ifications and practical recommendations from experienced test engineers. When you use Agilent equipment, we can verify that it works properly, help with product operation, and provide basic measurement assistance for the use of specified capabil-ities, at no extra cost upon request. Many self-help tools are available.Your Advantage“Your Advantage” means that Agilent offers a wide range of additional expert test and measurement services, which you can purchase according to your unique technical and business needs. Solve prob-lems efficiently and gain a competitive edge by contracting with us for calibration,extra-cost upgrades, out-of-warranty repairs, and on-site education and training, as wellas design, system integration, project man-agement, and other professional services. Experienced Agilent engineers and techni-cians worldwide can help you maximize your productivity, optimize the return on investment of your Agilent instruments and systems, and obtain dependable measure-ment accuracy for the life of those products. Get assistance with all yourtest and measurement needs at:/find/assistOr check your local phone book for the Agilent office near you.Product specifications and descriptions inthis document subject to change without notice. Copyright © 1998, 2000 Agilent Technologies Printed in U.S.A. 4/005968-0125EN。

(秦荻辉)科技英语写作

(秦荻辉)科技英语写作

第一节 词 类
中国 China 北京大学 Beijng University 西电大学 Xidian University 西北工业大学 the Northwestern Polytechnical University 计算机科学系 the Department of Computer Science
第一节 词 类
(2)论文的标题、书籍名称等的冠词可以省去。如: 锁相环的研究 Study of Phase-locked Loops 计算机入门 Introduction to Computers
第一节 词 类
(3)专有名词一般不加冠词。在科技文写作中,主要 涉及到的专有名词有人名、地名、单位名称和国 家名称。其中单位名称和国家名称需要注意以下 几点:一般由单个词表示的国家名称或一个地点 名词加“大学”构成的专有名称前不加冠词;由三个 或三个以上的普通单词构成的单位或国家名称前 要加定冠词(不过写在信封上或发表的论文作者下 面等场合时一般可不加冠词)。如:
第一节 词 类
2.数词在句子中作前置修饰语 (倍数;分数)+(the+名词;that+后置定语(多为“of 短语”);what从句) 这个电压是加给放大器的信号的80倍。
This voltage is 80 times the signal applied to the amplifier. 其速度为光速的十分之三。 Its speed is three tenths that of light.
第一节 词 类
(5)某些可数名词单数形式在泛指时可省去冠词。 欧姆首先发现了电流、电压、电阻之间的关系。 Ohm first discovered the relationship between current, voltage,and resistance. 晶体管是由发射极、基极和集电极三部分构成的。 A transistor consists of three parts:emitter, base and collector.

xr2206

xr2206

Pin #
Symbol
Type Description
1
AMSI
I
Amplitude Modulating Signal Input.
2
STO
O
Sine or Triangle Wave Output.
3
MO
O
Multiplier Output.
4
V CC
5
TC1
Positive Power Supply.
Operating Temperature Range
-55 C to +125 C ?0 C to +85 C
0C to +70 C 0C to +70 C
Rev. 1.03
1972
EXAR Corporation, 48720 Kato Road, Fremont, CA 94538 1
(510) 668-7000
Multiplier And Sine Shaper
Figure 1. XR-2206 Block Diagram
11 SYNCO
+1
2 STO
3M O
Rev. 1.03 2
XR-2206
AMSI 1
STO 2
MO 3
V CC
4
TC1 5
TC2 6
TR1 7 TR2 8
16 SYMA2 15 SYMA1 14 WAVEA2 13 WAVEA1 12 GND 11 SYNCO 10 BIAS 9 FSKI
...the analog plus companTyM
XR-2206
Monolithic
Function Generator

sine wave用法(一)

sine wave用法(一)

sine wave用法(一)Sine Wave用法概述Sine Wave(正弦波)是一种特殊的波形,可用于多种应用领域,包括音频信号处理、图像处理、物理模拟等。

它具有周期性、光滑等特点,因此在很多领域中经常被用到。

音频信号处理1.音乐合成:通过调整正弦波的频率、振幅、相位等参数,可以合成各种乐器的声音。

正弦波能够模拟乐器的基音和谐波,从而产生逼真的音色。

2.音调变换:通过改变正弦波的频率,可以实现对音频的音调变换。

例如,将频率加倍可以使音频的音调升高一个八度,相反则使其降低一个八度。

图像处理1.纹理生成:在计算机图形学中,正弦波被广泛用于生成各种纹理效果。

通过在空间中使用多个正弦波,可以创建出具有丰富、逼真的纹理效果,如木纹、水波等。

2.图像压缩:在某些图像压缩算法中,利用正弦波的周期性特点进行数据压缩。

通过对图像的各个部分进行正弦波变换,可以将图像信息表示为正弦波的系数。

这种方法可以有效地压缩图像,并在解压缩时还原出高质量的图像。

3.滤波处理:正弦波也可以用于图像的滤波处理。

通过对图像进行正弦波变换,并滤除某些频率分量,可以实现图像的模糊、锐化等特效处理。

物理模拟1.声学模拟:在声学领域中,正弦波被广泛用于声音的模拟和分析。

通过合成多个正弦波的叠加,可以模拟出各种复杂的声音效果,如人声、乐器声等。

2.震动模拟:正弦波也可以用于模拟物体的震动行为。

在物理仿真中,可以通过正弦波的振幅和频率来模拟物体的振动,如弹簧的振动、地震的波动等。

以上是正弦波在不同领域中的一些应用。

正弦波作为一种重要的数学工具,具有丰富的应用场景和广泛的实际价值。

在实际应用中,我们可以根据具体需求,利用正弦波的特性来实现各种功能和效果。

ST AN1712 应用笔记

ST AN1712 应用笔记

AN1712APPLICATION NOTEGENERATING A HIGH RESOLUTIONSINEWAVE USING ST7 PWMARTBy Microcontroller Division Applications INTRODUCTIONThe purpose of this application note is to present a software technique for generating a high resolution sinewave using ST7 PWMART, tunable in frequency and average amplitude. This application has been implemented using the ST72321J9 microcontroller. The PWMART (Au-toreload timer peripheral embedded in the microcontroller) is used to generate a PWM signal and this PWM signal is then filtered by low pass filter (simple RC circuit) to generate a sine-wave.Rev. 1.0 AN1712/03041/141GENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMART 1 GENERATING A SINUSOIDThis section highlights the main features of the ST7 PWMART used to generate a PWM signal which is then filtered by low pass filter (a simple RC circuit in this example) to generate a si-nusoid. Please refer to the ST7 datasheet for more details.The ST7 PWMART consists of an 8-bit auto reload counter with compare/capture capabilities and a 7-bit clock prescaler.1.1 PWM GENERATIONThe free running 8-bit counter is fed by the output of the prescaler, and is incremented on every rising edge of the clock signal. It is possible to read or write the contents of the counter on the fly by reading or writing the Counter Access register (ARTCAR). When a counter over-flow occurs, the counter is automatically reloaded with the contents of the ARTARR register (the prescaler is not affected).The counter clock frequency is given by:The timer counter’s input clock (f INPUT ) feeds the 7-bit programmable prescaler, which selects one of the 8 available taps of the prescaler, as defined by CC[2:0] bits in the ARTCSR Reg-ister. Thus the division factor of the prescaler can be set to 2n (where n = 0, 1,..7). This f INPUT frequency source is selected through the EXCL bit of the ARTCSR register and can be either the f CPU or an external input frequency f EXT . The clock input to the counter is enabled by the TCE (Timer Counter Enable) bit in the ARTCSR register. When TCE is reset, the counter is stopped and the prescaler and counter contents are frozen. When TCE is set, the counter runs at the rate of the selected clock source.The timer compare function is based on four different comparisons with the counter (one for each PWMx output). Each comparison is made between the counter value and an output com-pare register (OCRx) value. This OCRx register can not be accessed directly, it is loaded from the duty cycle register (PWMDCRx) at each overflow of the counter.This double buffering method avoids glitch generation when changing the duty cycle on the fly.PWM mode allows up to four Pulse Width Modulated signals to be generated on the PWMx output pins with minimum core processing overhead. This function is stopped during HALT mode. Each PWMx output signal can be selected independently using the corresponding OEx bit in the PWM Control register (PWMCR). When this bit is set, the corresponding I/O pin is 2CC[2:0]f INPUTf COUNTER =GENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMARTGENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMART 1.2 SINEWAVE GENERATIONAt the start of the program:– the PWMDCR0 register is initialized to obtain a 50% duty cycle– the number of samples in a sinewave cycle is defined– the counter reload value (ARTARR) is initializedIn the software provided with this application note, predefined initialization values for each fre-quency can be selected in the define.h file.More than 18 samples in a sinewave cycle should be selected to generate a sinewave with Total Harmonic Distortion of less than 5%. So, depending on the number of samples in a sin-ewave cycle, the duty cycle register (PWMDCR0) is modified, taking care that no 0% and 100% PWM is generated for any of the sinewave samples (because the PWM duty cycle must be between ~99% to ~1% to generate an undistorted sinewave). The PWM duty cycle is changed after a certain number (“COUNTER ”) of overflow cycles. So, the sinewave frequency depends on three parameters,– the PWM frequency (f PWM )– the number of samples in a sinewave cycle– the number of overflow cycles after which the PWM duty cycle changes (“COUNTER ”)So, the sinewave frequency can be given by:See also Figure 2.This PWM signal must be filtered with an external RC network selected for the filtering level re-quired to generate a sinusoid. The cut off frequency of low pass RC filter is given as:So, the value of R and C must be chosen in such a way that the output sinewave frequency should be less than this high cut off frequency (f H ).The instantaneous value of sinewave depends on the duty cycle of PWM. So:f SINE = 1t PWM * number of samples * COUNTERf H = 12 * pi * R * CV SINE max,min = Max, Min PWM duty cycle * V DDV SINE average = Average PWM duty cycle * V DDGENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMARTGENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMART2 IMPROVING SINEWAVE RESOLUTIONSinewave resolution depends on three factors:– t PWM– the number of samples in a sinewave cycle–“COUNTER” valueBy changing any of these parameters you can get a different resolution.If f COUNTER is fixed, you can only change t PWM by varying the ARTARR value. The minimum change you can do to ARTARR is 1. So, the minimum change in t PWM is t COUNTER. For ex-ample:If f COUNTER is 4 MHz and ARTARR value is 56, then t PWM is 50us. If the number of samples in a sinewave cycle is 40 and COUNTER is 10, f SINE will be 50 Hz.If you change the ARTARR value to 57, t PWM will change to 49.75us. So, f SINE will be ~50.25 Hz (assuming the number of samples and COUNTER value are fixed). So, the resolution is ~0.25 Hz.Now to improve resolution, change ARTARR = 36, COUNTER = 7 and number of samples in a sinewave cycle = 52.Assuming f COUNTER is still 4MHz, t PWM will be 55us. In this case f SINE will be 49.95 Hz, which gives improved resolution (~0.05Hz).GENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMART3 SOFTWARE CONFIGURATIONThe software is developed in “C” language and gives you the option of using the ST7 software library or not. A header file “define.h” is supplied. This header file defines the sin structure. The sin structure has the three user defined datatypes for storing sinewave patterns depending on the number of samples in a sinewave cycle, the “index” which is used for counting the current sinewave sample and another datatype which is used to indicate whether the current sample is related to the upper half or lower half of the sinewave. Depending on the number of samples in a sinewave cycle, sample values are initialized for the sinewave envelope (X(n)=Asin((2*pi*n)/N)). where A is the sinewave amplitude, pi is 3.1416, n is the n th sample of the sinewave, N is the number of samples in a sinewave cycle. N should be more than 18 in order to generate a sinewave with Total Harmonic Distortion of less than 5%. The value of A should be such that no 0% or 100% duty cycle is generated for any of the sinewave samples.There are other define types for the sinewave frequency from 45 to 65Hz with a resolution of less than 0.1Hz. These define types contain five parameters:–“no_of_samples_half” for defining the number of samples in half a sinewave cycle–“COUNTER” value which defines the number of overflow cycles after which the PWM duty cycle changes– Initialization value of ARTARR for f PWM,– Initialization value of PWMDCR0 a 50% duty cycle–“AVERAGE_AMP” to define the average sinewave amplitude.A si new a ve w i th a r es ol uti on of le ss t han 0.1H z is obtai ne d b y va ry i ng the “no_of_samples_half”, the “COUNTER” value and ARTARR. The average sinewave ampli-tude is also software configurable by the “AVERAGE_AMP” parameter.It should be noted that the value of A and the value of the “AVERAGE_AMP” is chosen in such a way that no 0% or 100% duty cycle is generated for any of the sinewave samples.3.1 SIN STRUCTURE INITIALIZATIONThe sin structure has the three user defined datatypes for storing the sinewave pattern ac-cording to the number of samples in a sinewave cycle, the “index” which is used for counting the current sinewave sample and another datatype which is used for indicating whether the current sample is related to the upper half or lower half of the sinewave.GENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMARTFigure 3. Loading of sample values and initialization of sin structureLoadValueIntoSinStructurLoad sample values (already defined)into value[no_of_samples_half] of sinstructure (the no of samples in half sinwave is already defined)Initialize Index=0Initialize sinewave for up-per halfreturn3.2 AUTO-RELOAD TIMER INITIALIZATIONThe counter is initialized by:– Writing to the ARTARR register to set the PWM frequency.– Setting the FCRL (Force Counter Re-Load), the TCE (Timer Counter Enable) and OIE (Over-flow Interrupt Enable) bits in the ARTCSR register.In this case, the f INPUT is CPU clock (f CPU)and f COUNTER = f INPUT (= 4MHz in this particular application).– Enable PWM0 and configure the polarity in the PWMCR register.– Initialize the PWMDCR0 register to define the PWM duty cycle.GENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMART Figure 4. PWMART timer initializationAR_TIMER_InitSet the frequency of PWMARTby initializing the ARTARRStart the PWM timer counter, forcecounter reload is ON & overflow interruptis enabledEnable PWM0 and con-figure the polarityInitialize the duty cycleof sinewave to 50%return3.3 PWMART INTERRUPT SERVICE ROUTINEThis is the interrupt service routine for the PWMART interrupt. Every time an overflow occurs, an interrupt is generated (because overflow interrupt is enabled). The PWMART duty cycle is changed after every “COUNTER” number of overflow cycles. The duty cycle can vary from ~99% to ~1% depending on the sinewave sample values.GENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMART Figure 5. PWMART interrupt service routineART_InterruptClears the overflow interrupt flagcounter = counter+1returnIs counter >=COUNTER?no yescounter = 0Upper half cycleof sinewave?Load the duty cycle register for up-per half cycle of sinewave. This isachieved by adding the current sam-ple value into AVERAGE_AMP.yes noLoad the duty cycle register for lowerhalf cycle of sinewave. This is achievedby subtracting the current sample valuefrom AVERAGE_AMP.Index = Index+1Is Index= no_of_samples_half?Index = 0 & change the po-larity of sinewave cycleyes no3.4 MAIN ROUTINEThe main routine calls LoadValueIntoSinStructur and AR_TIMER_Init. After this, the initializa-tion interrupts are enabled (RIM is executed) so that the microcontroller can go into the inter-rupt routine and an infinite while loop is called.Figure 6. Main routinemainLoadValueIntoSinStructurAR_TIMER_InitEnableInterrupts+While(1)4 HARDWARE CONFIGURATIONThis application runs on an ST72F321 microcontroller. The PWM0 channel is used to gen-erate the PWM signal which is then filtered by low pass filter (a simple RC circuit in this ex-ample) to generate a sinusoid. The R ext used is 1.8K and C ext is 0.47uf. The values of R ext and C ext decides the filtering level.The selected crystal for this example has a frequency of 8 MHz which gives f CPU = 4 MHz be-cause the PLL is disabled and slow mode is not selected. It gives the f COUNTER = 4 MHz for the reset value of Counter Clock Control bits in ARTCSR register.Figure 7. Generation of sinewave: Application circuitryST78 MHz PWM0/PB3/\/\/\/\/\/\R ext =1.8K V DD_0, V DD_1, V DD_2V DD V SS_0, V SS_1, V SS_227 pf 27 pfOSC1OSC2C ext =0.47 uf V PP /ICCSELC = 0.1 uf5 SOFTWAREAll the source files in “C” language with the option of using the ST7 software library or not (ST7 software library version 1.1) are given in the zip file with this application note.The source files are for guidance only. STMicroelectronics shall not be held liable for any di-rect, indirect or consequential damages with respect to any claims arising from use of this soft-ware.THE PRESENT NOTE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH A NOTE AND/OR THE USE MADE BY CUSTOMERS OF THE INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.”Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without express written approval of STMicroelectronics.The ST logo is a registered trademark of STMicroelectronics.All other names are the property of their respective owners© 2004 STMicroelectronics - All rights reservedSTMicroelectronics GROUP OF COMPANIESAustralia – Belgium - Brazil - Canada - China – Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan - Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States。

ATmega128A微控制器基于三相正弦波生成电路设计说明书

ATmega128A微控制器基于三相正弦波生成电路设计说明书

Design of the Sine Wave Generating Circuit Based on the ATmega128AMicrocontrollerJinYang Xia 1, a YanPing Wang*21.2Beijing institute of fashion technology, Chinaa Email :*****************Key words: ATmega128A; Sinusoidal Pulse Width Modulation; three -phase sine wave; zero point matching; phase controlAbstract. This paper mainly discussed how to generate three-phase sine wave by ATmega128A single chip microcomputer. The paper describes the principle of sine pulse width modulation and pulse width algorithm of SPWM wave in detail, briefly introduces the structure and the function of ATmega128A microcontroller, and describes the functional modules used in the lab in detail. The hardware part analyses several modules of the principle diagram of the circuit boards, describes the process of drawing PCB diagram and the design of the second order filter circuit. The software part is designed in detail based on the previous theory.IntroductionWith the development of inverter technology in various fields, researches on inverter control has become an important research topic. At present, it is widely used in the inverter power supply with sinusoidal pulse width modulation. For example, using the integrated circuit, is one of way to get the signal. SPWM control circuit is simple and easy control, but the feedback control of system can not be ignored.Sine Pulse Width Modulation PrincipleThe narrow pulse with the same impulse, but in different shapes, is basically the same as that in the process of inertia. According to the principle of equivalent area N, the amplitude of the rectangular pulse width waveform is consisting with equivalent sine wave. The frequency of PWM wave can be obtained by setting the frequency of sine wave:c pwm f N f ×= (1) The method of determining the pulse width ,with the intersection of a sine wave and a triangular wave, is called the natural sampling method. Figure1 is the intersection of sine wave and triangle wave, for the duration of the pulse width. AFC DEC ∆∆~ can be used to figure out the relation between triangle wave crest value and sine wave amplitude, by the:International Conference on Manufacturing Science and Engineering (ICMSE 2015)'2A )sin(wt 22t U U T U RM CM C CM += (2) In the same way:''2B )sin(wt 22t U U T U RM CM C CM += (3) The finishing:++=+=)sin (sin 212''2'22B A Cwt wt M T t t t (CM RMU U M =)(4)Figure 1. Natural sampling method for generating SPWM waveHardware Circuit PCB Board DesignThe whole process is :the new PCB file, into the PCB board editing interface, setting the PCB board for the four laminates, power layer segmentation, respectively, VCC and VDD. The PCB plate of the rectangular border will be drown and joined into the components and the network table, which includes component layout and circuit board wiring.After importing components and network table, all the components will be stacked together, and staying outside the PCB board. The layout of the components will not only affect the difficulty of the work of the following wiring, but also the actual situation of the circuit board. The layout of components is divided into two kinds of layout including automatic layout and manual layout. According to the actual situation, we need to carry out automatic layout, so the components are automatically distributed to the PCB board, which can speed up the layout of components. In order to save space, the patch capacitance and resistance are put on the bottom. And special attention should be paid to the capacitor line which can not be too long.Circuit board wiring is divided into automatic and manual routing. But after the automatic routing, circuit surface is always in disorder, not clean, and has mangy line bypass. So manual routing becomes the final choice. In the late period of circuit board wiring, the distribution of components is not reasonable, the way to solve this problem is to readjust the distribution of components, and increase the workload.Thus it can be seen that the distribution of components is very important to the premise. The final PCB design is shown in figure 2.Figure 2. PCB designSoftware DesignMain program design. The software programming part mainly includes: the main function, the port initialization function, the timer initialization function, the overflow interrupt function and the capture interrupt function.Port initialization: according to A Tmega128A microcontroller I/O port description, the pin I/O port register need to be set up, ensuring they can work normally. Three output pins are used as the output pin of the three SPWM wave, and one input pin is used as the 50HZ square wave input pin.Timer initialization: according to the results of the previous derivation, two 16-bit timer would be used in this experiment. The TOP value is 1240, and the ICR1 register can be selected to define the TOP value. At the same time, the OCR1A/B/C is used to output the PWM wave,and the ICR3 is used to capture interrupt. The registers, are required to configuration.Figure 3.Main program flow chartOverflow interrupt program design. The function of the overflow interrupt is to change thevalue of the output compare register. In the main function, the T1 overflow interrupt is accessible,and the total interrupt is accessible. When the counter value rises to the TOP value, T1 interruptflag would be set to 1, then entering the interrupt function, meanwhile T1 interrupt flagautomatically would be cleared to 0.Capture interrupt program design. The function of the capture interrupt is to achieve zeromatching, to realize phase shift detection, and to make the mark. In the timer initialization, T3 isset up as rising edge. Between the main function, the capture interrupt and the total interrupt areaccessible. Through pin ICP3, 50HZ square wave can be input, when a rising edge is captured,the input capture flag bits would be set as high level, the input capture can be carried out, and the interrupt flag is cleared automatically. In the interrupt function, the table pointer is forced to point at the first number, so that the first pulse width of the PWM wave in each cycle can correspond to the sine wave to achieve zero matching.The other two square wave are received by A1:0 pin, when entering the capture interrupt, the level of A pin can be read to estimate whether there is a phase change or not. If the value of A pin is 0x01, then the phase is not changed; if the value of A pin is 0x10, it indicats that the two square wave phase swaps. In the overflow interrupt, the level of A pin decides whether to exchange OCR1B and OCR1C's checking table pointer.Sine Wave GenerationAfter two - step filter, the SPWM wave is obviously asymmetric. There may be two reasons for the analysis: 1. The SPWM pulse width calculation has error; 2, the filtering parameter RC is not appropriate. Solution is to derivate the principle to the formula to confirm that the formula is not wrong. So the calculation must exist problems, and the problem should be the filter parameter design which is not appropriate. The second step ensures that the cut-off frequency is not modified, except the RC value and the capacity value. Thus, the sine wave would be shown on output screen which is same to Figure 4.Figure 4. Output sine waveConclusionWith a whole system design, I am familiar with the integrated development environment and the combined use of development environment, including programming, debugging and downloading. The system study covers the the process of the PWM wave of the timer / counter used in Atmega128A microcontroller, the process of the interrupt processing, and the understanding of the principle of the pulse width calculation formula. Through this experiment, I clearly recognize that my own shortcomings, in future works, and I will continue to work hard. AcknowledgmentThis work is supported by Beijing Institute of Fashion Technology Project support (NO.ZD-1407), all support is gratefully acknowledged.Reference[1] JianLiang Shen, WenHong Zhao, YuKun Jia, HuaDong Wang, KeJia Hu.ATmega128 MCU entry and improve.2009[2] ZengYang Leng, YiRong Xu. Power Electronics Technology (Third Edition). 2012[3] Mei Li, XiaoDong Han, Jie Zhang. Power electronics technology. 2012[4] Li Zhang, JingBo Zhao, Jiang Chang. Circuit design and plate making 99SE PROTEL from entry to the master. 2012[5] Lucien Ngalamou, Leary Myers. Digital SPWM synthesis for the design of single phase inverters. International Journal of Electronics.2008。

常用运放电路图及计算公式

常用运放电路图及计算公式

Op Array AmpCircuitCollectionAN-31TL H 7057Practical Differentiatorf c e12q R2C1f h e12q R1C1e12q R2C2f c m f h m f unity gainTL H 7057–9IntegratorV OUT e b1R1C1t2t1V IN dtf c e12q R1C1R1e R2For minimum offset error dueto input bias currentTL H 7057–10Fast IntegratorTL H 7057–11Current to Voltage ConverterV OUT e l IN R1For minimum error due tobias current R2e R1TL H 7057–12Circuit for Operating the LM101without a Negative SupplyTL H 7057–13Circuit for Generating theSecond Positive VoltageTL H 7057–14 2Neutralizing Input Capacitance to Optimize Response TimeC N sR1R2C S TL H 7057–15Integrator with Bias Current CompensationAdjust for zero integrator drift Current drift typically 0 1 n A C over b 55 C to 125 C temperature rangeTL H 7057–16Voltage Comparator for Driving DTL or TTL Integrated CircuitsTL H 7057–17Threshold Detector for PhotodiodesTL H 7057–18Double-Ended Limit DetectorV OUT e 4 6V for V LT s V IN s V UT V OUT e 0V forV IN k V LT or V IN l V UTTL H 7057–19Multiple Aperture Window DiscriminatorTL H 7057–203Offset Voltage Adjustment for Inverting AmplifiersUsing Any Type of Feedback Element RANGE e g VR2R1JTL H 7057–21Offset Voltage Adjustment for Non-Inverting AmplifiersUsing Any Type of Feedback ElementRANGE e g V R2R1JGAINe 1aR5R4a R2TL H 7057–22Offset Voltage Adjustment for Voltage Followers RANGE e g VR3R1JTL H 7057–23Offset Voltage Adjustment for Differential AmplifiersR2e R3a R4RANGE e g V R5R4J R1R1a R3JGAIN eR2R1TL H 7057–24Offset Voltage Adjustment for InvertingAmplifiers Using 10k X Source Resistance or LessR1e 2000R3U R4R4U R3s 10k X RANGE e g VR3U R4R1JTL H 7057–254SECTION2 SIGNAL GENERATIONLow Frequency Sine Wave Generator with Quadrature OutputTL H 7057–26 High Frequency Sine Wave Generator with Quadrature Outputf o e10kHzTL H 7057–275Free-Running Multivibrator Chosen for oscillation at 100HzTL H 7057–28Wein Bridge Sine Wave OscillatorR1e R2C1e C2 Eldema 1869f e12q R1C110V 14mA BulbTL H 7057–29Function GeneratorTL H 7057–30Pulse Width ModulatorTL H 7057–316Bilateral Current SourceI OUT e R3V IN R1R5R3e R4a R5R1e R2TL H 7057–32Bilateral Current SourceI OUT eR3V INR1R5R3e R4a R5R1e R2TL H 7057–33Wein Bridge Oscillator with FET Amplitude StabilizationR1e R2C1e C2f e12q R1C1TL H 7057–347Low Power Supply for Integrated Circuit TestingTL H 7057–35 V OUT e1V k XTL H 7057–91Positive Voltage ReferenceTL H 7057–36Positive Voltage ReferenceTL H 7057–37 8Negative Voltage Reference TL H 7057–38Negative Voltage ReferenceTL H 7057–39Precision Current Sink I O eV IN R1V IN t 0VTL H 7057–40Precision Current SourceTL H 7057–41SECTION 3 SIGNAL PROCESSINGDifferential-Input Instrumentation AmplifierR4R2e R5R3A V eR4R2TL H 7057–429Variable Gain Differential-Input Instrumentation AmplifierGain adjustA V e10b4R6TL H 7057–43 Instrumentation Amplifier with g100Volt Common Mode RangeR3e R4R1e R6e10R3A V e R7 R6Matching determines common R1e R5e10R2mode rejectionR2e R3TL H 7057–4410Instrumentation Amplifier with g10Volt Common Mode RangeR1e R4R2e R5R6e R7Matching Determines CMRRA V e R6R2 1a2R1R3JTL H 7057–45High Input Impedance Instrumentation AmplifierR1e R4 R2e R3A V e1a R1 R2Matching determines CMRRMay be deleted to maximize bandwidth TL H 7057–46Bridge Amplifier with Low Noise CompensationReduces feed through ofpower supply noise by20dBand makes supply bypassingunnecessaryTrim for best commonmode rejectionGain adjustTL H 7057–4711Bridge Amplifier R1R S1e R2R S2V OUT e V a1bR1R S1JTL H 7057–48Precision DiodeTL H 7057–49Precision Clamp E REF must have a source im-pedance of less than 200X if D2is usedTL H 7057–50Fast Half Wave RectifierTL H 7057–51Precision AC to DC ConverterFeedforward compensation can be used to make a fast full wave rectifier without a filter TL H 7057–52Low Drift Peak DetectorTL H 7057–5312Absolute Value Amplifier with Polarity Detector V OUT e b l V IN l c R2R1R2 R1eR4a R3R3TL H 7057–54Sample and HoldPolycarbonate-dielectric capacitorTL H 7057–55Sample and HoldWorst case drift less than2 5mV secTeflon Polyethylene or PolycarbonateDielectric CapacitorTL H 7057–5613Low Drift IntegratorTL H 7057–57Q1and Q3should not have internal gate-protection diodes Worst case drift less than 500m V sec over b 55 C to a 125 CFast Summing Amplifier with Low Input CurrentTL H 7057–58In addition to increasing speed the LM101A raises high and low frequency gain increases output drive capability and eliminates thermal feedbackPower Bandwidth 250kHzSmall Signal Bandwidth 3 5MHz Slew Rate 10V m sC5e6c 10b 8R f14Fast Integrator with Low Input CurrentTL H 7057–59Adjustable Q Notch Filterf O e12q R1C1e 60HzR1e R2e R3C1e C2e C23TL H 7057–6015Easily Tuned Notch Filter R4e R5R1e R3R4e R1f O e12q R40C1C2TL H 7057–61Tuned Circuitf O e12q0R1R2C1C2TL H 7057–62Two-Stage Tuned Circuitf O e12q0R1R2C1C2TL H 7057–6316Negative Capacitance MultiplierC e R2R3C1I L e V OS a R2I OSR3R S e R3(R1a R IN) R IN A VOTL H 7057–65Variable Capacitance MultiplierC e 1a R b R a J C1TL H 7057–66Simulated InductorL t R1R2C1R S e R2R P e R1TL H 7057–67Capacitance MultiplierC eR1R3C1I L eV OS a I OS R1R3R S e R3TL H 7057–68 17High Pass Active FilterTL H 7057–71Values are for100Hz cutoff Use metalized polycarbonate capacitors for good temperature stabilityLow Pass Active FilterTL H 7057–72 Values are for10kHz cutoff Use silvered mica capacitors for good temperature stabilityNonlinear Operational Amplifier with Temperature Compensated BreakpointsTL H 7057–7318Current MonitorV OUT e R1R3 R2I LTL H 7057–74Saturating Servo Preamplifier withRate FeedbackTL H 7057–75 Power BoosterTL H 7057–7619Analog MultiplierR5e R1 V b10JV1t0V OUT e V1V210TL H 7057–77Long Interval TimerLow leakage b0 017m F per second delayTL H 7057–78Fast Zero Crossing DetectorTL H 7057–79 Propagation delay approximately200nsDTL or TTL fanout of threeMinimize stray capacitancePin8Amplifier for Piezoelectric TransducerLow frequency cutoff e R1C1TL H 7057–80Temperature ProbeSet for0V at0 CAdjust for100mV CTL H 7057–81 20Photodiode AmplifierV OUT e R1I DTL H 7057–82Photodiode AmplifierV OUT e10V m ATL H 7057–83 Operating photodiode with less than3mVacross it eliminates leakage currentsHigh Input Impedance AC FollowerTL H 7057–84Temperature Compensated Logarithmic Converter1k X(g1%)at25 C a3500ppm CAvailable from Vishay UltronixGrand Junction CO Q81SeriesDetermines current for zerocrossing on output 10m Aas shownTL H 7057–8510nA k I IN k1mASensitivity is1V per decade21R o o t E x t r a c t o r2N 3728m a t c h e d p a i r sT L H 7057–8622Multiplier DividerTL H 7057–87 Cube GeneratorTL H 7057–8823A N -31O p A m p C i r c u i t C o l l e c t i o nFast Log Generator1k X (g 1%)at 25 C a 3500ppm CAvailable from Vishay Ultronix Grand Junction CO Q81SeriesTL H 7057–89Anti-Log Generator1k X (g 1%)at 25 C a 3500ppm CAvailable from Vishay Ultronix Grand Junction CO Q81SeriesTL H 7057–90LIFE SUPPORT POLICYNATIONAL’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF NATIONAL SEMICONDUCTOR CORPORATION As used herein 1 Life support devices or systems are devices or 2 A critical component is any component of a life systems which (a)are intended for surgical implant support device or system whose failure to perform can into the body or (b)support or sustain life and whose be reasonably expected to cause the failure of the life failure to perform when properly used in accordance support device or system or to affect its safety or with instructions for use provided in the labeling can effectivenessbe reasonably expected to result in a significant injury to the userNational Semiconductor National Semiconductor National Semiconductor National Semiconductor CorporationEuropeHong Kong LtdJapan Ltd1111West Bardin RoadFax (a 49)0-180-530858613th Floor Straight Block Tel81-043-299-2309十种精密全波整流电路图中精密全波整流电路的名称,纯属本人命的名,只是为了区分;除非特殊说明,增益均按1设计.图1是最经典的电路,优点是可以在电阻R5上并联滤波电容.电阻匹配关系为R1=R2,R4=R5=2R3;可以通过更改R5来调节增益图2优点是匹配电阻少,只要求R1=R2图3的优点是输入高阻抗,匹配电阻要求R1=R2,R4=2R3图4的匹配电阻全部相等,还可以通过改变电阻R1来改变增益.缺点是在输入信号的负半周,A1的负反馈由两路构成,其中一路是R5,另一路是由运放A2复合构成,也有复合运放的缺点.图5 和 图6 要求R1=2R2=2R3,增益为1/2,缺点是:当输入信号正半周时,输出阻抗比较高,可以在输出增加增益为2的同相放大器隔离.另外一个缺点是正半周和负半周的输入阻抗不相等,要求输入信号的内阻忽略不计图7正半周,D2通,增益=1+(R2+R3)/R1;负半周增益=-R3/R2;要求正负半周增益的绝对值相等,例如增益取2,可以选R1=30K,R2=10K,R3=20K图8的电阻匹配关系为R1=R2图9要求R1=R2,R4可以用来调节增益,增益等于1+R4/R2;如果R4=0,增益等于1;缺点是正负半波的输入阻抗不相等,要求输入信号的内阻要小,否则输出波形不对称.图10是利用单电源运放的跟随器的特性设计的,单电源的跟随器,当输入信号大于0时,输出为跟随器;当输入信号小于0的时候,输出为0.使用时要小心单电源运放在信号很小时的非线性.而且,单电源跟随器在负信号输入时也有非线性.图7,8,9三种电路,当运放A1输出为正时,A1的负反馈是通过二极管D2和运放A2构成的复合放大器构成的,由于两个运放的复合(乘积)作用,可能环路的增益太高,容易产生振荡.精密全波电路还有一些没有录入,比如高阻抗型还有一种把A2的同相输入端接到A1的反相输入端的,其实和这个高阻抗型的原理一样,就没有专门收录,其它采用A1的输出只接一个二极管的也没有收录,因为在这个二极管截止时,A1处于开环状态.结论:虽然这里的精密全波电路达十种,仔细分析,发现优秀的并不多,确切的说只有3种,就是前面的3种. 图1的经典电路虽然匹配电阻多,但是完全可以用6个等值电阻R实现,其中电阻R3可以用两个R 并联.可以通过R5调节增益,增益可以大于1,也可以小于1.最具有优势的是可以在R5上并电容滤波.图2的电路的优势是匹配电阻少,只要一对匹配电阻就可以了.图3的优势在于高输入阻抗.其它几种,有的在D2导通的半周内,通过A2的复合实现A1的负反馈,对有些运放会出现自激. 有的两个半波的输入阻抗不相等,对信号源要求较高.两个单运放型虽然可以实现整流的目的,但是输入\输出特性都很差.需要输入\输出都加跟随器或同相放大器隔离.各个电路都有其设计特色,希望我们能从其电路的巧妙设计中,吸取有用的.例如单电源全波电路的设计,复合反馈电路的设计,都是很有用的设计思想和方法,如果能把各个图的电路原理分析并且推导每个公式,会有受益的.最后的结论供大家在电路设计的时候参考.。

LabVIEW练习题

LabVIEW练习题

LabVIEW 课程设计题目LabVIEW 课程设计题目包括:“基础题”和“设计题”两大部分。

未曾选修过“虚拟仪器技术”的同学仅需完成“基础题”部分;选修过“虚拟仪器技术”的同学在完成“基础题”部分内容的基础上,必须选做“设计题”之一内容。

第一部分 基础题(必做)1、用LabVIEW 的基本运算函数编写以下算式的程序代码:()()321.82.738112531782;635316831007625102257281÷−×++×+−+÷−×+ 2、利用摄氏温度与华氏温度的关系9/)32(5−=°°F C 编写一个程序,求华氏温度(F °)为,32°,64°,4°,6.98°,6°,104°,212°时的摄氏温度。

3、创建一个2行3列的二维数组控制件,为数组成员赋值如下: 00.600.500.400.300.200.14、用数组创建函数创建一个二维数组显示件,成员为:321654216543165432654321 编程将上述创建的数组转置为:3216216516546543543243215、创建一个簇控制件,成员分别为字符型控制件姓名,数值型控制件学号,布尔型控制件注册。

从这个簇控制件中提取出簇成员注册,显示在前面板上。

6、创建一个字符串显示件,程序运行后显示当前系统日期、时间和自己的班级、姓名。

7、将范围0—10的5个随机数转换为一个字符串显示在前面板上,要求保留2位小数,每个数之间用逗号分隔。

8、用for 循环产生4行100列二维数组,数组成员如下:1,2,3 (100)100,99,98 (1)6,7,8 (105)105,104,103 (6)从这个数组中提取出2行50列的二维数组,成员如下:50,49,48 (1)56,57,58 (105)将这两个数组用数组显示件显示在前面板上。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Wein Bridge
1 Hz–1 MHz
0 01
LC Negative Resistance Tuning Fork
1 kHz–10 MHz
1–3
3
60 Hz–3 kHz
0 25
0 01
Crystal TriangleDriven BreakPoint Shaper TriangleDriven Logarithmic Shaper DAC-Driven Logarithmic Shaper ROM-Driven DAC
30 kHz–200
k 1 Hz–500 kHz
01 1–2
1 1
k 1 Hz–500 kHz
03
0 25
k 1 Hz–500 kHz
03
0 25
1 Hz–20 MHz
01
0 01
LOW DISTORTION OSCILLATION In many applications the distortion levels of a phase shift oscillator are unacceptable Very low distortion levels are provided by Wein bridge techniques In a Wein bridge stable oscillation can only occur if the loop gain is maintained at unity at the oscillation frequency In Figure 2a this is achieved by using the positive temperature coefficient of a small lamp to regulate gain as the output attempts to vary This is a classic technique and has been used by numerous circuit designers to achieve low distortion The smooth lim-
National Semiconductor Application Note 263 March 1981
shift configuration and oscillates at about 12 kHz The remaining circuitry provides amplitude stability The high impedance output at Q2’s collector is fed to the input of the LM386 via the 10 mF-1M series network The 1M resistor in combination with the internal 50 kX unit in the LM386 divides Q2’s output by 20 This is necessary because the LM386 has a fixed gain of 20 In this manner the amplifier functions as a unity gain current buffer which will drive an 8X load The positive peaks at the amplifier output are rectified and stored in the 5 mF capacitor This potential is fed to the base of Q3 Q3’s collector current will vary with the difference between its base and emitter voltages Since the emitter voltage is fixed by the LM313 1 2V reference Q3 performs a comparison function and its collector current modulates Q1’s base voltage Q1 an emitter follower provides servo controlled drive to the Q2 oscillator If the emitter of Q2 is opened up and driven by a control voltage the amplitude of the circuit output may be varied The LM386 output will drive 5V (1 75 Vrms) peak-to-peak into 8X with about 2% distortion A g 3V power supply variation causes less than g 0 1 dB amplitude shift at the output
Type
Comments
Phase Shift
Simple inexpensive technique Easily amplitude servo controlled Resistively tunable over 2 1 range with little trouble Good choice for cost-sensitive moderateperformance applications Quick starting and settling Extremely low distortion Excellent for high-grade instrumentation and audio applications Relatively difficult to tune requires dual variable resistor with good tracking Take considerable time to settle after a step change in frequency or amplitude Difficult to tune over wide ranges Higher Q than RC types Quick starting and easy to operate in high frequency ranges Frequency-stable over wide ranges of temperature and supply voltage Relatively unaffected by severe shock or vibration Basically untunable Highest frequency stability Only slight (ppm) tuning possible Fragile Wide tuning range possible with quick settling to new frequency or amplitude Wide tuning range possible with quick settling to new frequency or amplitude Triangle and square wave also available Excellent choice for general-purpose requirements needing frequency-sweep capability with low-distortion output Similar to above but DAC-generated triangle wave generally easier to amplitude-stabilize or vary Also DAC can be addressed by counters synchronized to a master system clock Powerful digital technique that yields fast amplitude and frequency slewing with little dynamic error Chief detriments are requirements for high-speed clock (e g 8-bit DAC requires a clock that is 256 c output sine wave frequency) and DAC glitching and settling which will introduce significant distortion as output frequency increases
AN-263
C1995 National Semiconductor Corporation
TL H 7483
RRD-B30M115 Printed in U S A
Sine-Wave-Generation Techniques Typical Frequency Range 10 Hz–1 MHz Typical Distortion (%) 1–3 Typical Amplitude Stability (%) 3 (Tighter with Servo Control) 1
TL H 7483 – 1
FIGURE 1 Phase-shift sine wave oscillators combine simplicity with versatility This 12 kHz design can deliver 5 Vp-p to the 8X load with about 2% distortion
Sine Wave Generation Techniques
Sine Wave Generation Techniques
相关文档
最新文档