2.004 lab1 intro

29
2.004 Lab 1 Intro Flywheel Modeling & 1 st Order Response September 23, 2019

Upload: others

Post on 18-Dec-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2.004 Lab1 Intro

2.004 Lab 1 IntroFlywheel Modeling &

1st Order Response

September 23, 2019

Page 2: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 2

Today’s Tasks

• Check your Prelab 1 answers with the teaching staff• Study the frictional characteristics of the rotational plant and estimate the frictional

coefficients:– Coulomb friction– Viscous damping: eddy-current damping with one, two and three magnets in place– ★ Air resistance (drag)

• Monitor and record the �spin-down� characteristic of the flywheel in each case and analyze the velocity data

• 1st order step response when driven by a square wave input• Deliverables:

– Lab 1 report (use the report template)– Prelab 1– Laplace Transform Workbook

Page 3: 2.004 Lab1 Intro

Lab Report Grading

• Prelab:– Deduct 2 points from lab report grade if no submission

• Lab Report Grading:0 – No show / No report received

20 – Completed all the required parts with reasonable results

Deduction for mistakes such as missing units, unreasonable answers, missing figures, etc.★ Earn additional 2 points if completed all the required parts and the additional tasks

9/19/19 2.004 Fall 19' 3

Page 4: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 4

Computer Based Control Systems

Computer

PlantInputs

Outputs

Sensors

Actuators

ADCDAC

Controller

Storage

Oscilloscope

Disturbances

FunctionGenerator

ModelReference Inputs

Amp

Data Collection

Mathematical Representation of the Plant

Computer Code

Page 5: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 5

Example: F-35B STOVL Flight Control

Engaging clutch Shaft locked

Disengaging clutchShaft unlocked

UnlockingLocking

LiftFan Simulink Model

UNCLASSIFIED

Swivel Duct

Lift Fan

STOVL Mode

1st order exponential response

Page 6: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 6

Rotational Plant

Copper flywheel

Gear set

PVM

DC motorMotor power cable

Optical Encoder(underneath the flywheel)

Damping magnet

Linear power amp

BNC connector panel

Page 7: 2.004 Lab1 Intro

Modeling the Flywheel

9/19/19 2.004 Fall 19' 7

J Ω(t) = T (t)−Tf (t)

⇒ J Ω(t)+Tf (t) = T (t)

Coulomb friction: J Ω(t) = T (t)−Tc

Viscous damping: J Ω(t)+BΩ(t) = T (t)

Viscous + Coulomb: J Ω(t)+BΩ(t) = T (t)−Tc

Circular Motion

!

J = 12mr2 = π

2r4h( )ρFor a solid cylinder

J = π2r24h( )ρ − π2 r1

4h( )ρ = πh2 r24 − r1

4( )ρ

Equation of Motion

Moment of Inertia J

hr2

r1

Page 8: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 8

Damping Model (Translational Motion)

• Viscous Damping

)(tFkxxcxm =++ !!!

x = e−(c/2m)t A1e(c/2m)2−(k/m)t + A2e

− (c/2m)2−(k/m)t( )= e−ζωnt A3 cosωn 1−ζ 2 t + iA4 sinωn 1−ζ 2 t( )

…Coulomb damping results from the sliding of two dry surfaces. The friction generated by the relative motion of the two surfaces is a source of energy dissipation. It is opposite to the direction of motion and is independent of surface area, displacement or position, and velocity…

• Coulomb Damping

NFc µ=

DStatic

Kinetic

ck

m

x

Page 9: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 9

Eddy Currents

• Eddy currents are generated when there is relative motion between a conducting object and a magnetic field. The swirling currents in the conducting object is due to electrons experiencing a Lorentz force that is perpendicular to their motion.

• Eddy currents generate resistive losses that transform some forms of energy, such as kinetic energy, into heat. (Example: eddy current brakes)

F = q(E + v×B)Lorentz force

Faraday’s law of induction

Lenz’s law

Page 10: 2.004 Lab1 Intro

Eddy Current Applications

9/19/19 2.004 Fall 19' 10

Non Destructive Testing

Eddy Current Brakes

Page 11: 2.004 Lab1 Intro

★Drag (Air Resistance)

9/19/19 2.004 Fall 19' 11

Fd =12CDρAv

2

Turbulence flow

Fd

Drag coefficient

Drag force

Fluid density

Cross sectional area

Relative velocity

Page 12: 2.004 Lab1 Intro

US Digital Optical Encoder E6S-2048-187

• Quick, simple assembly and disassembly

• Rugged screw-together housing• Positive finger-latching connector• Accepts .010" axial shaft play• Tracks from 0 to 100,000 cycles/sec• 64 - 2500 CPR | 256 to 10,000 PPR• 2 channel quadrature TTL squarewave

outputs• Optional index (3rd channel)• -40 to +100C operating temperature• Fits shaft diameters from 2mm to 1"

9/19/19 2.004 Fall 19'12

Max speed = 2,400 rpmEffective resolution = 8,192 counts per revolution

Page 13: 2.004 Lab1 Intro

Optical Encoders

Regular phase

Quadrature phase

9/19/19 2.004 Fall 19' 13

Page 14: 2.004 Lab1 Intro

Quadrature Decoding

X (Ch A) Y (Ch B) F0 F1 F2 F3

0 0 1 0 0 0

1 0 0 1 0 0

1 1 0 0 1 0

0 1 0 0 0 1

9/19/19 2.004 Fall 19' 14

Page 15: 2.004 Lab1 Intro

9 VDC Input Encoder Input

FDTI Connector (for

programming)

Dip Switches (for configuration)

Reset ButtonPosition Signal BNC Output

Velocity Signal BNC Output

ATMega 328PMicrocontroller

LED

Position-Velocity Monitor (PVM)

9/19/19 2.004 Fall 19' 15

Page 16: 2.004 Lab1 Intro

Chart Recorder App

9/19/19 2.004 Fall 19' 16

Z:\Course Lockers\2.004\Labs\ChartRecorderApp

Page 17: 2.004 Lab1 Intro

?5 1 =´ -e

?»t9/20/19 2.004 Fall 19' 17

Fitting an Exponential Curve

• Estimate t from the time at which the response has decayed to:

y(t) = Ae−tτ

"

#$%

&'

• Slope method

dydt= −

Aτe−tτ

"

#$%

&'

t=t

y(τ ) = Ae−1

• Assume viscous damping is the dominant frictional torque

Ω(t) =Ω0e−BJ#

$%

&

'(t

Ω(t) = Ω0 +TcB

⎝⎜

⎠⎟e

−BJ⎛

⎝⎜

⎠⎟t−TcB

= 0.368*A

Example:A = 5 (initial value)0.368*5 = 1.84

Page 18: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 18

Fitting an Exponential Curve (Cont.)

• Log linear fit:

t/)( tAety -= ÷øö

çèæ -+=ttAty )ln())(ln(

• Matlab’s curve fitting tool: cftool

Page 19: 2.004 Lab1 Intro

Step Response (1st Order)

19

Page 20: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 20

Driving the flywheel with DC motor

• Observe flywheel plant behavior when driven by a known input.

• Analyze various transient responses.

Caution:• Always be ready to turn off the breaker

switch of power amplifier when flywheel is spinning too fast!!!

• Do not touch the flywheel if it is spinning fast! Use a magnet to slow it down.

Page 21: 2.004 Lab1 Intro

Flywheel Open-Loop System

9/19/19 2.004 Fall 19' 21

J !ω +Bω = T⇒ JΩs+BΩ = T⇒ (Js+B)Ω = T

⇒ΩT=

1(Js+B)

mm

mm

KiT

iKT

×= ( )

( )NTT

TNT

m

m

/1

/1

×=

FlywheelJ, B

Gear TrainN

MotorKm

)(ti ω(t)Tm (t) T (t)

Gp(s) =VωVin

=KaKmKt (1 / N )(Js+B)

Power AmpKa

vin (t)

i = Ka ⋅ vin

⇒ivin

= Ka

PVM TachKt

vω (t)

vω = Kt ⋅ω

⇒vωω= Kt

= !"#$%&'

Page 22: 2.004 Lab1 Intro

Dynamic Response of Function Generator• Although we assume some of the subsystems have constant gains, but in reality every physical system

(e.g., sensors, actuators, electronics, cables, connectors,…) has its own dynamic characteristic.

• For example the step signal generated by the function generator has a transient time of about 30 nanoseconds, which is extremely short compared to the time constant of the flywheel.

9/19/19 2.004 Fall 19' 22

30 ns

Page 23: 2.004 Lab1 Intro

Open-Loop Step Response

9/19/19 2.004 Fall 19' 23

Gp(s) =KtKaKm

1N⎛

⎝⎜

⎠⎟

Js+B

=Kdc

τs+1

! " # $ % & ' ( )

* + , -

( " * " %

. $ * / ) " 0 1 *2 " ( ) 3 * $ %

' 4 5

' 4 6

4 ' 5

PVM

Func)onGenerator

Velocityoutput

ACH0

ACH1DAC0OUT

Computer/DAQ

1sGp(s) =

Kdc

s(τs+1)=

Kdcτ

s(s+ 1τ )=As+

Bs+ 1

τ

⇒ A =Kdc

τ(s+ 1

τ )s→0

= Kdc, and B =Kdc

τs

s→−1τ

= −Kdc

⇒1sGp(s) =

Kdc

s+−Kdc

s+ 1τ

⇒ L−1 1sGp(s)

⎧⎨⎩

⎫⎬⎭= Kdc −Kdce

− tτ( ) = Kdc 1− e−

tτ( )⎛

⎝⎜

⎞⎠⎟

Unit step response:

Page 24: 2.004 Lab1 Intro

Chart Recorder App

9/19/19 2.004 Fall 19' 24

Page 25: 2.004 Lab1 Intro

1st Order Step Response

9/19/19 2.004 Fall 19' 25

20 25 30 35 40 45 50 55Time(sec)

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

Volta

ge (V

olts

)

Step Response (1st Order System)X: 46.09Y: 1.595

X: 45.67Y: 0.4961

X: 25.43Y: 1.01

X: 22.79Y: 0.007007

63%

t (sec)

V (t) =Vss −Vsse−(t/τ )

=Vss (1− e−(t/τ ) )

⇒V (τ ) =Vss (1− e−1) = 0.6321⋅Vss

Vss

Vin

Kdc =VssVin

DC gain

Page 26: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 26

Open-Loop Transfer Function

Gp(s) =Vω (s)Vin (s)

=KaKmKt

1N( )

Js+B=Kdc

τs+1

τ =JB

Transient

Steady-state

Parameter values to use

• J = 0.03 kgm2

• B = 0.014 Nms/rad• Ka = 2.0 A/V• Km = 0.03 Nm/A• Kt = 0.199 Vs/rad• Kpos = 0.398 V/rad• N = 44/180 = 0.244

Vss = lims→0 sAs

⎝⎜

⎠⎟Gp(s) = A

KaKmKt1N( )

BA = 1 for a unit step input

Step Response Characteristics:

Page 27: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 27

Simulating Step Response in Matlab

>> Gp = tf(Kt*Ka*Km/N, [J B]);>> ltiview('step',Gp)

>> dcgain(Gp)

Page 28: 2.004 Lab1 Intro

9/19/19 2.004 Fall 19' 28

Making A Good Matlab Plot

• Put a meaningful title• Label each axis (with proper unit)• Label each data source

• Matlab commands:

>> plot(time, data);>> title(�Lab 2 (no mag)�);>> xlabel(�Time (s)�);>> ylabel(�Voltage(V)�);>> legend(�Velocity�,�Linear�);>> grid;>>

Page 29: 2.004 Lab1 Intro

Some Useful Matlab Commands

• View all variables in workspace:– >> whos

• Create a new figure window:– >> figure;

– or

– >> figure(10);

• Plot 2 data sets on the same figure with different line styles, colors and markers (type �help plot�to see all the plotting options):– >> plot(x1, y1, �b*-�, x2, y2, �ro:�);

• Plot a segment of a data vector (discarding the first and last 20 points):– >> plot(xdata(21:end-20), ydata(21:end-20));

• Plot the second column of a data matrix:– >> plot(xdata, ydata(:,2));

• Plot the second column vs. the first column:– >> plot(ydata(:,1), ydata(:,2));

• Simple calculation on the first column of a data matrix and assign to a new variable:– >> ydata1 = (ydata(:,1)–5)*(100/20) + 10;

9/19/19 2.004 Fall 19' 29