Sei sulla pagina 1di 7

Lab.

#2

Oct. 8~11

Motor actuation using Lab-View.


Document prepared by In-ho Lee T.A. In-ho Lee and Tae-jin Park 010-6617-8004, inholee@kaist.ac.kr/ s s s s 010-9716-3419, taejin.park@kaist.ac.kr

All the contents of reports, pre- and post-report, should be handwritten. You can copy and phase the figures/data plots, though. Pre-report (30pts) due on the beginning of your Lab. Post-report (70pts) due on the beginning of your next Lab.

Pre-report questionnaires
1.(10pts) 2. (10pts) 3.(10pts) Briefly describe the objective of the experiment: Briefly explain the procedures of the experiment: Briefly describe time-domain specification parameters such as, rise time, settling time, overshoot, peak time etc. in terms of system parameters (mass, stiffness, damping ratio, etc)

1. Objective
The aim of this lab is to - Understand the internal structure of a motor - Learn how to drive the motor using LabView - Identify motor parameters from time response This experiment is for system identification of an motor. Actual modeling for the motor is very complicated, so in practice the motor system is often simplified as the 1st (or 2nd ) order system with voltage input (vi) and velocity output (w). In this experiment we applied a step input to the motor and acquire the rotational velocity of the motor from motor-built in encoder using LabView program and DAQ system. From the time response of the motor angular velocity, you are supposed to estimate the time-domain specification parameters as well as system parameters .

Figure [1].

Schematic of Lab #2

2. Preliminaries
Structure of DC Motor

Figure [2].

DC electric motor

Electric current supplied externally through a split ring commutator. When electric current passes through a coil in a magnetic field, the magnetic force produces a torque which turns the DC motor. Motor dynamics

Figure [3].

Motor Dynamics

The voltages applied to the armature side of the motor is represented by V(t). The resistances and inductance of the armature of the motor are represented by R, L. The torque generated by the motory is proportional to i and the currents in the armature of the motor. The motor torque increases linearly with the current i. We write
V (t ) - L di - Ri - em = 0 dt
em = K m i

An equation that describes the rotational motion of the inertial load is found by summing moments. Thus, the dynamic equation from the input motor torque to rotational speed changes is

M =T

- bw = J

dw dt

Tm = K t i

The transfer function can be derived by combination of above two equations which electric system and mechanical system. Time response specification of 1st , 2nd order system
(refer to Gene F.Franklin, et al, Feedback Control of Dynamic Systems 5th edition, p94-p98)

1st order system The time response of a servo motor modeled as the 1st order system to a unit step input is shown on the graph below and the property of the 1st order system such as time constant and system proportional gain are identified from the graph. In this experiment, we assume that inductor of motor is very small. Therefore transfer function G ( s) = system.
w (s)
V (s)

is 1st order

Figure [4].

Unit step time response of 1st order system

2nd order system Rise time refers to the time required for a signal to change from a specified low value to a specified high value. Rise time is defined as "the time required for the response to rise from x% to y% of its final value", with 0%-100% rise time common for underdamped second order systems, 5%-95% for critically damped and 10%-90% for overdamped. Settling time is the time required for the transient to decay to a small value so that output is almost in the steady-state. Various measures of smallness are possible. For illustration we will use 1% as a reasonable measure; in other cases 2% or 5% are used. Overshoot M P is the maximum amount the system overshoots its final value divided by its final value and is often expressed as a percentage. For the overshoot M P we can be more analytical. This value occurs when the derivative is zero, which can be found from calculus. We can derive the formula
M P = e -pz /
1-z 2

, 0 z <1

Figure [5].

Unit step time response specifications of 2nd under-damped system

Digital Filter In electronics, computer science and mathematics, a digital filter is a system that performs mathematical operations on a sampled, discrete-time signal to reduce or enhance certain aspects of that signal. This is in contrast to the other major type of electronic filter, the analog filter, which is an electronic circuit operating on continuous-time analog signals. An analog signal may be processed by a digital filter by first being digitized and represented as a sequence of numbers, then manipulated mathematically, and then reconstructed as a new analog signal (see digital signal processing). In an analog filter, the input signal is "directly" manipulated by the circuit. IIR(Infinite Impulse Response) Filter
N k =1 M k =0

y[n] = ak y[n - k ] + bk x[n - k ]

FIR(Finite Impulse Response) Filter


M

y[n] = bk x[n - k ]
k =0

Here is an example for realization of low pass IIR filter.

Figure [6].
vin (t ) - vout (t ) = RC xi - yi = RC dvout dt

A simple low-pass RC filter

yi - yi -1 Dt

y is filterd data and x is raw data. As shown above, we can design simple RC low pass filter.
Input contribution Inertia from previous output

Dt RC yi = xi ( ) + yi -1 ( ) RC + Dt RC + Dt

1. Open your data file using EXCEL 2. From Workspace of MATLAB, create new variable 3. Copy and paste on your new variable and save it on same directory with your mfile ==================================================================
load Example.mat for i = 1: 5000 time(i)=Data(i,1); position(i)=Data(i,2); velocity(i)=Data(i,4); input(i)=Data(i,6); end % because of time is unenven, j=1; for i = 2: 5000 if time(i) ~= time(i-1) a_position(j)=position(i); a_time(j)=time(i); a_velocity(j)=velocity(i); a_input(j)=input(i); j=j+1; end end nn=length(a_time); % filter design fc=10; % cutoff frequency 10Hz RC=1/2/pi/fc; f_velocity(1)=0; for i = 2: nn dt=a_time(i)-a_time(i-1); f_velocity(i)=a_velocity(i) * (dt/(RC+dt)) + end

f_velocity(i -1) * RC/(RC+dt);

==================================================================

3. Experimental Procedures
Motor operating using Labview In this experiment, we construct a program which rotate motor and saves the data as a text file using LabView. Following statements are how to operate Labview. 1. Turn on the power and set the motor driver panel as follows (On and Speed). 1Axis is the only part that you are supposed to handle.

Figure [7].

DAQ system

2. Open <Labview> program. And create a new project. 3. Open the block diagram panel.
[- ]

4. Create DAQ Assistant.


[DEV1/ctr1] [---]

5. Create timed loop or while loop. 6. Construct DBL Numeric Constant to display rotation of motor.
[- ] 7.

Create a new DAQ Assistant.


[DEV1/ao1] [- - ]

8. Construct DBL Numeric Constant to display input voltage.


[- ]

9. Construct DBL Numeric Constant to control input voltage.


[- ]

10. Save input voltage, position and velocity. (refer to Lab #1)
[--]

11. Connect each part by drawing lines between icons 12. Generate sine wave
[- - -] [] = you can handle frequency and magnitude [] = (1), (100)

13. Velocity data save


--

Apply load to the motor Repeat experiment after tightening a set screw, so that a horizontal pendulum becomes a load on the motor.

Figure [8].

Example of completed LabView Program

4. Results (30pts.)
Draw time responses of motor with respect to different constant input voltages and different frequencies of sinusoidal inputs. Both raw data and filtered data should be included in your report. (15 pts.)
Hint : Specification of time response should be referred to the results.

Draw time response of motor with load applied by horizontal pendulum. Also compare results with the no-load trials. (15 pts.)

5. Discussion (30pts.)
Using parameters that you estimated from your experiment (time response), Explain how to quantify the step response of 1st order motor system. What will happen if you change the input voltage from 1V to 3V? Are motor parameters changed? Why or Why not? (10 pts) Although you assumed 1st order dynamics of the motor, the measured response showed oscillatory behavior. What are the major sources for the fluctuation of the response that you acquired from your experiment? (10pts) Suppose you assume the motor as 2nd system. What are the model parameters to estimate and how can you identify 2nd system unknown parameters. (10pts)
Hint : Inductor can be ignored because of small value. Hint : What are the major sources for the fluctuation of the response that you acquired from your experiment

Describe newly learned information from this experiment. (extra 5 pts)

6. Wrap up (10pts.)
Check the data file of your response results using notepad to confirm that your data is safely saved. (data : time (tap) velocity) Switch off the 1Axis in the motor driver panel after you end up with your experiment. Turn off the power of motor driver, computer, and the electrical outlet behind of the system. Clean your lab desk. T.A. will check your desk. REFERENCES [1] (Lecture materials of system modeling and control) systemID [2] Gene F. Franklin, J. David Powell, Abbas Emami-Naeini, Feedback Control of Dynamic Systems, 3rd edition, Addison-Wesley Series, 1994, p94-p98 [3] System Dynamics, 3rd Ed, PRENTICE HALL, Katsuhiko Ogata [4] Modern Control Engineering, 4th Ed, PRENTICE HALL, Katsuhiko Ogata [5] , , LabVIEW , , 2007 [6] , , , LabVIEW , , 2007 [7] (Lecture materials of system modeling and control) MATLAB lectures. [8] Sedra, Adel; Smith, Kenneth C. (1991). Microelectronic Circuits, 3 ed.. Saunders College
Publishing. p. 60. ISBN 0-03-051648-X. [9] Dorf and Bishop, Modern Control Systems, 9th Ed., Prentice-Hall, Inc. 2001

Potrebbero piacerti anche