3. requirements1 agenda for understand req activity r1. numbers r2. decibels r3. matrices r4....

Post on 31-Mar-2015

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

3. Requirements 1

Agenda for understand req activity

1. Numbers2. Decibels3. Matrices4. Transforms5. Statistics6. Software

3. Requirements 2

1. Numbers

Significant digitsPrecisionAccuracy

1. Numbers

3. Requirements 3

Significant digits (1 of 5)

The significant digits in a number include the leftmost, non-zero digits to the rightmost digit written.

Final answers should be rounded off to the decimal place justified by the data

1. Numbers

3. Requirements 4

Significant digits (2 of 5)

Examples

number digits implied range

251 3 250.5 to 251.5

25.1 3 25.05 to 25.15

0.000251 3 0.0002505 to 0.0002515

251x105 3 250.5x105 to 251.5x105

2.51x10-3 3 2.505x10-3 to 2.515x10-3

2510 4 2509.5 to 2510.5

251.0 4 250.95 to 251.05

1. Numbers

3. Requirements 5

Significant digits (3 of 5)

Example• There shall be 3 brown eggs for every 8

eggs sold. • A set of 8000 eggs passes if the number of

brown eggs is in the range 2500 to 3500

• There shall be 0.375 brown eggs for every egg sold.• A set of 8000 eggs passes if the number of

brown eggs is in the range 2996 to 3004

1. Numbers

3. Requirements 6

Significant digits (4 of 5)

The implied range can be offset by stating an explicit range• There shall be 0.375 brown eggs (±0.1 of

the set size) for every egg sold.• A set of 8000 eggs passes if the number of

brown eggs is in the range 2200 to 3800

• There shall be 0.375 brown eggs (±0.1) for every egg sold.• A set of 8000 eggs passes only if the

number of brown eggs is 3000

1. Numbers

3. Requirements 7

Significant digits (5 of 5)

A common problem is to inflate Significant digits in making units conversion.• Observers estimated the meteorite had a

mass of 10 kg. This statement implies the mass was in the range of 5 to 15 kg; i.e, a range of 10 kg.

• Observers estimated the meteorite had a mass of 22 lbs. This statement implies a range of 21.5 to 22.5 lb; i.e., a range of 1 pound

1. Numbers

3. Requirements 8

Precision

Precision refers to the degree to which a number can be expressed.

Examples• Computer words• The 16-bit signed integer has a normalized

precision of 2-15

• Meter readings• The ammeter has a range of 10 amps and a

precision of 0.01 amp

1. Numbers

3. Requirements 9

Accuracy

Accuracy refers to the quality of the number.

Examples• Computer words• The 16-bit signed integer has a normalized

precision of 2-15, but its normalized accuracy may be only ±2-3

• Meter readings• The ammeter has a range of 10 amps and a

precision of 0.01 amp, but its accuracy may be only ±0.1 amp.

1. Numbers

3. Requirements 10

2. Decibels

DefinitionsCommon valuesExamplesAdvantagesDecibels as absolute unitsPowers of 2

2. Decibels

3. Requirements 11

Definitions (1 of 2)

The decibel, named after Alexander Graham Bell, is a logarithmic unit originally used to give power ratios but used today to give other ratios

Logarithm of N• The power to which 10 must be raised to

equal N

• n = log10(N); N = 10n

2. Decibels

3. Requirements 12

Definitions (2 of 2)

Power ratio

• dB = 10 log10(P2/P1)

• P2/P1=10dB/10

Voltage power

• dB = 10 log10(V2/V1)

• P2/P1=10dB/20

2. Decibels

3. Requirements 13

Common values

dB ratio0 11 1.262 1.63 24 2.55 3.26 47 58 6.39 810 10100 201000 30

2. Decibels

3. Requirements 14

Examples

5000 = 5 x 1000; 7 dB + 30 dB = 37 dB49 dB = 40 dB + 9 dB; 8 x 10,000 = 80,000

2. Decibels

3. Requirements 15

Advantages (1 of 2)

Reduces the size of numbers used to express large ratios• 2:1 = 3 dB; 100,000,000 = 80 dB

Multiplication in numbers becomes addition in decibels• 10*100 =1000; 10 dB + 20 dB = 30 dB

The reciprocal of a number is the negative of the number of decibels• 100 = 20 dB; 1/100 = -20 dB

2. Decibels

3. Requirements 16

Advantages (2 of 2)

Raising to powers is done by multiplication• 1002 = 10,000; 2*20dB = 40 dB• 1000.5 = 10; 0.5*20dB = 10 dB

Calculations can be done mentally

2. Decibels

3. Requirements 17

Decibels as absolute units

dBW = dB relative to 1 wattdBm = dB relative to 1 milliwattdBsm = dB relative to one square meterdBi = dB relative to an isotropic radiator

2. Decibels

3. Requirements 18

Powers of 2

exact value approximate value

20 1 1

24 16 16

210 1024 1 x 1,000

223 8,388,608 8 x 1,000,000

234 17,179,869,184 16 x 1,000,000,000

2xy = 2y x 103x2xy = 2y x 103x

2. Decibels

3. Requirements 19

3. Matrices

AdditionSubtractionMultiplicationVector, dot product, & outer productTransposeDeterminant of a 2x2 matrixCofactor and adjoint matricesDeterminantInverse matrixOrthogonal matrix

3. Matrices

3. Requirements 20

Addition

cIJ = aIJ + bIJcIJ = aIJ + bIJ

1 -1 0-2 1 -3 2 0 2

1 -1 -1 0 4 2-1 0 1

A= B=

2 -2 -1 -2 5 -1 1 0 3

C=

C=A+B

3. Matrices

3. Requirements 21

Subtraction

cIJ = aIJ - bIJcIJ = aIJ - bIJ

1 -1 0-2 1 -3 2 0 2

1 -1 -1 0 4 2-1 0 1

A= B=

0 0 1 -2 -3 -5 3 0 1

C=

C=A-B

3. Matrices

3. Requirements 22

Multiplication

cIJ = aI1 * b1J + aI2 * b2J + aI3 * b3J cIJ = aI1 * b1J + aI2 * b2J + aI3 * b3J

1 -1 0-2 1 -3 2 0 2

1 -1 -1 0 4 2-1 0 1

A= B=

1 -5 -3 1 6 1 0 -2 0

C=

C=A-B

3. Matrices

3. Requirements 23

Vector, dot product, & outer product

A vector v is an N x 1 matrixDot product = inner product = vT x v = a

scalarOuter product = v x vT = N x N matrix

3. Matrices

3. Requirements 24

Transpose

bIJ = aJIbIJ = aJI

1 -1 0-2 1 -3 2 0 2

1 -2 2 -1 1 0 0 -3 2

A= B=

B=AT

3. Matrices

3. Requirements 25

Determinant of a 2x2 matrix

2x2 determinant = b11 * b22 - bI2 * b212x2 determinant = b11 * b22 - bI2 * b21

B = 1 -1-2 1

= -1

3. Matrices

3. Requirements 26

Cofactor and adjoint matrices

1 -1 0-2 1 -3 2 0 2

A=

1 -3 0 2

-1 0 0 2

-1 0 0 -3

-2 -3 2 2

1 0 2 2

1 0-2 -3

-2 1 2 0

1 -1 2 0

1 -1-2 1

2 -2 -22 2 -23 3 -1

=B = cofactor =

2 2 3-2 2 3-2 -2 -1

C=BT = adjoint=

3. Matrices

3. Requirements 27

Determinant 1 -1 0-2 1 -3 2 0 2

determinant of A =

The determinant of A = dot product of any row in A times the corresponding row the adjoint matrix = dot product of any row or column in A times

the corresponding row or column in the cofactor matrix

The determinant of A = dot product of any row in A times the corresponding row the adjoint matrix = dot product of any row or column in A times

the corresponding row or column in the cofactor matrix

1 -1 0

=4

2-2-2

= 4

3. Matrices

3. Requirements 28

Inverse matrix

B = A-1 =adjoint(A)/determinant(A) = 0.5 0.5 0.75-0.5 0.5 0.75-0.5 -0.5 -0.25

1 -1 0-2 1 -3 2 0 2

0.5 0.5 0.75-0.5 0.5 0.75-0.5 -0.5 -0.25

1 0 00 1 00 0 1

=

3. Matrices

3. Requirements 29

Orthogonal matrix

An orthogonal matrix is a matrix whose inverse is equal to its transpose.

1 0 00 cos sin 0 -sin cos

1 0 00 cos -sin 0 sin cos

1 0 00 1 00 0 1

=

3. Matrices

3. Requirements 30

4. Transforms

DefinitionExamplesTime-domain solutionFrequency-domain solutionTerms used with frequency responsePower spectrumSinusoidal motionExample -- vibration

4. Transforms

3. Requirements 31

Definition

Transforms -- a mathematical conversion from one way of thinking to another to make a problem easier to solve

transformsolution

in transformway of

thinking

inversetransform

solution in original

way of thinking

problem in original

way of thinking

4. Transforms

3. Requirements 32

Examples (1 of 3)

English to algebra solution

in algebra

algebra toEnglish

solution in English

problem in English

4. Transforms

3. Requirements 33

Examples (2 of 3)

English tomatrices solution

in matrices

matrices toEnglish

solution in English

problem in English

4. Transforms

3. Requirements 34

Examples (3 of 3)

Fourier transform

solutionin frequency

domain

inverse Fourier

transform

solution in timedomain

problem in time domain

• Other transforms• Laplace• z-transform• wavelets

4. Transforms

3. Requirements 35

Time-domain solution

We typically think in the time domain -- a time input produces a time output

4. Transforms

systemtime

amplitude

time

amplitude

input output

3. Requirements 36

Frequency-domain solution (1 of 2)

However, the solution can be expressed in the frequency domain.

A sinusoidal input produces a sinusoidal output

A series of sinusoidal inputs across the frequency range produces a series of sinusoidal outputs called a frequency response

4. Transforms

3. Requirements 37

Frequency-domain solution (2 of 2)

4. Transforms

system log frequency

amplitude (dB)

log frequency

magnitude (dB)

input output

log frequency

phase (angle)0

-180

(sinusoids)

3. Requirements 38

Terms used with frequency response

Octave is a range of 2xDecade is a range of 10x

4. Transforms

amplitude (dB)power (dB)

frequency

6, 3

2 10

20,10 Slope =• 20 dB/decade, amplitude• 6 dB/octave, amplitude•10 dB decade, power• 3 dB decade, power

3. Requirements 39

Power spectrum

A power spectrum is a special form of frequency response in which the ordinate represents power

4. Transforms

g2-Hz (dB)

log frequency

3. Requirements 40

Sinusoidal motion

Motion of a point going around a circle in two-dimensional x-y plane produces sinusoidal motion in each dimension• x-displacement = sin(t)• x-velocity = cos(t)• x-acceleration = -2sin(t)• x-jerk = -3cos(t)• x-yank = 4sin(t)

4. Transforms

3. Requirements 41

Example -- vibration

Output vibration is product of input vibrationtimes the transmissivity-squared at each frequency

Output vibration is product of input vibrationtimes the transmissivity-squared at each frequency

4. Transforms

g2-Hz (dB)

log frequency log frequency log frequency

g2-Hz (dB)amplitude (dB)

input transmissivity-squared output

3. Requirements 42

5. Statistics (1 of 2)

Frequency distributionSample meanSample varianceCEPDensity functionDistribution functionUniformBinomial

5. Statistics

3. Requirements 43

5. Statistics (1 of 2)

NormalPoissonExponential RaleighSamplingCombining error sources

5. Statistics

3. Requirements 44

2

Frequency distribution

Frequency distribution -- A histogram or polygon summarizing how raw data can be grouped into classes

height (inches)

number

22

4

6

8

4 5 6 67 4 3

n = sample size = 39

2

60 61 62 63 64 65 66 67 68

5. Statistics

3. Requirements 45

Sample mean

= xi

An estimate of the population meanExample

= [ 2 x 60 + 4 x61 + 5 x 62 + 7 x 63 + 4 x 64 + 6 x 65 + 6 x 66 + 3 x 67 + 2 x 68 ] / 39 = 2494/39 = 63.9

5. Statistics

Ni=1

N

3. Requirements 46

Sample variance

2= (xi - )2

An estimate of the population variance = standard deviationExample 2 = [ 2 x (60 - )2 +

4 x (61 - )2 + 5 x (62 - )2 + 7 x (63 - )2 + 4 x (64 - )2 + 6 x (65 - )2 + 6 x (66 - )2 + 3 x (67 - )2 + 2 x (68 - )2 ]/(39 - 1] = 183.9/38 = 4.8 = 2.2

5. Statistics

N-1i=1

N

3. Requirements 47

CEP

Circular error probable is the radius of the circle containing half of the samples

If samples are normally distributed in the x direction with standard deviation x and normally distribute in the y direction with standard deviation y , then

CEP = 1.1774 * sqrt [0.5*(x2 + y

2)]

CEP

5. Statistics

3. Requirements 48

Density function

Probability that a discrete event x will occurNon-negative function whose integral over

the entire range of the independent variable is 1

f(x)

x

5. Statistics

3. Requirements 49

Distribution function

Probability that a numerical event x or less occurs

The integral of the density function

F(x)

x

1.0

5. Statistics

3. Requirements 50

Uniform (1 of 2)

f(x) = 1/(x2 - x1 ), x1 x x2

= 0 elsewhere

F(x) = 0, x x1

= (x - x1 ) / (x2 - x1 ), x1 x x2

= 1, x > x2

Mean = (x2 + x1 )/2

Standard deviation = (x2 - x1 )/sqrt(12)

5. Statistics

3. Requirements 51

Uniform (2 of 2)

Example• If a set of resistors has a mean of 10,000

and is uniformly distributed between 9,000 and 11,000 , what is the probability the resistance is between 9,900 and 10,100 ?

• F(9900,10100) = 200/2000 = 0.1

5. Statistics

3. Requirements 52

Binomial (1 of 2)

f(x) = n!/[(n-x)!x!]px (1-p)n-x where p = probability of success on a single trial

Used when all outcomes can be expressed as either successes or failures

Mean = npStandard deviation = sqrt[np(1-p)]

5. Statistics

3. Requirements 53

Binomial (2 of 2)

Example• 10 percent of a production run of

assemblies are defective. If 5 assemblies are chosen, what is the probability that exactly 2 are defective?

• f(2) = 5!/(3!2!)(0.12)(0.93) = 0.07

5. Statistics

3. Requirements 54

Normal (1 of 2)

f(x) = 1/[sqrt(2)exp[-(x-)2/(2 2)F(x) = erf[(x-)/] + 0.5Mean = Standard deviation = Can be derived from binomial distribution

5. Statistics

3. Requirements 55

Normal (2 of 2)

Example• If the mean mass of a set of products is

50 kg and the standard deviation is 5 kg, what is the probability the mass is less than 60 kg?

• F(60) = erf[(60-50)/5] + 0.5 = 0.97

5. Statistics

3. Requirements 56

Poisson (1 of 2)

f(x) = e-x/x! (>0) = average number of times that event

occurs per period• x = number of time event occurs

Mean = Standard deviation = sqrt()Derived from binomial distributionUsed to quantify events that occur

relatively infrequently but at a regular rate

5. Statistics

3. Requirements 57

Poisson (2 of 2)

Example• The system generates 5 false alarms per

hour.• What is the probability there will be exactly

3 false alarms in one hour? = 5• x = 3• f(3) = e-5(5)3/3! = 0.14

5. Statistics

3. Requirements 58

Exponential (1 of 2)

F(x) = exp(- x)F(x) = 1 - exp(- x)Mean = 1/Standard deviation = 1/ Used in reliability computations

where = 1/MTBF

5. Statistics

3. Requirements 59

Exponential (2 of 2)

Example• If the MTBF of a part is 100 hours, what

is the probability the part will have failed by 150 hours?

• F(150) = 1 - exp(- 150/100) = 0.78

5. Statistics

3. Requirements 60

Raleigh (1 of 2)

f(r) = [1/(22) * exp[-r2/(2 2)]F(r) = 1 - exp[-r2/(2 2)]Mean = sqrt(/2)Standard deviation = sqrt(2) Derived from binomial distributionUsed to describe radial distribution when

uncertainty in x and y are described by normal distributions

5. Statistics

3. Requirements 61

Raleigh (2 of 2)

Example• If uncertainty in x and y positions are

each described by a normal distribution with zero mean and = 2, what is the probability the position is within a radius of 1.5?

• F(1.5) = 1 - exp[-(1.5)2/(2 x 22)] = 0.25

5. Statistics

3. Requirements 62

Sampling

A frequent problem is obtaining enough samples to be confident in the answer

5. Statistics

N

M

N>M

3. Requirements 63

Combining error sources (1 of 4)

Variances from multiple error sources can be combined by adding variances

Example

5. Statistics

xorig = standard deviation in original position = 1 mvorig = standard deviation in original velocity = 0.5 m/sT = time between samples = 2 secxcurrent = error in current position

= square root of [(xorig)2 + (vorig * T)2] = sqrt(2)

3. Requirements 64

Combining error sources (2 of 4) When multiple dimensions are included, covariance matrices can be added

When an error source goes through a linear transformation, resulting covariance is expressed as follows

5. Statistics

P1 = covariance of error source 1P2 = covariance of error source 2P = resulting covariance = P1 + P2

T = linear transformationTT = transform of linear transformationPorig = covariance of original error sourceP = T * P * TT

3. Requirements 65

Combining error sources (3 of 4)

5. Statistics

Example of propagation of position

xorig = standard deviation in original position = 2 mvorig = standard deviation in original velocity = 0.5 m/sT = time between samples = 4 secxcurrent = error in current position

xcurrent = xorig + T * vorig

vcurrent = vorig

1 0.5 0 1

T = Porig =22

00

0.52

Pcurrent = T * P orig * TT = 1 4 0 1

1 0 4 1

40

00.25

= 164

40.25

3. Requirements 66

Combining error sources (4 of 4)

5. Statistics

Example of angular rotation

Xoriginal = original coordinates

Xcurrent = current coordinates

T = transformation corresponding to angular rotation

cos -sin sin cos

T = where = atan(0.75)

Porig =1.64 -0.48-0.48 1.36

Pcurrent = T * P orig * TT = 0.8 -0.60.6 0.8

= 20

01

1.64 -0.48-0.48 1.36

0.8 0.6-0.6 0.8

x’

y’

x

y

3. Requirements 67

6. Software

MemoryThroughputLanguageDevelopment method

6. Software

3. Requirements 68

Memory (1 of 3)

All general purpose computers shall have 50 percent spare memory capacity

All digital signal processors (DSPs) shall have 25 percent spare on-chip memory capacity

All digital signal processors shall have 30 percent spare off-chip memory capacity

All mass storage units shall have 40 percent spare memory capacity

All firmware shall have 20 percent spare memory capacity

6. Software

3. Requirements 69

Memory (2 of 3)There shall be 50 percent spare memory capacity

reference capacity memory-used

usage common less-common

capacity 100 Mbytes 100 Mbytes

memory-used 60 Mbytes 60 Mbytes

spare memory 40 Mbytes 40 Mbytes

percent spare 40 percent 67 percent

pass/fail fail passThere are at least two ways of interpreting the meaning of spare memory capacity based on the reference used

as the denominator in computing the percentage

There are at least two ways of interpreting the meaning of spare memory capacity based on the reference used

as the denominator in computing the percentage6. Software

3. Requirements 70

Memory (3 of 3)

Memory capacity is most often verified by analysis of load files

Memory capacity is frequently tracked as a technical performance parameter (TPP)

Contractors don’t like to consider that firmware is software because firmware is often not developed using software development methodology and firmware is not as likely to grow in the future

Memory is often verified by analysis, and firmware is often not considered to be software

Memory is often verified by analysis, and firmware is often not considered to be software

6. Software

3. Requirements 71

Throughput (1 of 5)

All general purpose computers shall have 50 percent spare throughput capacity

All digital signal processors shall have 25 percent spare throughput capacity

All firmware shall have 30 percent spare throughput capacity

All communication channels shall have 40 percent spare throughput capacity

All communication channels shall have 20 percent spare terminals

6. Software

3. Requirements 72

Throughput (2 of 5)There shall be 100 percent spare throughput capacity

reference capacity throughput-used

usage common common

capacity 100 MOPS 100 MOPS

throughput-used 50 MOPS 50 MOPS

spare throughput 50 MOPS 50 MOPS

percent spare 50 percent 100 percent

pass/fail fail passThere are two ways of interpreting of spare throughput

capacity based on reference used as denominatorThere are two ways of interpreting of spare throughput

capacity based on reference used as denominator6. Software

3. Requirements 73

Throughput (3 of 5)

Availability of spare throughput• Available at the highest-priority-application level

-- most common• Available at the lowest-priority-application level

-- common• Available in proportion to the times spent by

each segment of the application -- not common

Assuming the spare throughput is available at the highest-priority-application level is

the most common assumption

Assuming the spare throughput is available at the highest-priority-application level is

the most common assumption

6. Software

3. Requirements 74

Throughput (4 of 5)

Throughput capacity is most often verified by test• Analysis -- not common• Time event simulation -- not common• Execution monitor -- common but

requires instrumentation code and hardware

6. Software

3. Requirements 75

Throughput (5 of 5)

• Execution of a code segment that uses at least the number of spare throughput instructions required -- not common but avoids instrumentation

Instrumenting the software to monitor runtime or inserting a code segment that uses at least the

spare throughput are two methods of verifying throughput

Instrumenting the software to monitor runtime or inserting a code segment that uses at least the

spare throughput are two methods of verifying throughput

6. Software

3. Requirements 76

Language (1 of 2)

No more than 15 percent of the code shall be in assembly language.• Useful for device drivers and for speed• Not as easily maintained

6. Software

3. Requirements 77

Language (2 of 2)

Remaining code shall be in Ada• Ada is largely a military language and is

declining in popularity• C++ growing in popularity

Language is verified by analysis of code

C++ is becoming the most popular programming language but assembly language may still need

to be used

C++ is becoming the most popular programming language but assembly language may still need

to be used

6. Software

3. Requirements 78

Development method

Several methods are available• Structured-analysis-structured-design vs

Hatley-Pirba• Functional vs object-oriented• Classical vs clean-room

Generally a statement of work issue and not a requirement although customer prefers a proven, low-risk approach

Customer does not usually specify the development method

Customer does not usually specify the development method

6. Software

top related