FFT Spectrum Analyzer

Similar documents
Tunable Wideband Receiver (TWB) Data Processing Description December, 2013

RC Filters TEP Related Topics Principle Equipment

Calculation of the received voltage due to the radiation from multiple co-frequency sources

Multichannel Frequency Comparator VCH-315. User Guide

Revision of Lecture Twenty-One

Multipath Propagation. Outline. What is OFDM? (OFDM) for Broadband Communications and. Orthogonal Frequency Division Multiplexing

Walsh Function Based Synthesis Method of PWM Pattern for Full-Bridge Inverter

Uncertainty in measurements of power and energy on power networks

High Speed ADC Sampling Transients

A study of turbo codes for multilevel modulations in Gaussian and mobile channels

A High-Sensitivity Oversampling Digital Signal Detection Technique for CMOS Image Sensors Using Non-destructive Intermediate High-Speed Readout Mode

Fast Code Detection Using High Speed Time Delay Neural Networks

FPGA Implementation of Ultrasonic S-Scan Coordinate Conversion Based on Radix-4 CORDIC Algorithm

VRT014 User s guide V0.8. Address: Saltoniškių g. 10c, Vilnius LT-08105, Phone: (370-5) , Fax: (370-5) ,

To: Professor Avitabile Date: February 4, 2003 From: Mechanical Student Subject: Experiment #1 Numerical Methods Using Excel

THE USE OF CONVOLUTIONAL CODE FOR NARROWBAND INTERFERENCE SUPPRESSION IN OFDM-DVBT SYSTEM

NATIONAL RADIO ASTRONOMY OBSERVATORY Green Bank, West Virginia SPECTRAL PROCESSOR MEMO NO. 25. MEMORANDUM February 13, 1985

Section 5. Signal Conditioning and Data Analysis

Space Time Equalization-space time codes System Model for STCM

Digital Transmission

MTBF PREDICTION REPORT

The Performance Improvement of BASK System for Giga-Bit MODEM Using the Fuzzy System

Rejection of PSK Interference in DS-SS/PSK System Using Adaptive Transversal Filter with Conditional Response Recalculation

29. Network Functions for Circuits Containing Op Amps

DESIGN OF OPTIMIZED FIXED-POINT WCDMA RECEIVER

antenna antenna (4.139)

In-system Jitter Measurement Based on Blind Oversampling Data Recovery

Impact of Interference Model on Capacity in CDMA Cellular Networks. Robert Akl, D.Sc. Asad Parvez University of North Texas

High Speed, Low Power And Area Efficient Carry-Select Adder

ITU-T O.172. Amendment 1 (06/2008)

MASTER TIMING AND TOF MODULE-

Performance Analysis of Multi User MIMO System with Block-Diagonalization Precoding Scheme

Inverse Halftoning Method Using Pattern Substitution Based Data Hiding Scheme

Hardware Design of Filter Bank-Based Narrowband/Wideband Interference Canceler for Overlaid TDMA/CDMA Systems

Design and Implementation of DDFS Based on Quasi-linear Interpolation Algorithm

Design of on-line PH monitoring system based on ZigBee technology

Understanding the Spike Algorithm

Design of an FPGA based TV-tuner test bench using MFIR structures

DESIGN OF OPTIMIZED FIXED-POINT WCDMA RECEIVER

Efficient Large Integers Arithmetic by Adopting Squaring and Complement Recoding Techniques

Model mismatch and systematic errors in an optical FMCW distance measurement system

aperture David Makovoz, 30/01/2006 Version 1.0 Table of Contents

Adaptive Modulation for Multiple Antenna Channels

Multicarrier Modulation

IIR Filters Using Stochastic Arithmetic

A High-Speed Multiplication Algorithm Using Modified Partial Product Reduction Tree

Parameter Free Iterative Decoding Metrics for Non-Coherent Orthogonal Modulation

Detection and parameters interception of a radar pulse signal based on interrupt driven algorithm

Secure Transmission of Sensitive data using multiple channels

The Application of Interpolation Algorithms in OFDM Channel Estimation

Figure.1. Basic model of an impedance source converter JCHPS Special Issue 12: August Page 13

INSTANTANEOUS TORQUE CONTROL OF MICROSTEPPING BIPOLAR PWM DRIVE OF TWO-PHASE STEPPING MOTOR

Chapter 13. Filters Introduction Ideal Filter

Optimal Placement of PMU and RTU by Hybrid Genetic Algorithm and Simulated Annealing for Multiarea Power System State Estimation

Research on Peak-detection Algorithm for High-precision Demodulation System of Fiber Bragg Grating

Monitoring large-scale power distribution grids

IEE Electronics Letters, vol 34, no 17, August 1998, pp ESTIMATING STARTING POINT OF CONDUCTION OF CMOS GATES

TECHNICAL NOTE TERMINATION FOR POINT- TO-POINT SYSTEMS TN TERMINATON FOR POINT-TO-POINT SYSTEMS. Zo = L C. ω - angular frequency = 2πf

Prevention of Sequential Message Loss in CAN Systems

AFV-P 2U/4U. AC + DC Power Solutions. series. Transient Generation for Disturbance Tests. only. High Performance Programmable AC Power Source

Effect of Time-Interleaved Analog-to-Digital Converter Mismatches on OFDM Performance

California, 4 University of California, Berkeley

Calculation model for SFN reception and reference receiver characteristics of ISDB-T system

A New Type of Weighted DV-Hop Algorithm Based on Correction Factor in WSNs

An Efficient Method for PAPR Reduction of OFDM Signal with Low Complexity

Wi-Fi Indoor Location Based on RSS Hyper-Planes Method

Performance Testing of the Rockwell PLGR+ 96 P/Y Code GPS receiver

Keywords LTE, Uplink, Power Control, Fractional Power Control.

Harmonic Balance of Nonlinear RF Circuits

Analysis of Time Delays in Synchronous and. Asynchronous Control Loops. Bj rn Wittenmark, Ben Bastian, and Johan Nilsson

POLYTECHNIC UNIVERSITY Electrical Engineering Department. EE SOPHOMORE LABORATORY Experiment 1 Laboratory Energy Sources

熊本大学学術リポジトリ. Kumamoto University Repositor

EVALUATION OF SINE WAVE TESTS OF ADC'S FROM WINDOWED DATA

Design of Shunt Active Filter for Harmonic Compensation in a 3 Phase 3 Wire Distribution Network

1 GSW Multipath Channel Models

Passive Filters. References: Barbow (pp ), Hayes & Horowitz (pp 32-60), Rizzoni (Chap. 6)

A Simple Satellite Exclusion Algorithm for Advanced RAIM

Performance Analysis of the Weighted Window CFAR Algorithms

LP-BLIT: BANDLIMITED IMPULSE TRAIN SYNTHESIS OF LOWPASS-FILTERED WAVEFORMS

High Performance Integer DCT Architectures For HEVC

A Comparison of Two Equivalent Real Formulations for Complex-Valued Linear Systems Part 2: Results

A Robust Feature Extraction Algorithm for Audio Fingerprinting

CELL SEARCH ROBUST TO INITIAL FREQUENCY OFFSET IN WCDMA SYSTEMS

Development of virtual instrument motor experiment teaching system based on LabVIEW

TWO-TANK LIQUID LEVEL CONTROL USING A BASIC STAMP MICROCONTROLLER AND A MATLAB-BASED DATA ACQUISITION AND CONTROL TOOLBOX

A Proposal of Mode Shape Estimation Method Using Pseudo-Modal Response : Applied to Steel Bridge in Building

ROBUST IDENTIFICATION AND PREDICTION USING WILCOXON NORM AND PARTICLE SWARM OPTIMIZATION

Fault Classification and Location on 220kV Transmission line Hoa Khanh Hue Using Anfis Net

FPGA Implementation of Fuzzy Inference System for Embedded Applications

NOVEL ITERATIVE TECHNIQUES FOR RADAR TARGET DISCRIMINATION

LSPIHT Algorithm for ECG Data Compression and Transmission for Telemedicine Applications

Performance Analysis of Power Line Communication Using DS-CDMA Technique with Adaptive Laguerre Filters

Robust Filter Design based on Generalized Maximum-Likelihood Estimation

Multiple Error Correction Using Reduced Precision Redundancy Technique

Dynamic Optimization. Assignment 1. Sasanka Nagavalli January 29, 2013 Robotics Institute Carnegie Mellon University

* wivecrest Corporation 1715 Technology Dr., Suite 400 Saq Jose, CA w avecrestcorp. corn

A Fuzzy-based Routing Strategy for Multihop Cognitive Radio Networks

Markov Chain Monte Carlo Detection for Underwater Acoustic Channels

PRACTICAL, COMPUTATION EFFICIENT HIGH-ORDER NEURAL NETWORK FOR ROTATION AND SHIFT INVARIANT PATTERN RECOGNITION. Evgeny Artyomov and Orly Yadid-Pecht

DVB-T/H Digital Television Transmission and its Simulation over Ricean and Rayleigh Fading Channels

Transcription:

THE ANNUAL SYMPOSIUM OF THE INSTITUTE OF SOLID MECHANICS SISOM 22 BUCHAREST May 16-17 ---------------------------------------------------------------------------------------------------------------------------------------- FFT Spectrum Analyzer Authors: Eng. Mha Ncolae Newgate Desgn SRL Dr. Eng. Ioan Rugna Insttutute of Sold Mechancs; e-mal ncolaem@rol.ro; rugna@mecsol.ro Abstract The avalablty of low cost and powerful computers (such as IBM PC or compatble) has led to the development of economcal laboratory nstruments based around the PCs. Our am here s to combne the graphcs capablty of the IBM PC wth the hgh speed numercal processng power of the Texas Instruments TMS32C25 dgtal sgnal processor, to produce an economcal laboratory spectrum analyzer. The analyzer s requred to take an analogue nput, to dgtze and calculate ts spectrum usng FFT algorthm, and to dsplay the spectrum on the IBM PC montor. In future, t s ntended to develop the system further and use t as a general-purpose real-tme sgnal analyzer. 1. Introducton A conceptual block dagram of the spectrum analyzer s depcted n Fgure 1. The analyzer performs N-pont radx-2 FFTs on one of two nput data, calculates the power spectrum densty and transmts ths to the IBM PC through an RS232C lnk. A C language program on the PC receves and dsplays the spectrum. All the numercal computatons assocated wth spectrum estmatons are performed by the TMS32C25 processor. In the next few sectons, we wll descrbe the features of the analyzer, the spectrum estmaton technques used, and the analyzer hardware and software. 149

Analogue nput (ch1) Lowpass Flter ADC wth sample+ hold 12 N-pont FFT processor TMS32C25 Magntude squared Averagng To PC Analogue nput (ch2) Lowpass Flter ADC wth sample+ hold 12 Fg. 1. Conceptual block dagram of the FFT spectrum analyzer 2. Features of the Analyzer The FFT analyzer conssts of a TMS 32 C25-based board connected to an IBM PC or compatble, and a PC-resdent software package for dsplayng the sgnal spectrum. The man features of the analyzer are as follows: Dual analogue nput channels, each wth 12-bt ADC; Samplng rate per channel < 4kHz; Estmates power spectrum densty of sgnals n the frequency range -1 khz usng the FFT algorthm; Seral communcaton wth a host personal computer va an RS232 port; Dsplay of sgnal spectrum on a PC usng the host s graphcs facltes. Although not mplemented at the present, the analyzer can readly support multvarable analyss (for example cross-spectrum, cross-correlaton) and the dsplay of nput sgnals n tme. 3. Spectrum Estmaton n the Analyzer The spectrum analyzer uses radx-2 FFT algorthm to convert a tme doman data nto frequency. The FFT algorthm takes N data samples, x(n), n=,1,,n-1, and produces N-pont complex frequency samples, X(k), k=,1,,n-1. The raw power spectrum densty (PSD) s then obtaned as the scaled magntude squared of complex frequency samples: S(k) = (1/N) X(k) 2 = (1/N){Re[X(k) 2 ] + Im[X(k) 2 ]} k=,1,,n/2 (1) where N s a number of data ponts. 15

x(n) T 2 4 6 8 1 12 14 16 18 2 22 24 26 n (L-1) (2L-1) (3L-1) x1(n) x2(n) x3(n) x4(n) x5(n) x6(n) Fg. 2. An llustraton of sub sectonng of data wth 5% overlap and secton length, L=8. The PSD gves a measure of the dstrbuton of the average power of the sgnal over frequency. For random or nosy data, drect computaton of the power spectrum as n Equaton 1 may not yeld good spectrum estmates because of random errors. To obtan consstent estmates n the PSD some form of averagng s normally used at some stage n the estmaton process, for example correlaton or frequency averagng. In the analyzer, we employed a method due to Welch (1967). In the Welch method, the nput data sequence (x(n),n=,1,,n-1) whose spectrum s to be estmated s frst dvded nto K overlappng segments each of length L. For example, for a 5% overlap the data segments are (see Fgure 2) x (n) = x[n+l/2], n=,1,, L-1; =,1,,K-1 (2) The transform, X (k), and the raw power spectrum, S (k), of each data segment are then obtaned as L 1 n= X ( k) = w( n) x ( n) exp( j2π nk), k=,1,,l-1 (3) 151

1 S ( k) X ( k) LQ 2 =, k =,1,, L/2 (4) where w(n) are the values of a sutable wndow functon, for example the Hammng wndow, x (n) s the th data segment, and Q s the wndow energy defned as Q = 1 1 L N n= 2 w ( n) The average of the raw PSD estmates gves the desred smooth PSD estmate of the data sequence, x(n): K 1 K 1 1 1 2 S ( k) = S ( k) = X ( k), k=,1,2,,l/2 (6) K KLQ = = The values of X (k) n Equaton 3 are of course obtaned the FFT for effcency. To mprove the spectral clarty of S(k), the length, L, of each data segment may be extended, after wndowng, to say L+R by addng R zeros, and FFT of the zero padded sequences then obtaned. In the analyzer eght data segments were used. The segment length, L, was fxed at 128 data ponts (that s no zeros were added) and the overlap between segments was kept constant at half the segment length. The nput data sequence x(n) whose PSD s to be estmated s derved by samplng an analogue sgnal at a frequency, F s, consstent wth the samplng theorem F s >2f max ; F s =1/T, where T s the samplng nterval and f max the hghest frequency n the analogue sgnal. When we transform x(n) nto frequency as descrbed above, the frequency spacng, f, between the frequency components s gven by: f=1/lt (7) Ths s the effectve resoluton of the FFT. For the analyzer, L=128, and the maxmum samplng frequency, F s = 4 khz, gvng a resoluton < 312.5 Hz. (5) 4. Analyzer Hardware The block dagram of the system hardware s shown n Fgure 3. Ant-alasng flterng at the nput s achved usng a second-order Butterworth flter for smplcty. Usng ths low-order ant-alasng flter means that the samplng frequency should be suffcently hgh to keep the effects of alasng low. 152

Wat states and address decodng Program Program Data 8kx16 EPROM 8kx16 RAM 8kx16 RAM Seral port UART C25 ADC Antalasng buffer Gan control buffer A-A15 D-D15 Analogue nput Fg. 3. PC-based FFT spectrum analyzer hardware The program memory stores the FFT twddle factors, precomputed sne and cosne values, as well as the wndow coeffcents, w(n), n Equaton 3. The nput data samples, x(n), are stored frst n the external data memory, and each block of data to be transferred to the nternal memory and stored n a complex format (that s, as real and magnary); see the map for data storage n Fgure 4. The FFT s performed n place. The spectrum analyzer board passes the spectrum estmates to the IBM PC for dsplay through the seral port. The TMS32C25 target board meets all the analyzer hardware specfcatons and so was used to mplement the analyzer. 5. Analyzer Software The analyzer software conssts of a set of TMS32C25 assembly language programs for computng the PSD values and transferrng these to the PC, and a C language program resdent on the PC for dsplayng the power spectrum. 5.1 TMS32C25 programs The TMS32C25 programs carry out the followng operatons. 1. Collect N data ponts, x(n), from the ADC (at present, N=576) and save n the external data RAM. 2. Dvde the N data ponts nto eght overlappng segments, 128 data ponts each (Equaton 2) 3. For each data segment perform the followng operatons: Wndow the data usng a Hammng wndow x (n) = x (n)w(n), n=,1,,127 153

Transfer the wndowed data nto the nternal RAM block B1, and store as real and magnary; Perform a 128-pont, n-place FFT on the data segment; Compute the raw PSD (Equaton 4); Save raw PSD n external RAM. 4. Average the raw PSD for all segments (Equaton 6) 5. Transfer averaged PSD to the PC. B 512 x() x(1) x(2) x(3) B1 768 x() x(1) x(126) x(127) 639 x(127) 123 Real Complex Temporary data data storage Fg. 4. On-chp data storage for the analyzer The TMS32C25 code, wrtten for the Texas Instruments assembler, conssts of a man program, four subroutnes, and an nterrupt servce routne as follows: man routne, PSD ntalzaton, nterrupt servce routne, data collecton, PSD estmaton, data transfer. Some of the programs are descrbed brefly below. PSD ntalzaton The PSD ntalzaton routne supplements the system ntalzaton n the boot program. It s major role s to prepare the hardware for PSD computatons. It performs the followng operatons: confgure on-chp memory block B as RAM, ntalze nternal data memores blocks B, B1, and B2 wth zero, program the tmer for the correct samplng frequency, unmask tmer nterrupt, enable the tmer nterrupt. Programmng the tmer nvolves loadng the 16-bt perod regster (PRD), data memory locaton 3, wth an approprate value to set up the samplng frequency: F s =F clk /N, where F s s the samplng frequency, F clk s the TMS32C25 CLKOUT frequency, whch s 1MHz, and N s a 16-bt unsgned nteger loaded nto the PRD regster. To generate a 4 khz samplng frequency, the PRD s loaded wth 25. 154

Data collecton After PSD ntalzaton, the processor branches to the data collecton subroutne where t goes nto the dle state and wats untl the tmer nterrupt occurs. On nterrupt, the processor jumps to the nterrupt servce routne and ssues a start of converson (SOC) command to the ADC s by togglng the external flag, XF. The processor then returns to the data collecton subroutne and wats for the end of the converson (EOC) sgnal from the ADC s by testng for the BIO lne to go low. When the EOC s receved the data s read from the 12-bt ADC and stored n the external data RAM n Q15 format by left shftng the data four places before t s stored n external data memory (only the channel 1 ADC s used for the PSD estmaton). The processor returns to the man routne when 576 consecutve data samples have been collected. Power spectrum densty estmaton The FFT s the heart of the PSD estmaton. It s a radx-2, 128-pont, decmaton n frequency (DIF) algorthm based on the mplementaton n Texas Instruments (1986). For each data segment, the PSD routne ntalzes memory blocks B and B1 wth zero and then moves the data from the external memory to the nternal memory block B. The data s wndowed by multplyng each data sample by an approprate wndow coeffcent and then transferred to the on-chp memory, block B1, where t s strored n a complex form. The real data samples are stored n even addresses, startng at address 768. The odd address locatons, whch contan zeros, represent the magnary parts; see Fgure 4. The complex data s then FFTed, n place, and ts raw PSD computed. The raw PSDs for the segments are then averaged to obtan a smooth PSD. Data transfer The averaged PSD s transferred to the PC, va the seral nterface, wth each averaged PSD value represented as 2 bytes. 5.2 IBM PC dsplay software The smple C language program on the PC reads the averaged PSD values from the analyzer hardware and dsplays t on the screen. When the program s frst executed a menu s dsplayed requestng the user to select an opton: 1 - dsplay power spectrum densty; 2 - save and dsplay PSD; 3 - read PSD from dsk and dsplay; 4 - zoom; 5 ext. If opton 1 or 2 s selected, control s passed to the man program n the analyzer, whch computes the PSD and transfers t to the PC as descrbed above. For opton1, the PSD s dsplayed. For opton 2, the PSD values are frst saved on the dsk n a user-specfed fle, 155

before the PSD s dsplayed. For opton3, the C program frst reads the PSD from dsk and then dsplays t. For opton 4, the user s asked to specfy the frequency range of nterest, and the selected regon of the current dsplay s then expanded accordngly. Selectng opton 5 returns the user to the operatng system. 6. Usng the Analyzer Fgures 5.a and 5.b show examples of the PSD of, respectvely, 1 khz square wave and a 2 khz sne wave. At present the analyzer s used only for power estmaton. It can be extended to perform other sgnal analyss or used n other applcatons, for example frequency response estmaton, auto- and cross spectral analyss of nosy or random sgnals, convoluton or correlaton n the frequency doman, cross-spectral densty, magntude coherence and tme doman dsplay. The data from the analyzer hardware may also be sent to the PC n varous forms for further processng and/or dsplay, for example as : raw data, real and magnary, and magntude and phase. Magntude 21 189 168 147 126 15 15 84 63 42 21 (a) 1 2 3 4 5 6 7 8 91 11 khz Magntude 21 189 168 147 126 15 15 84 63 42 21 (b) 1 2 3 4 5 6 7 8 91 11 khz Fg. 5. (a) Frequency spectrum for 1 khz square wave sgnal. (b) Frequency spectrum for a 2kHz sne wave sgnal References 1. The Scentst and Engneer's Gude to Dgtal Sgnal Processng - Steven W. Smth 2. Dgtal Sgnal Processng A practcal Approach Emmanuel C. Ifeachor Addson- Wesley 156