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

Similar documents
CHAPTER 4 FUZZY BASED DYNAMIC PWM CONTROL

CHAPTER-III MODELING AND IMPLEMENTATION OF PMBLDC MOTOR DRIVE

Speed Control of BLDC Motor Using FPGA

A COMPARISON STUDY OF THE COMMUTATION METHODS FOR THE THREE-PHASE PERMANENT MAGNET BRUSHLESS DC MOTOR

Design of double loop-locked system for brush-less DC motor based on DSP

Actuators. EECS461, Lecture 5, updated September 16,

Speed control of sensorless BLDC motor with two side chopping PWM

Step vs. Servo Selecting the Best

Digital Control of Permanent Magnet Synchronous Motor

Comparative analysis of speed decoding algorithms for rotary incremental encoders

CHAPTER 6 CURRENT REGULATED PWM SCHEME BASED FOUR- SWITCH THREE-PHASE BRUSHLESS DC MOTOR DRIVE

Lab Exercise 9: Stepper and Servo Motors

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE

CHAPTER 4 CONTROL ALGORITHM FOR PROPOSED H-BRIDGE MULTILEVEL INVERTER

CIS009-2, Mechatronics Signals & Motors

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

6.111 Lecture # 19. Controlling Position. Some General Features of Servos: Servomechanisms are of this form:

CURRENT FOLLOWER APPROACH BASED PI AND FUZZY LOGIC CONTROLLERS FOR BLDC MOTOR DRIVE SYSTEM FED FROM CUK CONVERTER

ADS9850 Signal Generator Module

ISSN Vol.05,Issue.01, January-2017, Pages:

TRACK VOLTAGE APPROACH USING CONVENTIONAL PI AND FUZZY LOGIC CONTROLLER FOR PERFORMANCE COMPARISON OF BLDC MOTOR DRIVE SYSTEM FED BY CUK CONVERTER

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

Design of an electronic platform based on FPGA-DSP for motion control applications

Page ENSC387 - Introduction to Electro-Mechanical Sensors and Actuators: Simon Fraser University Engineering Science

Renewable Energy Based Interleaved Boost Converter

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

MEM01: DC-Motor Servomechanism

An Optimized Direct Digital Frequency. Synthesizer (DDFS)

Upgrading from Stepper to Servo

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

Simulation of Solar Powered PMBLDC Motor Drive

TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. LIST OF TABLES LIST OF FIGURES LIST OF SYMBOLS AND ABBREVIATIONS

SPEED CONTROL OF BRUSHLES DC MOTOR

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

PART 2 - ACTUATORS. 6.0 Stepper Motors. 6.1 Principle of Operation

ME375 Lab Project. Bradley Boane & Jeremy Bourque April 25, 2018

Robot Actuators. Motors and Control. Stepper Motor Basics. Increased Resolution. Stepper motors. DC motors AC motors. Physics review: Nature is lazy.

Sensors and Sensing Motors, Encoders and Motor Control

Control Design for Servomechanisms July 2005, Glasgow Detailed Training Course Agenda

Design of a Simulink-Based Control Workstation for Mobile Wheeled Vehicles with Variable-Velocity Differential Motor Drives

IN MANY industrial applications, ac machines are preferable

Motor control using FPGA

UG Student, Department of Electrical Engineering, Gurunanak Institute of Engineering & Technology, Nagpur

Introduction to BLDC Motor Control Using Freescale MCU. Tom Wang Segment Biz. Dev. Manager Avnet Electronics Marketing Asia

MSK4310 Demonstration

630 IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. 9, NO. 2, MAY 2013

Speed Measurement Method for Digital Control System

Feedback Devices. By John Mazurkiewicz. Baldor Electric

Design Applications of Synchronized Controller for Micro Precision Servo Press Machine

Sensors and Sensing Motors, Encoders and Motor Control

Swinburne Research Bank

Implementing a Kalman Filter on FPGA Embedded Processor for Speed Control of a DC Motor Using Low Resolution Incremental Encoders

Detect stepper motor stall with back EMF technique (Part 1)

Model-Based Design for Medical Applications. Rob Reilink, M.Sc Ph.D

FPGA implementation of Induction Motor Vector Control using Xilinx System Generator

3.1.Introduction. Synchronous Machines

Microcontroller Based Closed Loop Speed and Position Control of DC Motor

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

L E C T U R E R, E L E C T R I C A L A N D M I C R O E L E C T R O N I C E N G I N E E R I N G

GE420 Laboratory Assignment 8 Positioning Control of a Motor Using PD, PID, and Hybrid Control

Understanding RC Servos and DC Motors

Volume 1, Number 1, 2015 Pages Jordan Journal of Electrical Engineering ISSN (Print): , ISSN (Online):

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY EEE 402 : CONTROL SYSTEMS SESSIONAL

Teaching Mechanical Students to Build and Analyze Motor Controllers

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

Comparative Study of PID and Fuzzy Controllers for Speed Control of DC Motor

Using Magnetic Sensors for Absolute Position Detection and Feedback. Kevin Claycomb University of Evansville

Closed Loop Magnetic Levitation Control of a Rotary Inductrack System. Senior Project Proposal. Students: Austin Collins Corey West

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

Methodology for testing a regulator in a DC/DC Buck Converter using Bode 100 and SpCard

Latest Control Technology in Inverters and Servo Systems

Where: (J LM ) is the load inertia referred to the motor shaft. 8.0 CONSIDERATIONS FOR THE CONTROL OF DC MICROMOTORS. 8.

3. What is the difference between Switched Reluctance motor and variable reluctance stepper motor?(may12)

Effective Teaching Learning Process for PID Controller Based on Experimental Setup with LabVIEW

Design and synthesis of FPGA for speed control of induction motor

Fuzzy Logic Based Speed Control of BLDC Motor

MEGA Servo setup procedure for driving PMS motor

PWM, ALT, HALT, HAST.

Analog Devices: High Efficiency, Low Cost, Sensorless Motor Control.

FPGA Implementation of a PID Controller with DC Motor Application

Validation of Frequency- and Time-domain Fidelity of an Ultra-low Latency Hardware-in-the-Loop (HIL) Emulator

BLuAC5 Brushless Universal Servo Amplifier

FPGA high efficiency, low noise pulse frequency space vector modulation--part I

Efficiency Optimized Brushless DC Motor Drive. based on Input Current Harmonic Elimination

INF3430 Clock and Synchronization

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

Design and implementation of Open & Close Loop Speed control of Three Phase Induction Motor Using PI Controller

Real-time Math Function of DL850 ScopeCorder

Shaft encoders are digital transducers that are used for measuring angular displacements and angular velocities.

Experiment#6: Speaker Control

DC Motor Speed Control using LabVIEW FPGA Modeling, Control Algorithm Simulation & Implementation

Automotive Control Solution for Brushless DC Motors

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

Glossary. Glossary Engineering Reference. 35

Lecture 3, Handouts Page 1. Introduction. EECE 353: Digital Systems Design Lecture 3: Digital Design Flows, Simulation Techniques.

DC SERVO MOTOR CONTROL SYSTEM

Shenzhen Alpha Inverter Co., Ltd. AS100 AC Servo Drive

Lab 23 Microcomputer-Based Motor Controller

DMCode-MS(BL) MATLAB Library

Administrative Notes. DC Motors; Torque and Gearing; Encoders; Motor Control. Today. Early DC Motors. Friday 1pm: Communications lecture

Transcription:

A HARDWARE DC MOTOR EMULATOR VAGNER S. ROSA 1, VITOR I. GERVINI 2, SEBASTIÃO C. P. GOMES 3, SERGIO BAMPI 4 Abstract Much work have been done lately to develop complex motor control systems. However they always rely on a physical drive/motor/encoder setup for experimental results. This paper presents a hardware DC motor emulator that can be synthesized to FPGAs. The emulator is intended to replace an actual DC motor during the development phase of motor controllers. A torque based input is required and incremental encoder output is provided, so this model can replace both the DC motor, and its power driver without modifications to the motor control system. The proposed emulator is able to reach a clock frequency of hundreds of megahertz and uses very few logic resources in current FPGA technologies. The hardware can be parameterized at synthesis time to make the model suitable for specific needs. Key-words: DC MOTOR; Emulator; FPGA; Hardware INTRODUCTION The advance in the microelectronics industry in recent years led to the availability of high performance processors, memory and logic in small packages and 1 Computational Sciences Center, Federal University of Rio Grande, vsrosa@inf.ufrgs.br 2 Computational Sciences Center, Federal University of Rio Grande, gervini@gmail.com 3 Mathematics and Phisics Institute, Federal University of Rio Grande, sebastiaogomes@furg.br 4 Informatics Institute, Federal University of Rio Grande do Sul, bampi@inf.ufrgs.br Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 5

at low cost. This advance allowed the design of motor controllers with sophisticated algorithms that are best performing than classical PID designs. When designing a motor controller the specification of a realtime computer is needed. This computer has to meet a set of requirements such as computational speed, memory, and interrupt interval among others. During the development phase, is important to have a system that is flexible enough to support changes required by control laws. Moreover, in the development phase of a motor control system the motor itself and its power driver are usually required to close the control loop. In some designs, several motors and drivers are required to evaluate the motor control system. Bugs in the control law, software, or hardware during the development phase can easily damage the power driver or the motor itself. In this paper we propose a hardware brushed DC motor emulator to be used in the development phase of motor controllers. The motor model employed is very simple and does not implement electromagnetic or friction losses. The emulator is implemented in VHDL and can be synthesized to FPGA. The input is a digital valued torque and the output is a two phase incremental encoder. The model is designed to run in hardware at a discrete clock speed much higher than the control law (hundreds of megahertz), so that even small delays due to real-time system or the control law computation can be catch and simulated by the model. This paper is organized as follows. In section II a related work on this subject is presented. Section III present the proposed model and its hardware implementation in Section IV. Section V present implementation results. Finally Section VI presents the conclusions of this work. RELATED WORK Several works are found in the literature on the motor modelling subject [1-3]. Some of these are for brushed DC motors, but none deal with the problem of realtime simulation of brushed DC motors for the purpose of replacing an actual motor during the development phase. The work of [2] presents the closest approach found to the current work with a DSP-ASIC approach for this purpose, but the kind of motor considered is induction AC. Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 6

PROPOSED MODEL A motor system composed by the DC motor, a power drive and a incremental encoder is modelled in this work. A typical brushed DC motor is showed in Figure 1. Fig. 1 A brushed DC motor with incremental encoder coupled in the motor shaft. The scope of the proposed emulator is presented in Figure 2. The system model is capable of emulating the DAC and driver, the brushed DC motor and a incremental encoder connected to the output shaft of the motor, providing a complete solution to completely eliminating the motor setup during the development phase of the motor controller. Fig. 2 Proposed hardware model scope. a) Brushed DC motor model Brushed DC motors usually have stator with magnets and a wounded rotor. The rotor coils are connected to a commutator that receive the electric input by means of a pair of carbon based brushes. The typical DC motor model is presented in Figure 3. Fig. 3 Electric model of a brushed DC motor. Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 7

In Fig. 3, the LM inductor is mainly due to the coil inductance. The RM is the series resistance and is due to both coil resistance and brushing resistance. The back emf is produced by the movement of the rotor in the magnectic field produced by the stator and is proportional to the rotational speed. An important feature of brushed DC motors is that the produced torque in the motor is proportional to the electric current flowing into the motor as stated in Eq. (1). (1) where I M is the current flowing through the motor and K t is a constant to convert current to torque. In DC motors a small (but sometimes significant) portion of the produced torque is lost due to friction, and some electromagnetic fenomena. No losses are considered in the proposed model. b) DAC and driver Due to the direct relation between torque and electric current in brushed DC motors, a digital to analog current converter can be used to convert a numerical torque representation direct to an output torque. Figure 4 present a schematic diagram of the digital to analog (DAC) converter and current based power amplifier drive. Figure 4. Digital to analog converter and power drive. The output current of the power amplifier is given by (2) where T is the required torque value at the input of the analog to digital converter and KAMP is the constant to convert the T input to I. The motor torque can be derived by Eq. 3. (3) c) Encoder signal The encoder signal is generated by a pair of sensors connected to a specially designed disk. The typical setup is the presented in figure 5. Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 8

Fig. 5 Encoder connection to output shaft. The incremental encoder output is two square shaped signals where a transition (rising or falling edge) of one of the signals represent an forward or backward movement depending on the state (zero or one) of the other. Figure 6 illustrates the behaviour of the incremental encoder in a forward and backward movement. Fig. 6 Encoder output signal d) Dynamic behaviour The model for dynamic behaviour modelling is presented in Figure 7. Fig. 7 Dynamic model of the motor. In the figure 7, the brushed DC motor produces a mechanical torque that moves a load connected to the output shaft. This load is composed by the total equivalent inertia of the motor and of the load itself. The model assumes there is no friction or other parasitic torque. The rotational acceleration is given by the Eq. 4. (4) where τ is the applied mechanical torque (supplied by the electric current in the motor) and I is the moment of inertia of the equivalent load. The rotational speed can be given as a function of the acceleration by Eq. 5:, (5) where is the initial speed. Finally, the position of the output shaft is given by Eq. 6:, (6) Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 9

where is the initial position of the output shaft. e) Discrete model The dynamic behaviour presented above is in the continuous time domain, which is not feasible by computational means. The discrete version assumes there is a fixed interval computation (h) of the next state of the dynamic. The discrete model for the output shaft position at a discrete time instant T is given by (7) where h is the discretization step, is the initial position of the output shaft (at t=0), is the rotational speed of the output shaft at a given discrete time instant t. The output shaft position can also be computed iteratively by (8) The rotational speed, can be computed discretely by: (9) where, is the initial rotational speed of the output shaft (at t=0), is the rotational acceleration of the output shaft at a given discrete time instant t. The output shaft speed can also be computed iteratively by, (10) HARDWARE ARCHITECTURE The proposed architecture for the motor model is presented in Figure 8. Fig. 8 Proposed hardware architecture. Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 10

In Figure 8, the Position Register (PR) stores the output shaft position, the Speed Register (SR) stores the current rotational speed and the acceleration register (AR) stores the current change rate of the rotational speed. These registers are updated every clock cycle. a. Converting register values to physical units The output shaft position is represented by a N bit register. A full revolution of the output shaft is given by a full count of the Position Register. The number of discrete positions is given by the following equation: (11) And the resolution is given by, (12) Another N bit register stores the current rotational speed. The speed resolution is given by the following equation, (13) where f clk is the system clock frequency. Finally another N bit register store the current acceleration. The smallest possible acceleration is given by: (14) The Speed Register and the Acceleration Registers hold 2 s complement values. The possible range for Speed Register is and for Acceleration Register is. One important relationship is the smallest increment in acceleration for a given register size and clock frequency. From Eq. 12, 13, 14, an expression for the acceleration step can be derived:, (15) Figure 9 presents the value of for a range of values of f clk and N. Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 11

1E-17 ) 2 s / d a r ( n i o t l u o s e R n i o t a r l e e c A 1E+15 1E+11 1E+07 1E+03 1E-01 1E-05 1E-09 1E-13 Clock Frequency (KHz) 0,1 10 1000 100000 8 16 24 32 40 48 56 64 72 Number of Bits (N) Fig. 9 Acceleration resolution. The input of the DC motor model should be a torque. The torque and acceleration is related to the moment of inertia by: (16) where τ is the input torque, is the acceleration, and I is the moment of inertia. The smallest possible torque depends on the moment of inertia assumed and the resolution of the registers (value of N) in model. The torque resolution (τ step ) can be obtained from Eq. 15 and 16., (17) b. Connecting the torque input For a given motor model implementation, I is the characteristic inertia of the motor and f clk is a constant system clock frequency. The user of this hardware model has to find a suitable N such that the required position output resolution (θ step )and the torque resolution (τ step ) is satisfied. The maximum input torque can be obtained by grouping M bits to form a torque Input Bus (IB) such that the LSB (least significant bit) of IB is connected to the LSB of the Acceleration Register (AR). In a typical implementation, IB is around 8 bits (a 8 bits torque resolution). The (N-M) most significant bits of AR are connected to logical zero. For large inertias and clock frequencies, the value of M will be much lower than N. A more generic connection example is presented in Figure 10. The motor model controller has a torque output (TO) of 8 bits representing 2 s complement values of torque (range from -128 to +127) and the motor model has an acceleration register (AR) of 32 bits. The LSB of TO is connected to the bit 5 of the AR. The lowest 5 bits of AR is connected to ground level (logic zero). The highest 19 bits are connected to the MSB of TO to perform sign extension. Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 12

Fig. 10 Torque output (TO) to Acceleration Register (AR) connection example. c. Connecting the incremental encoder output The proposed architecture provides an incremental encoder output to allow a complete system integration of a typical brushed DC motor drive. The encoder signal format was presented in Section III and the implementation in the proposed architecture is obtained by selecting a successive pair of bits of the Position Register. The selection is based on the desired resolution of the encoder. This arrangement support power of two (2 N ) based incremental encoders. The position of the lowest significant bit of the pair, counting from the most significant bit (MSB) of the Position Register (PR), defines the value of N (eg. PR [63..0] is 64 bit wide and we get two bits starting from PR 56, then we get a 256 pulses 8 bits resolution incremental encoder). The connection of the encoder logic to the PR is done by a parameter called ENC_BITS. The incremental encoder resolution is defined as 2 ENC_BITS. EXPERIMENTAL RESULTS The proposed architecture was described in VHDL language. To validate the developed VHDL, a VHDL testbench file was written to provide the input stimuli (clock, reset and torque input) and to collect the output produced by the developed VHDL model. Figure 11 show a simulation result where the value of N was configured to 64 bits and the clock frequency was set to 1MHz. The acceleration input was set as a step starting at 0 and jumping to 2 40 (1099511627776 - the allowable range in this configuration is [-2 63 ;2 63-1]) at the time marked by a vertical bar in the simulation. Starting at this time a rapid rise in the frequency of the encoder output can be observed, which can be interpreted as a rapid change in the speed or acceleration. Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 13

Fig. 12 Simulation result showing the output position as function of the input torque. The waveform viewer is not adequate to observe the dynamic behavior of the developed model due to the inability to plot graphically non-digital values. A torque profile composed by a set of three different torque waveforms was produced to evaluate the motor model developed: cosine, pulse, and square. The model operating clock frequency was set to 1MHz and the size of the registers (N) was set to 64. A total of 1000 input samples was produced combining the three waveforms described above. The model receives an input sample every 1000 clock cycles (1ms). The total run time was 1s. The upper plot of Figure 12 show the input torque profile and the lower plot show the output shaft position response. The output response position response was within the expected for the model developed. To evaluate hardware use and performance of the developed architecture, three different versions with the size of the registers set to 16, 32, and 64 of the proposed architecture was synthesized to a Xilinx FPGA. The chosen device was the XC2VP30. The synthesis results are presented in Table 1. Table 1 Synthesis results N 16 32 64 LUTs 33 65 129 FFs 49 97 193 F clk Max 269 226 171 The maximum clock frequency (F clk max) was 269 MHz for the 16 bit version. The number of FPGA resources used by the 64 bit version was less than 1% of the Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 14

chosen FPGA. Comparisons to other works were not possible because no similar work was found in the literature. CONCLUSIONS In this work a brushed DC motor model was proposed to replace an actual motor, its power drive and encoder. This model is to be used during the development cycle of motor control systems. The proposed model parameters can be adjusted to specific design needs. The performance results show the proposed architecture is able to reach hundreds of megahertz when synthesized to a virtex II pro FPGA and using very few logic resources. At this frequency of operation the motor model can be assumed to be continuous time for the motor controller being developed, what lead to the advantage that small glitches such as unexpected control delay or instabilities in the controller realtime system can be catch by the motor model. Furthermore, the encoder output generates a realistic incremental encoder output that can be used to debug the encoder interface of the motor controller being developed As a future work, improvements in the brushed DC motor model is planned to include realistic loss models, external load model and fine adjustment of the input torque. Hardware models for AC motors are also planned. Fig. 11 Simulation result for a torque step. REFERENCES [1] P. Wolm; X. Q. Chen; J. G. Chase; W. Pettigrew, Analysis of a PM DC Motor Model for Application in Feedback Design for Electric Powered Mobility Vehicles, Mechatronics and Machine Vision in Practice, 2008. M2VIP 2008. 15th International Conference on, 2-4 Dec. 2008 Page(s):640 645 [2] S.J.; O. Vainio; J. Pasanen; A 16/24-bit DSP-ASIC coprocessor for AC motor modeling, Euro ASIC '91 27-31 May 1991 Page(s):53-56 Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 15

[3] O.S. Lobosco, Modeling and simulation of DC motors in dynamic conditions; Electric Machines and Drives Conference Record, 1997, IEEE International, 18-21 May 1997 Page(s):MB2/1.1 - MB2/1.3 Vetor, Rio Grande, v.18, n.1, p. 5-16, 2008. 16