Docsity

Data Files - Computational Methods - Lecture Slides, Slides of Calculus for Engineers

Partial preview of the text

Download Data Files - Computational Methods - Lecture Slides and more Slides Calculus for Engineers in PDF only on Docsity!

Learning Goals

• Understand the difference Built-In and

User-Defined MATLAB Functions

• Write User Defined Functions

• Describe Global and Local Variables

• When to use SUBfunctions as opposed to

NESTED-Functions

• Import Data from an External Data-File

– As generated, for example, by an Electronic

Data-Acquisition System

Private Functions

• Private functions reside in subdirectories with the

special name private, and they are visible only

to fcns in the parent directory

• Assume the directory wmays is on the MATLAB

search path. A subdirectory of wmays called

private may contain functions that only the

functions in wmays can call.

• Because private functions are invisible outside the

parent directory wmays, they can use the same

names as functions in other directories.

Typical Data Acq Sys.

 Items  &  → Sensor;

Sensor: Power &

Signal-Conditioning

 Item  → USB or Serial

Connection

 Item  → Interface

Software

Design: Data-inputs, Sensors

Qty Description/Location Type Pwr Src Output To Notes & Comments

02 Immersed in coolant stream at Supply & Return connections of chiller

Temp K TC

n/a [Strawberry Tree Data Acq] [laptop]

Need to install 3/8-Tu to 1/4- FPT branch TEE in chiller plumbing to add 083886 &

  1. TEE = SS-600-3TTF

13 Temp array around the new TMB bubbler

Temp K TC

n/a [Strawberry Tree Data Acq] [laptop]

Order 2nd DATA shuttle. See item 4932. See bubtcloc.dwg, or prs

03 Collant flow leading into the three bubblers

Fluid Flw Turbine meter

12 Vdc from NO- SHOK controllers

[modifed 973680 V-divider card] [Strawberry Tree Data Acq] [laptop]

3 wires: +12Vdc from NoShok, com from NoShok, sq-wave pulse to NoShok 03 MFM on output of bubblers to measure the Q (^) v,B +QN mixture output of bubblers

0-5 Vdc Output ∝ flow

WJ-1000 system [Strawberry Tree Data Acq] [laptop]

Use Tylan MFC/MFM extension cards, pn 3780-

02 In & Out signal on ch2& TMB bubbler Hi-res card channel. Card = 80 CARD. Vin = TP8, Vout = TP

0-5 Vdc Output ∝ -30 °C +70 °C

WJ-1000 system [TP8 & TP16] [Strawberry Tree Data Acq] [laptop]

See item 5270 for Strawberry Tree over-voltage calcs OK Use Tylan MFC/MFM extension cards, pn 3780-

01 Absolute Barometric Pressure. Locate Setra- 270 sensor on top of system

0-5 Vdc Output ∝ 800 1100 mBar PA

24Vdc, bench top pwr supply from FPD handler project

[Strawberry Tree Data Acq] [laptop]

Bench test req’d for "088603-000 xdcr,press,0- 100 psig,atm (model 270)" 24 V pwr supply also power the NoShok controllers

Computer DataAcq DataFlow

Board 1:

Board 2:

Board 3: 160

Write 1194a

Write 1159a

Write 160a

Bub TCs

Write1194b

Write1159b

Write160b

TEOS Line TC

Chiller TCs

Bub N2 MFCs

MFMs

0-5V -> Torr Atm Press

TP1: V -> C

TP9: V->C

Ch2&3 Bub T

Ch2&3 Tsens

Ch2&3 Thires

“soft” Charts

Computer Interface Cards

Data Files

• Most DataAcq Systems record the data using

characters listed in the A merican S tandard C ode for

I nformation I nterchange (ASCII)

– The Base ASCII set contains 128 characters (hex 7F)

– The Extended set contains 256 characters (hex FF)

Data File Examples

• KLA-T “KLARFF file fragment

• SPACES Separate the Data FIELDS

 StrawBerry Tree DasyLab-Software file

DEFECTID XREL YREL XINDEX YINDEX XSIZE YSIZE DEFECTAREA DSIZE CLASSNUMBER TEST IMAGECOUNT ; DefectList 1 2.7076600000e+02 3.6191450000e+03 -4 1 0.249000 0.249000 0.032000 1.7800000000e-01 0 1 0 2 1.5445400000e+02 2.5059200000e+03 -4 -2 0.249000 0.249000 0.027500 1.6500000000e-01 0 1 0 3 1.8203200000e+02 2.3367030000e+03 -4 -3 0.499000 0.499000 0.046800 2.1600000000e-01 0 1 0 4 3.8058700000e+02 2.0016480000e+03 -4 -3 0.249000 0.998000 0.046800 2.1600000000e-01 0 1 0 5 9.2548000000e+01 4.8907490000e+03 -4 -4 0.249000 0.249000 0.032000 1.7800000000e-01 0 1 0

WorkBench PC for Windows - V 2.60. WORKSHEET : 960411D Recording Date : 4/11/96, 15:28: Block Length : 8 Delta : 0.500000 sec. Number of Channels : 4 Date;Time;TC14: TEOS Line (C);TC16: TEOS Line (C);TC17: Chllr Sup (C);TC18: Chllr Ret (C); 4/11/96;15:28:28.0;74.908;86.706;-22.458;-19.720; 4/11/96;15:28:28.5;74.938;86.716;-22.467;-19.716; 4/11/96;15:28:29.0;74.952;86.705;-22.499;-19.706; 4/11/96;15:28:29.5;74.980;86.702;-22.509;-19.695;

• SEMICOLONS Separate

the Data FIELDS

Data File Examples

• FLUKE ScopeMeter .csv Data File Fragment

"Title ","Input A", "ID ",1, "Type ","Envelope", "Date ",13/32/94, "Time ",19:34:51, "X Scale ",5.0E-03, "X At 0% ",-1.00E-02, "X Resolution ",2.500000E+01, "X Size ",254, "X Unit ","s", "X Label ","5 ms/Div", "Y Scale ",2.00E+00, "Y At 50% ",6.32E+00, "Y Resolution ",2.500000E+01, "Y Size ",256, "Y Unit ","V", "Y Label ","V",

-1.00E-02,5.6E-01,6.4E-

-9.8E-03,4.0E-01,5.6E-

-9.6E-03,4.8E-01,5.6E-

-9.4E-03,4.0E-01,5.6E-

-9.2E-03,4.0E-01,5.6E-

-9.0E-03,4.0E-01,5.6E-

Test-Point-3 SCOPEMETER DEMO BOARD 4022 245 0422.

-0.01 0.00 0.01 0.02 0.03 0. Time (s).

ScopeMeter Signal (Vdc)

Signal (Vdc)

file = SM_Demo_Board_0210.xls

DataFile HEADER

COMMAS Separate Data

MATLAB: Data Import/Analysis

• Recall the Fluke ScopeMeter .csv file

• We Want to import the Data from This File and

plot it it Using MATLAB

ScopeMeter used

for Voltage-Level

Data Acquisition

Fluke-199 200 MHz

ScopeMeter

Omega ACC-PS

AcceleroMeter

Power Supply

Cables To/From

AcceleroMeter

Import TP3 .csv Data

• Find and OPEN DataFile

Import TP3 .csv Data

• Can Chose Variable Format as either:

3-Col ARRAY or 3 individual Col-VECTORS

Import TP3 .csv Data

• Do it the HARD way with 3-Col Array

– Change VAR name to meaningful Value

 MATLAB Array Var named SM_TP3 → click

Next>

Plot TP3 t vs V Data

• The Command Window Plotting Session

>> % make time vector, t, from Array Col-

>> t = SM_TP3(:,1);

>> % construct voltage vector, V, from

Array Col-

>> V = SM_TP3(:,3);

>> plot(t,V), xlabel('Time (s)'),

ylabel('TP3 E-Potential (volt)'),...

title('Fluke ScopeMeter SignGen TestPt-

3'), grid

Plot TP3 t vs V