Modeling and Simulation of the DC Motor Using Matlab and LabVIEW*

Similar documents
COMPUTER SIMULATION OF REAL TIME IDENTIFICATION FOR INDUCTION MOTOR DRIVES

dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

Lab 8: DC generators: shunt, series, and compounded.

Power Electronics. Prof. K. Gopakumar. Centre for Electronics Design and Technology. Indian Institute of Science, Bangalore.

Motor Fundamentals. DC Motor

Application Information

Mathematical Modeling and Dynamic Simulation of a Class of Drive Systems with Permanent Magnet Synchronous Motors

DCMS DC MOTOR SYSTEM User Manual

Time Response Analysis of DC Motor using Armature Control Method and Its Performance Improvement using PID Controller

Series and Parallel Resistive Circuits

EET 310 Programming Tools

Manufacturing Equipment Modeling

SYNCHRONOUS MACHINES

Lab Session 4 Introduction to the DC Motor

Physics 9e/Cutnell. correlated to the. College Board AP Physics 1 Course Objectives

Inductance. Motors. Generators

Data Sheet. Electro-mechanical counters Hengstler 800 series

DC motors: dynamic model and control techniques

Dynamic states of three-phase induction motors. Selected problems

5. Measurement of a magnetic field

Rotation: Moment of Inertia and Torque

Electronic Speed Variator for a Brushless DC Motor

Modelling, Simulation and Performance Analysis of A Variable Frequency Drive in Speed Control Of Induction Motor

How to Turn an AC Induction Motor Into a DC Motor (A Matter of Perspective) Steve Bowling Application Segments Engineer Microchip Technology, Inc.

Chen. Vibration Motor. Application note

MATHEMATICAL MODELING OF BLDC MOTOR WITH CLOSED LOOP SPEED CONTROL USING PID CONTROLLER UNDER VARIOUS LOADING CONDITIONS

Motors and Generators

OVERCURRENT & EARTH FAULT RELAYS. To study the protection of equipment and system by relays in conjunction with switchgear.

Lab 14: 3-phase alternator.

Chapter 11 SERVO VALVES. Fluid Power Circuits and Controls, John S.Cundiff, 2001

CNC Machine Control Unit

INDUCTION REGULATOR. Objective:

DIRECT CURRENT GENERATORS

Speed Control Methods of Various Types of Speed Control Motors. Kazuya SHIRAHATA

Principles and Working of DC and AC machines

FUZZY Based PID Controller for Speed Control of D.C. Motor Using LabVIEW

INSTRUMENTATION AND CONTROL TUTORIAL 2 ELECTRIC ACTUATORS

EDUMECH Mechatronic Instructional Systems. Ball on Beam System

ES250: Electrical Science. HW7: Energy Storage Elements

2. Permanent Magnet (De-) Magnetization 2.1 Methodology

Magnetic electro-mechanical machines

Topic Suggested Teaching Suggested Resources

Online Courses for High School Students

ANALYTICAL METHODS FOR ENGINEERS

DC GENERATOR THEORY. LIST the three conditions necessary to induce a voltage into a conductor.

FREQUENCY CONTROLLED AC MOTOR DRIVE

Online Tuning of Artificial Neural Networks for Induction Motor Control

AC generator theory. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

ET 332b Ac Electric Machines and Power Systems

Step Response of RC Circuits

Practice Exam Three Solutions

METHODOLOGICAL CONSIDERATIONS OF DRIVE SYSTEM SIMULATION, WHEN COUPLING FINITE ELEMENT MACHINE MODELS WITH THE CIRCUIT SIMULATOR MODELS OF CONVERTERS.

1150 hp motor design, electromagnetic and thermal analysis

The DC Motor. Physics 1051 Laboratory #5 The DC Motor

Available online at Available online at

Lab 3: Introduction to Data Acquisition Cards

GPIB Instrument Control

Chapter 22: Electric motors and electromagnetic induction

UNIVERSITY OF WATERLOO ELECTRICAL & COMPUTER ENGINEERING DEPARTMENT ME269 ELECTROMECHANICAL DEVICES AND POWER PROCESSING.

Principles of Adjustable Frequency Drives

New Pulse Width Modulation Technique for Three Phase Induction Motor Drive Umesha K L, Sri Harsha J, Capt. L. Sanjeev Kumar

Data Acquisition Using NI-DAQmx

The purposes of this experiment are to test Faraday's Law qualitatively and to test Lenz's Law.

Equipment: Power Supply, DAI, Synchronous motor (8241), Electrodynamometer (8960), Tachometer, Timing belt.

Tamura Closed Loop Hall Effect Current Sensors

INDUCTION MOTOR PERFORMANCE TESTING WITH AN INVERTER POWER SUPPLY, PART 2

Design and Analysis of Switched Reluctance Motors

Lab #4 - Linear Impulse and Momentum

Brush DC Motor Basics. by Simon Pata Business Unit Manager, Brushless DC

Electromagnetic Induction: Faraday's Law

Performance Analysis of Speed Control of Direct Current (DC) Motor using Traditional Tuning Controller

Drivetech, Inc. Innovations in Motor Control, Drives, and Power Electronics

Dually Fed Permanent Magnet Synchronous Generator Condition Monitoring Using Stator Current

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EE ELECTRICAL MACHINES II UNIT-I SYNCHRONOUS GENERATOR

Equipment: Power Supply, DAI, Transformer (8341), Variable resistance (8311), Variable inductance (8321), Variable capacitance (8331)

CHAPTER 4 DESIGN OF INTEGRAL SLOT AND FRACTIONAL SLOT BRUSHLESS DC MOTOR

LINEAR MOTOR CONTROL IN ACTIVE SUSPENSION SYSTEMS

Sample Questions for the AP Physics 1 Exam

NO LOAD & BLOCK ROTOR TEST ON THREE PHASE INDUCTION MOTOR

Power Quality Paper #3

Pre-requisites

8 Speed control of Induction Machines

Edmund Li. Where is defined as the mutual inductance between and and has the SI units of Henries (H).

THE LUCAS C40 DYNAMO & ITS ARMATURE.

Force on Moving Charges in a Magnetic Field

Active Vibration Isolation of an Unbalanced Machine Spindle

In order to describe motion you need to describe the following properties.

Chapter 10 Rotational Motion. Copyright 2009 Pearson Education, Inc.

Development of the Induction Motor for Machine Tool Spindles and Servo Amplifier SANMOTION S

Equipment: Power Supply, DAI, Universal motor (8254), Electrodynamometer (8960), timing belt.

STEPPER MOTOR SPEED AND POSITION CONTROL

SLOT FRINGING EFFECT ON THE MAGNETIC CHARACTERISTICS OF ELECTRICAL MACHINES

CONCEPT-II. Overview of demo examples

An Introduction to Using Simulink

Department of Electrical and Computer Engineering Ben-Gurion University of the Negev. LAB 1 - Introduction to USRP

The DC Motor/Generator Commutation Mystery. Commutation and Brushes. DC Machine Basics

Linear DC Motors Magnetic Flux Permanent Bar Magnets

13 ELECTRIC MOTORS Basic Relations

Transcription:

Int. J. Engng Ed. Vol. 21, No. 1, pp. 49±54, 2005 0949-149X/91 $3.00+0.00 Printed in Great Britain. # 2005 TEMPUS Publications. Modeling and Simulation of the DC Motor Using Matlab and abview* NICOAE PATRASCOIU Automatic and Industrial Information Department, University of Petrosani, Romania. E-mail: patrascoiu@upet.ro One of the most used actuators in control systems is a direct current (DC) motor. The general output variable of this actuator can be angular speed or angular displacement motion, but, coupled with wheels or drums and cables, can provide translation motion. This paper proposes a state±space model of the DC motor built for constant flux and considering two inputs: supply voltage and resistive torque. The three states of the resulting model are represented by angular speed, angular displacement and current supply and any of these states can be an output variable for a simulation model. Consequently, the system's model has two inputs and three outputs. For the system's simulation a VI is built where the most important element is a Matlab script which contains the matrices A, B, C, D of the state-space model, the independent variable time and the Matlab simulation function lsim. The motor's parameters are given by digital controls on the panel so that these parameters can be interactively modified. To generate inputs, two CASE structures are used where the input variables can be set: impulse, step and ramp. Here it is also possible to set the signal amplitude and duration, either by knob or slide control. TRANSPOSE 2D ARRAY and INDEX ARRAY are used for setting the matrices' dimensions. The output signals are live display, either one by one or together, on the WAVEFORM GRAPH. INTRODUCTION STUDENTS CAN USE the model and the VI in the classroom to simulate the running of a DC motor and also to learn how to incorporate the latter into a control loop. To start with, based on a functionality structure of the DC motor and on the laws of physics and electricity that rule the variable magnetic flux density (separate excitation) motor's operation, students build a mathematical model. Afterwards, using the mathematical model in a series of simulation experiments in abview, the students can observe the motor dynamics. For this, it is necessary to build the simulation VI and students must analyze the diagram bloc of the VI to ensure adequate functionality of the component subdiagrams. For the input signal, it is possible to select various forms of supply voltage and/or resistive torque so that the above-mentioned outputs can be observed. The forms of the output can suggest the design of the control loop or the type of controller used. Also, for every input signal, students can observe the effect of varying the parameters of the DC motor over the outputs. Functionality equations of the DC motor We will consider a direct current (DC) electric motor with separate excitation, compensating winding and commutating pole. The structure of this machine is presented in Fig. 1, where: v S, i S Ðsupply voltage and current; u E, i E Ðexcitation voltage and current; R, Ðwinding electric resistance and inductance; 'Ðexcitation flux; e(t)ðback electromotive force;!ðangular speed; m(t)ðelectromagnetic torque; r T (t)ðrestoring torque. If we apply the Kirchhoff voltage theorem to the supply circuit, we get: v S eˆri a di a 1 The torque equilibrium equation on the axis of the motor is: m ˆm T f T r T 2 where m T is the motoring torque, which is dependent on the moment of inertia of the rotor, and f T is the motor friction torque. Now the torque equilibrium equation can be written: m ˆJ d! F! r T 3 It is known that an electromagnetic torque is dependent on the excitation flux in excitation winding and on the supply current by the armature constant k t which in SI units (which we will use here) is equal to the motor constant k e k t ˆ k e ˆ k : * Accepted 14 July 2004. 49

50 N. Patrascoiu Fig. 1. DC motor functionality structure. m ˆ k ' 4 and the back electromotive force is dependent on the angular speed and on the excitation flux in excitation winding by motor constant k: e ˆ k '! 5 (1), (3), (4) and (5) are functionality analytical equations (i.e. a general mathematical model of the DC electrical motor). If we consider the angular displacement instead of angular speed!, a similar output variable is necessary to take account of the relationship between these:! ˆ d 6 The DC motor angular speed control is achieved by two methods: constant flux and variable flux. In this paper we consider speed control by constant flux. Constant flux simulation model If the excitation flux is constant, insert the notation: k ˆ K m 7 into the general mathematical model of the DC electrical motor. Now it can build the mathematical model in state±space form so that it is possible to use it in a Matlab simulation. Substituting equations (4) and (5) and notation (7) in equations (1) and (3) results in a complete DC motor model by constant flux, respectively: di d! ˆ 1 v S R i S K m! ˆ F J! K m J i 1 J m 8 To build the state±space model, bring into this mathematical model the input, state and output vectors:. State vector x, whose components are represented by supply current, angular displacement and angular speed!: x ˆ 9!. Input vector u, whose components are repre- Fig. 2. Front panel and bloc diagram of the simmot.vi.

Modeling and Simulation of the DC Motor 51 Fig. 3. Matlab script node and parameter controls. sented by supply voltage v S and load torque m : u ˆ vs 10 m. Output vector y, whose components we treat as the same as state vector components, so that it is possible to simulate these three physical quantities. Using these vectors it is possible to write equations (8) in matrix form: R 0 K m ˆ 1! K m 0 F! J J 1 0 v S 0 1 m J 11 Using systems general equations, this form can be written in compact form: x ˆ A x B u 12 where A and B are a costants matrix: Fig. 4. Generation of input signals.

52 N. Patrascoiu Fig. 5. Data representation of input signals. R 0 K m 1 0 A ˆ 1 ; B ˆ 13 K m 0 F 0 1 J J J If we add the output vector definition, the input± output equation can be written as the matrix: 1 v S y ˆ 0 1 0 1! m 14 or, in compact form: y ˆ C x D u 15 where: 1 C ˆ 0 1 0 ; D ˆ 16 1 Now we have the matrix A, B, C, D and we can use the function lsim, which has the form: y ˆ lsim A; B; C; D; v; t 17 where vector t specifies the time samples for the simulation and consists of regularly spaced time samples t to simulate the DC motor as an TI system. Build the VI to simulate a DC motor in abview The control panel and bloc diagram of the VI that was used to simulate the DC motor are presented in Fig. 2. The base element of the abview program simmot.vi, which is used to simulate a working DC motor, is the Matlab script node. Through this, the matrix A, B, C, D of the motor state± space model and the simulation function are inserted into the abview program (Fig. 3). The motor construction parameters R,, K m, F and J also represent the model parameters and these are set using the controls on the front panel, which should be named with the same letters as the Fig. 6. Data representation of output signals.

Modeling and Simulation of the DC Motor 53 Fig. 7. Data representation of output signals in abview and Matlab. parameters. For the respective controls, the steps of values corresponding to the real values of these parameters are chosen. The values set by these controls represent the inputs for the script node with real data type. Because the input vector has two components for generating the right signals, two blocs are built on the front panel. These two blocs are represented in diagram bloc by a CASE structure with three subdiagrams, which generates the standard signals (i.e. IMPUSE, STEP and RAMP). The subdiagrams contain, respectively, Impulse Pattern.vi, Pulse Pattern.vi and Ramp Pattern.vi, and these can be adjusted by the corresponding controls. Also, the control panel can be used to set parameters such as amplitude, wih (given by START TIME end STOP TIME) and delay (given by START TIME) using either a knob or a slide control (Fig. 4). With the two arrays that contain the input pattern, the BUI ARRAY node can be used to obtain a new array that has values arranged in rows that represent for a real system the input signals. For a graphic representation of these, it can use a graphic display WAVEFORM GRAPH type. The input vector requires a transpose array so that a vector can be obtained that is arranged in two columns and in order that it can use the TRANSPOSE 2D ARRAY node to rearrange the elements of the 2D array such that the 2D array [i, j] becomes a transposed array [j, i]. Similarly, the same node is used at the output of the Matlab script node because the output vector of this node must be in rows and must have three columns that correspond to the three output signals. The input and the output terminals of the Matlab script node corresponding to the input and output signals must be in Real Matrix type. The input and output signals have different forms and different value ranges (Figs 5 and 6), so that a selection of these signals is necessary using the AutoScale option of the WAVEFORM GRAPH display. To do this, the INDEX ARRAY nodes are used for the input and the output. The right signal is selected to set the index input of these nodes using the corresponding button on the front panel, so as to display the same signal by its connection to the Matlab scrip input. The right sequence of the simulation program is necessary in order that the number of samples of the vector t, which represents the simulation time in Matlab, is the same as the number of samples of the signal generation pattern. To do this in Matlab script, the vector t that specifies the time samples for the simulation should have 5/0.01 1 ˆ 501 components. It is also necessary for the number of samples of the Ramp Pattern to be 501. For Stop Time control, Relative time (seconds) in the Format & Precision option should be selected. CONCUSIONS The Matlab lsim function simulates the (time) response of continuous or discrete linear systems to arbitrary inputs and lsim (sys, u, t) produces a plot of the time response of the TI model sys to the input time history. If this function is incorporated into a Matlab simulation program, such as adding Matlab script to a abview program called Virtual Instrument (VI), the input u can be produced by a different signal generation function in VI. abview starts Matlab and, if using the plot (t,y) instruction after the lsim instruction in Matlab script, a new Matlab window appears labeled Figure No. 1, which displays the graphical responses of the DC motor outputs. In Fig. 7, the similarity between the abview and Matlab results can be observed. By means of controls placed on the front panel of the VI, the model parameters and the input signal parameters can be set. For example, where the load torque has a significant value, as shown in

54 N. Patrascoiu Fig. 6, negative values appear for displacement and speed outputs. This means that the motor axle starts spinning the other way round. Also, because abview is a data acquisition program, it is possible to make comparisons between data acquired from a real system and data obtained from a mathematical model of the system. REFERENCES 1. A. Fransua, Masini si actionari electrice, Tehnica, Bucuresti (1986). 2. M. Ghinea, Matlab: Calcul numeric-grafica, Teora, BucuresÎti (1997). 3. D. Matko and R. Karba, Simulation and Modelling of Continuous System, Prentice-Hall, New York (1992). 4. N. Patrascoiu, Modelarea sîi simularea sistemelor, Focus, PetrosÎani (2001). 5. abview User Manual, National Instruments. 6. MATAB 1 Release 11. Documentation set (http://www.mathworks.com/support/). Nicolae Patrascoiu is an Associate Professor in Engineering. He teaches data acquisition and control systems at the Automatic and Industrial Informatics Department at the University of Petrosani, Romania. He shows a particular interest in the links between data acquisition and modeling and simulation systems.