FPGA Implementation of a Digital Tachometer with Input Filtering

Similar documents
Speed Measurement Method for Digital Control System

CHAPTER III THE FPGA IMPLEMENTATION OF PULSE WIDTH MODULATION

FPGA Implementation of Digital Modulation Techniques BPSK and QPSK using HDL Verilog

FPGA Implementation of a PID Controller with DC Motor Application

INTRODUCTION. In the industrial applications, many three-phase loads require a. supply of Variable Voltage Variable Frequency (VVVF) using fast and

IMPLEMENTATION OF QALU BASED SPWM CONTROLLER THROUGH FPGA. This Chapter presents an implementation of area efficient SPWM

CHAPTER 5 NOVEL CARRIER FUNCTION FOR FUNDAMENTAL FORTIFICATION IN VSI

A Novel Approach For the Design and Implementation of FPGA Based High Speed Digital Modulators Using Cordic Algorithm

CHAPTER 4 FUZZY BASED DYNAMIC PWM CONTROL

SIMULATION AND IMPLEMENTATION OF LOW POWER QPSK ON FPGA Tushar V. Kafare*1 *1( E&TC department, GHRCEM Pune, India.)

Simulation and Experimental Based Four Switch Three Phase Inverter Fed Induction Motor Drive

IMPROVED DIGITAL SPEED MEASUREMENT METHOD

REALIZATION OF FPGA BASED Q-FORMAT ARITHMETIC LOGIC UNIT FOR POWER ELECTRONIC CONVERTER APPLICATIONS

Speed Control of BLDC Motor Using FPGA

BPSK Modulation and Demodulation Scheme on Spartan-3 FPGA

MEASURING PHYSICAL DIMENSIONS WITH LASER BEAM AND PROGRAMMABLE LOGIC

Hardware/Software Co-Simulation of BPSK Modulator and Demodulator using Xilinx System Generator

Abstract of PhD Thesis

Method We follow- How to Get Entry Pass in SEMICODUCTOR Industries for 2 nd year engineering students

Single Chip FPGA Based Realization of Arbitrary Waveform Generator using Rademacher and Walsh Functions

dspic30f Quadrature Encoder Interface Module

CHAPTER 4 FIELD PROGRAMMABLE GATE ARRAY IMPLEMENTATION OF FIVE LEVEL CASCADED MULTILEVEL INVERTER

The Application of System Generator in Digital Quadrature Direct Up-Conversion

EXPERIMENT 1: INTRODUCTION TO THE NEXYS 2. ELEC 3004/7312: Signals Systems & Controls EXPERIMENT 1: INTRODUCTION TO THE NEXYS 2

BPSK System on Spartan 3E FPGA

EFFICIENT FPGA IMPLEMENTATION OF 2 ND ORDER DIGITAL CONTROLLERS USING MATLAB/SIMULINK

Implementation of Digital Modulation using FPGA with System Generator

FPGA Implementation of Wallace Tree Multiplier using CSLA / CLA

BPSK_DEMOD. Binary-PSK Demodulator Rev Key Design Features. Block Diagram. Applications. General Description. Generic Parameters

An Optimized Design for Parallel MAC based on Radix-4 MBA

PID Implementation on FPGA for Motion Control in DC Motor Using VHDL

Digital Logic ircuits Circuits Fundamentals I Fundamentals I

THE DESIGN OF A PLC MODEM AND ITS IMPLEMENTATION USING FPGA CIRCUITS

FPGA & Pulse Width Modulation. Digital Logic. Programing the FPGA 7/23/2015. Time Allotment During the First 14 Weeks of Our Advanced Lab Course

Automated Generation of Built-In Self-Test and Measurement Circuitry for Mixed-Signal Circuits and Systems

Implementation of Digital Communication Laboratory on FPGA

Single Chip Velocity Measurement System for Incremental Optical Encoders

Design of Multiplier Less 32 Tap FIR Filter using VHDL

REAL TIME IMPLEMENTATION OF FPGA BASED PULSE CODE MODULATION MULTIPLEXING

Synthesis and Analysis of 32-Bit RSA Algorithm Using VHDL

Development of Timer Core Based on 82C54 Using VHDL

Design and implementation of a Motor Incremental Shaft Encoder

A Low Power VLSI Design of an All Digital Phase Locked Loop

Implementation and Comparison of Low Pass FIR Filter on FPGA Using Different Techniques

Design and Implementation of 4-QAM Architecture for OFDM Communication System in VHDL using Xilinx

Application Note: Pulse and Direction for the Position and Velocity Commands

Comparative Analysis of Various Adders using VHDL

Hardware Implementation of BCH Error-Correcting Codes on a FPGA

Farid Alidoust Aghdam 1 and Siamak Saeidi Haghi Introduction. 2. Microstepping Driver Structure

FIR Filter Design on Chip Using VHDL

Beam Forming Algorithm Implementation using FPGA

II. BASIC ENHANCEMENT OPERATION

A HARDWARE DC MOTOR EMULATOR VAGNER S. ROSA 1, VITOR I. GERVINI 2, SEBASTIÃO C. P. GOMES 3, SERGIO BAMPI 4

International Journal for Research in Applied Science & Engineering Technology (IJRASET) RAAR Processor: The Digital Image Processor

Digital Controller Chip Set for Isolated DC Power Supplies

Fast Fourier Transform utilizing Modified 4:2 & 7:2 Compressor

An Optimized Direct Digital Frequency. Synthesizer (DDFS)

Implementation of Huffman Decoder on Fpga

DYNAMICALLY RECONFIGURABLE PWM CONTROLLER FOR THREE PHASE VOLTAGE SOURCE INVERTERS. In this Chapter the SPWM and SVPWM controllers are designed and

A Dynamic Reconcile Algorithm for Address Generator in Wimax Deinterleaver

Signal Processing and Display of LFMCW Radar on a Chip

An Efficient Method for Implementation of Convolution

Digital Fundamentals. Introductory Digital Concepts

International Journal of Scientific and Technical Advancements ISSN:

Simulation and Implementation of FPGA based three phase BLDC drive for Electric Vehicles

Real-Time Testing Made Easy with Simulink Real-Time

Generation of Gaussian Pulses using FPGA for Simulating Nuclear Counting System

Anitha R 1, Alekhya Nelapati 2, Lincy Jesima W 3, V. Bagyaveereswaran 4, IEEE member, VIT University, Vellore

Rapid Design of FIR Filters in the SDR- 500 Software Defined Radio Evaluation System using the ASN Filter Designer

Discontinued IP. IEEE e CTC Decoder v4.0. Introduction. Features. Functional Description

The Comparative Study of FPGA based FIR Filter Design Using Optimized Convolution Method and Overlap Save Method

Field Programmable Gate Arrays based Design, Implementation and Delay Study of Braun s Multipliers

FPGA Based Implementation of Sinusoidal PWM for Induction Motor Drive Applications

Ultrasonic Signal Processing Platform for Nondestructive Evaluation

Design and Simulation of 16x16 Hybrid Multiplier based on Modified Booth algorithm and Wallace tree Structure

FPGA Implementation of QAM and ASK Digital Modulation Techniques

FPGA Realization of Gaussian Pulse Shaped QPSK Modulator

FPGA-BASED CONTROL SYSTEM OF AN ULTRASONIC PHASED ARRAY

Anju 1, Amit Ahlawat 2

Hardware/Software Co-Simulation of BPSK Modulator Using Xilinx System Generator

From Antenna to Bits:

DESIGN OF INTELLIGENT PID CONTROLLER BASED ON PARTICLE SWARM OPTIMIZATION IN FPGA

Safety Mechanism Implementation for Motor Applications in Automotive Microcontroller

Field Programmable Gate Array Implementation and Testing of a Minimum-phase Finite Impulse Response Filter

Mehmet SÖNMEZ and Ayhan AKBAL* Electrical-Electronic Engineering, Firat University, Elazig, Turkey. Accepted 17 August, 2012

Design and synthesis of FPGA for speed control of induction motor

Undefined Obstacle Avoidance and Path Planning

When to use an FPGA to prototype a controller and how to start

SERVO MOTOR CONTROL TRAINER

JDT LOW POWER FIR FILTER ARCHITECTURE USING ACCUMULATOR BASED RADIX-2 MULTIPLIER

Operation of Separately Excited Switched Reluctance Generator

Design of Low power Reconfiguration based Modulation and Demodulation for OFDM Communication Systems

DIRECT DIGITAL SYNTHESIS BASED CORDIC ALGORITHM: A NOVEL APPROACH TOWARDS DIGITAL MODULATIONS

Implementation of Parallel Multiplier-Accumulator using Radix- 2 Modified Booth Algorithm and SPST

Software Design of Digital Receiver using FPGA

Design and Implementation of Scalable Micro Programmed Fir Filter Using Wallace Tree and Birecoder

νµθωερτψυιοπασδφγηϕκλζξχϖβνµθωερτ ψυιοπασδφγηϕκλζξχϖβνµθωερτψυιοπα σδφγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκ χϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµθ

FPGA IMPLEMENTATION OF SAMPLED SPACE VECTOR PULSE WIDTH MODULATION TECHNIQUE FOR TWO LEVEL INVERTER S. NAGESWARI 1 Dr.V.

DIGITAL SYSTEM DESIGN WITH VHDL AND FPGA CONTROLLER BASED PULSE WIDTH MODULATION

INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET)

Transcription:

FPGA Implementation of a Digital Tachometer with Input Filtering Daniel Mic, Stefan Oniga Electrical Department, North University of Baia Mare Dr. Victor Babeş Street 62 a, 430083 Baia Mare, Romania danmic@ubm.ro, onigas@ubm.ro Abstract This paper presents and compares two methods of FPGA implementation of a digital tachometer with input filtering and forward/reverse detection. Within first method, usually used in low speed range,, the elapsed time between two successive pulses is counted. With the second method usually recommended in high speed range, pulses coming from an encoder are counted in a fixed period of time. In this paper it will be proved that using an FPGA circuit, working at the right frequency, the first method of speed measuring can be adequate for all speed range. The digital tachometer will be implemented into XC3S200 FPGA circuit and will be used for closing the velocity loop for a brushless DC motor. 1. INTRODUCTION The tachometer is an essential part of motor velocity closed loop control. The role of this device is to measure the frequency of pulses train coming from an optical encoder mounted on the motor shaft and to convert the result in speed information. There are known methods to determine the speed of a drive using digital tachometers. Next will be presented the two most commonly used: first is based on measuring the elapsed time between two successive pulses and the second is based on counting the pulses during an established period of time. The last method is also known as CET method (Constant Elapsed Time) [2]. In this paper two types of digital tachometers will be implemented using FPGA (Field Programmable Gate Array) circuits, based on previous presented methods. Performances of both types of digital tachometers will be tested in a speed closed loop control of a brushlees DC (BLDC) motor. The digital designing environment Xilinx ISE and the toolbox System Generator from Matlab are used for simulation and implementation [7]. 2. DIGITAL TACHOMETER METHOD I For hardware implementation of digital tachometer based on measuring the elapsed time between two successive pulses, two blocks will be designed, see figure 1. First of them gives the interface with the optical encoder and it also filters the signals. The second block takes the filtrated signal and determines the value of speed. In figure 1 it can be noticed signals Ea, Eb that come from the encoder. Based on these signals a pulses train is generated (signal PT) for the measurement block. A signal that indicates the direction in which the motor shaft moves is also generated. Fig. 1 Digital Tachometer blocks The interface block is designed using state diagrams, see truth tables shown in table 1. State diagram shown in figure 2 generates pulse train PT, based on quadrature signals coming from the encoder and it also filtrates unwanted states. The signal Dir that indicates direction is generated based on Ea, Eb sequences. From the state diagram VHDL code is ISBN 978-973-713-188-1 170

generated and an HDL co-simulation is also performed. [3], [5]. States Ea Eb S0 0 0 S1 0 1 S2 1 1 S3 1 0 Dir = 0 States Ea Eb S0 0 0 S4 1 0 S5 1 1 S6 0 1 Dir = 1 Tab 1. Truth table for interface block Tcodif 1 60 1 count _ enc = = * T 500 9 FPGA Vrpm 20 *10 (3) 60 1 6 const. = * = 6 *10 500 9 20 *10 (4) const. 6.000.000 V rpm = = count _ enc count _ enc (5) where: f codif the frequency of the signal from the optical encoder; T codif the period of time of the signal from the optical encoder; count_enc the counted time elapsed between two successive pulses; T FPGA FPGA working frequency, 20x10-9 s; V rpm the speed of motor, measured in rpm. The block for speed measure is described in VHDL and needs to implement the division from equation (5), so that using Core Generator utility an IP core division block is generated. This block is adequate for an optimized implementation into FPGA. Fig 2. State diagram based on truth tables The second building block of the digital tachometer computes the shaft speed of the motor. The computation algorithm was described in VHDL based on diagram shown in figure 3. According to this diagram the time elapsed between two successive pulses is to be counted, the obtained value count_enc is used in equation (5). The constant value from equation (5) was obtained considering that the optical encoder used for these experiments gives 500 pulses/rotation [1] and the sample rate was selected to be equal with FPGA working frequency (20 ns), see equations (1,2,3). Vrpm f codif = 500 * (1) 60 1 60 Tcodif = = (2) f 500 * V codif rpm Fig. 3. Frequency to speed conversion algorithm Because of the high value of the sample rate measure error is minimum. In figure 4 is shown the error distribution in rpm, it can be noticed that depends by motor speed range. For speeds under 2500 rpm the error is zero and then gradually increase so that at a speed of 8000 rpm it becomes 10 rpm. The error is due to rounding, the speed measure module described in VHDL works only with integers. The error is computed as difference between the computed value and the measured value. In the reference [3] an error of 1-2 rad/s (9-19rpm) in high-speed range is considered acceptable. So that a digital tachometer ISBN 978-973-713-188-1 171

with a maximum error of 10 rpm at a speed of 8000 rpm can be considered as having good precision. Fig. 4. Error distribution depending on speed range Fig. 5. Hardware co-simulation waveforms for only one signal acquired from the optical encoder Functional simulation of the digital tachometer was accomplished using ModelSim simulator integrated in Xilinx ISE digital designing environment. 2.1 FPGA implementation results Two FPGA implementation was accomplished, one optimized for speed (41% occupied resources) a division takes place in one period of clock and the other optimized for area (19% occupied resources), a division takes place in 4 periods of clock. 2.2 Hardware co-simulation results During the last time, it became possible to make functional simulation for projects, already implemented in hardware, this type of simulation is known as hardware in the loop (HIL) simulation, see [3], [4], [5]. Figure 5 shows a HIL simulation of a speed control system with a digital tachometer acquiring only one signal from the optical encoder. It can be noticed that for a high sample rate (20 ns) there are a lot of spikes, that is way it is mandatory to acquire both encoder signals and filter the unwanted values like in diagram presented in figure 2. In figure 6 the filtrated signal is presented. Both the reference speed and the speed read by the tachometer are shown in figure 6. Due to the small error of tachometer the signals appears overlapped. Fig. 6. Hardware co-simulation waveforms for filtrated signal (PT) acquired from the optical encoder 2.3 Experimental results Figure 7 shows signals Eb and PT captured from the oscilloscope. It can be noticed that for a frequency around of 16.5 khz, the computed speed is 2000 rpm, according to equations (1-5). Fig. 7. Filtrated signal PT and optical encoder acquired signal (Eb) for a speed of 2000 rpm ISBN 978-973-713-188-1 172

3. DIGITAL TACHOMETER METHOD II The second version of digital tachometer implemented in hardware is based on so called CET method that consists in pulses counting during an established period of time. Besides speed measurement this module also integrates conversion blocks, binary to BCD and BCD to seven segments that allow displaying the results of computed speed. This version of digital tachometer is totally described in VHDL. From figure 8, it can be noticed that the tachometer is made up from three blocks. First of them (enc_interface) works at 1 khz and during an established period of time counts the pulses coming from the encoder. Every one second, the refreshing period, the counting result together with a start signal is transmitted next to the binary to BCD conversion block (bin_to_bcd). The BCD to seven segments block (bcd_to_7seg) besides conversion also allows signals multiplexing for 7-segment displays from the Spartan 3 testing board made by Digilent. Fig. 8. RTL architecture of digital tachometer based on CET method VHDL description of first module is based on algorithm shown in figure 9 and it can be noticed that this module is made up from counters. Counter 1 (count1) establishes the period of time of 1 second. Another counter (count2) counts the 500 pulses corresponding to one complete revolution for the encoder, counter count5 keeps the number of complete revolutions carried on one second. Counter count4 is used to minimize the counting error caused by rounding. This counter keeps with approximation the value for uncompleted revolutions that take place in 1 second. Results of functional simulation and measurement error determination Figure 10 shows the functional simulation waveforms of the digital tachometer based on CET method. It can be noticed that for a computed speed of 7400 rpm the displayed value is 7396. The error comes from count4 that counts with a step of 8 a number of 62 steps. Figure 11 shows the error distribution obtained as difference between the ideal value and the computed value of count4. Fig. 9. CET method implementation algorithm. ISBN 978-973-713-188-1 173

Fig.10. Functional simulation waveforms of digital tachometers based on CET method REFERENCES [1] Agilent Technologies, Threee Channel Optical Incremental Encoder Modules, Technical Data, February 2002; Fig. 11. Error distribution for digital tachometer based on CET method Implementation took place in XC3s200 Xilinx FPGA Spartan family. The consumed resources were around 5% and the maximum working frequency is around 250 MHz. 4. CONCLUSIONS Take into account good dynamic performances and small measurement error it can be concluded that a competitive digital tachometer was successfully implemented into an FPGA circuit, especially the version based on first method. In order to have good precision the first method-based tachometer must work at high frequency especially for motors that runs in high-speed range. It was a good approach to accomplish the implementation into an FPGA circuit that works at 50 MHz, that giving the opportunity for closing the control loop of high-speed BLDC motors. Due to poor dynamic performances but having good precisions that does not depend by speed, digital tachometer based on CET method, together with adequate converters, can be implemented in user interface modules. [2] Galvan E., Torralba A., Franquelo L., ASIC Implementation of a Digital Tachometer with High Precision in Wide Speed Range, IEEE Transactions on Industrial Electronics, vol. 43, no. 6, 1996; [3] Mic D., Micu E., Oniga S., Hardware and Software Co- Design Method for Implementation of Closed Loop Control for Brushless DC Motor, Proceedings of 10th International Conference on Optimization of Electrical and Electronic Equipments OPTIM 06, 2006, Braşov, Romania, vol. 3 pp. 59-66; [4] Visser P. Groothuis M, and others, FPGA as versatile configurable I/O devices in Hardware in the Loop Simulation, RTSS Lisbon, December 2004; [5] Xilinx Inc., - Nabeel Shirazi, Jonathan Ballagh, Put Hardware in the Loop with Xilinx System Generator for DSP, Fall 2003; [6] Xilinx Inc., Spartan-3 FPGA Family, Complete Data Sheet, DS099, 2006; [7] Xilinx Inc., System Generator for DSP (www.xilinx.com). ISBN 978-973-713-188-1 174