No Slide Title

Download Report

Transcript No Slide Title

Agenda for understand req activity
1. Numbers
2. Decibels
3. Matrices
4. Transforms
5. Statistics
6. Software
3. Requirements
1
1. Numbers
Significant digits
Precision
Accuracy
3. Requirements
1. Numbers
2
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
3. Requirements
1. Numbers
3
Significant digits (2 of 5)
number
Examples
digits
implied range
251
25.1
0.000251
251x105
2.51x10-3
3
3
3
3
3
250.5 to 251.5
25.05 to 25.15
0.0002505 to 0.0002515
250.5x105 to 251.5x105
2.505x10-3 to 2.515x10-
2510
251.0
4
4
2509.5 to 2510.5
250.95 to 251.05
3
3. Requirements
1. Numbers
4
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
3. Requirements
1. Numbers
5
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
3. Requirements
1. Numbers
6
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
3. Requirements
1. Numbers
7
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
3. Requirements
1. Numbers
8
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.
3. Requirements
1. Numbers
9
2. Decibels
Definitions
Common values
Examples
Advantages
Decibels as absolute units
Powers of 2
3. Requirements
2. Decibels
10
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
3. Requirements
2. Decibels
11
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
3. Requirements
2. Decibels
12
Common values
dB
0
1
2
3
4
5
6
7
8
9
10
100
1000
3. Requirements
ratio
1
1.26
1.6
2
2.5
3.2
4
5
6.3
8
10
20
30
2. Decibels
13
Examples
5000 = 5 x 1000; 7 dB + 30 dB = 37 dB
49 dB = 40 dB + 9 dB; 8 x 10,000 = 80,000
3. Requirements
2. Decibels
14
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
3. Requirements
2. Decibels
15
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
3. Requirements
2. Decibels
16
Decibels as absolute units
dBW = dB relative to 1 watt
dBm = dB relative to 1 milliwatt
dBsm = dB relative to one square
meter
dBi = dB relative to an isotropic
radiator
3. Requirements
2. Decibels
17
Powers of 2
20
24
210
223
234
exact value
approximate value
1
16
1024
8,388,608
17,179,869,184
1
16
1 x 1,000
8 x 1,000,000
16 x 1,000,000,000
2xy = 2y x 103x
3. Requirements
2. Decibels
18
3. Matrices
Addition
Subtraction
Multiplication
Vector, dot product, & outer product
Transpose
Determinant of a 2x2 matrix
Cofactor and adjoint matrices
Determinant
Inverse matrix
Orthogonal matrix
3. Requirements
3. Matrices
19
Addition
C=A+B
1 -1 0
A= -2 1 -3
2 0 2
1
B= 0
-1
-1 -1
4 2
0 1
2
C= -2
1
-2 -1
5 -1
0 3
cIJ = aIJ + bIJ
3. Requirements
3. Matrices
20
Subtraction
C=A-B
1 -1 0
A= -2 1 -3
2 0 2
1
B= 0
-1
-1 -1
4 2
0 1
0 0 1
C= -2 -3 -5
3 0 1
cIJ = aIJ - bIJ
3. Requirements
3. Matrices
21
Multiplication
C=A-B
1 -1 0
A= -2 1 -3
2 0 2
1
B= 0
-1
-1 -1
4 2
0 1
C=
1
1
0
-5 -3
6 1
-2 0
cIJ = aI1 * b1J + aI2 * b2J + aI3 * b3J
3. Requirements
3. Matrices
22
Vector, dot product, & outer product
A vector v is an N x 1 matrix
Dot product = inner product = vT x v = a
scalar
Outer product = v x vT = N x N matrix
3. Requirements
3. Matrices
23
Transpose
B=AT
1 -1 0
A= -2 1 -3
2 0 2
1
B= -1
0
-2
1
-3
2
0
2
bIJ = aJI
3. Requirements
3. Matrices
24
Determinant of a 2x2 matrix
B
=
1 -1
-2 1
= -1
2x2 determinant = b11 * b22 - bI2 * b21
3. Requirements
3. Matrices
25
Cofactor and adjoint matrices
1 -1 0
A= -2 1 -3
2 0 2
1 -3
0 2
B = cofactor =
-1
0
-2
2
1
0
0
2
1
2
0
2
1 -1
2 0
-1 0
0 -3
1
-2
0
-3
1 -1
-2 1
C=BT = adjoint=
3. Requirements
-2 -3
2 2
2 -2 -2
= 2 2 -2
3 3 -1
2 2 3
-2 2 3
-2 -2 -1
3. Matrices
26
Determinant
determinant of A =
1 -1
0
1 -1 0
-2 1 -3
2 0 2
2
-2
-2
=4
=4
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
3. Requirements
3. Matrices
27
Inverse matrix
B = A-1 =adjoint(A)/determinant(A) =
1 -1 0
-2 1 -3
2 0 2
3. Requirements
0.5 0.5 0.75
-0.5 0.5 0.75
-0.5 -0.5 -0.25
3. Matrices
0.5 0.5 0.75
-0.5 0.5 0.75
-0.5 -0.5 -0.25
1 0 0
= 0 1 0
0 0 1
28
Orthogonal matrix
An orthogonal matrix is a matrix whose
inverse is equal to its transpose.
1
0
0
0
0
cos  sin 
-sin  cos 
3. Requirements
1
0
0
0
0
1 0 0
cos  -sin  = 0 1 0
sin  cos 
0 0 1
3. Matrices
29
4. Transforms
Definition
Examples
Time-domain solution
Frequency-domain solution
Terms used with frequency response
Power spectrum
Sinusoidal motion
Example -- vibration
3. Requirements
4. Transforms
30
Definition
Transforms -- a mathematical conversion
from one way of thinking to another to
make a problem easier to solve
problem
in original
way of
thinking
transform
3. Requirements
solution
in transform
way of
thinking
4. Transforms
solution
in original
way of
thinking
inverse
transform
31
Examples (1 of 3)
problem
in English
solution
in English
English to
algebra
3. Requirements
solution
in algebra
4. Transforms
algebra to
English
32
Examples (2 of 3)
problem
in English
solution
in English
English to
matrices
3. Requirements
solution
in matrices
4. Transforms
matrices to
English
33
Examples (3 of 3)
problem
in time
domain
Fourier
transform
solution
in frequency
domain
inverse
Fourier
transform
solution
in time
domain
• Other transforms
• Laplace
• z-transform
• wavelets
3. Requirements
4. Transforms
34
Time-domain solution
We typically think in the time domain -- a
time input produces a time output
input
output
amplitude
amplitude
time
3. Requirements
system
4. Transforms
time
35
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
3. Requirements
4. Transforms
36
Frequency-domain solution (2 of 2)
input (sinusoids)
output
amplitude (dB)
log frequency
magnitude (dB)
system
log frequency
phase (angle)
0
-180
log frequency
3. Requirements
4. Transforms
37
Terms used with frequency response
Octave is a range of 2x
Decade is a range of 10x
amplitude (dB)
power (dB)
20,10
6, 3
Slope =
• 20 dB/decade, amplitude
• 6 dB/octave, amplitude
•10 dB decade, power
• 3 dB decade, power
2
10
frequency
3. Requirements
4. Transforms
38
Power spectrum
A power spectrum is a special form of
frequency response in which the ordinate
represents power
g2-Hz (dB)
log frequency
3. Requirements
4. Transforms
39
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)
3. Requirements
4. Transforms
40
Example -- vibration
input
g2-Hz (dB)
log frequency
transmissivity-squared
amplitude (dB)
log frequency
output
g2-Hz (dB)
log frequency
Output vibration is product of input vibration
times the transmissivity-squared at each frequency
3. Requirements
4. Transforms
41
5. Statistics (1 of 2)
Frequency distribution
Sample mean
Sample variance
CEP
Density function
Distribution function
Uniform
Binomial
3. Requirements
5. Statistics
42
5. Statistics (1 of 2)
Normal
Poisson
Exponential
Raleigh
Sampling
Combining error sources
3. Requirements
5. Statistics
43
Frequency distribution
Frequency distribution -- A histogram or
polygon summarizing how raw data can
be grouped into classes
number
n = sample size = 39
8
6
4
2
3. Requirements
2
4
5
60
61
62
7
4
3
22
63 64 65 66 67
height (inches)
68
5. Statistics
6
6
44
Sample mean
N
  =  xi
i=1
N
An estimate of the population mean
Example  = [ 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
3. Requirements
5. Statistics
45
Sample variance
N
  2=

i=1
(xi -  )2
N-1
An estimate of the population variance
 = standard deviation
Example 2 = [ 2 x (60 - )2 +
3. Requirements
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
46
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 + y2)]
CEP
3. Requirements
5. Statistics
47
Density function
Probability that a discrete event x will occur
Non-negative function whose integral over
the entire range of the independent variable
is 1
f(x)
x
3. Requirements
5. Statistics
48
Distribution function
Probability that a numerical event x or less
occurs
The integral of the density function
F(x)
1.0
x
3. Requirements
5. Statistics
49
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)
3. Requirements
5. Statistics
50
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
3. Requirements
5. Statistics
51
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 = np
Standard deviation = sqrt[np(1-p)]
3. Requirements
5. Statistics
52
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
3. Requirements
5. Statistics
53
Normal (1 of 2)
f(x) = 1/[sqrt(2)exp[-(x-)2/(2 2)
F(x) = erf[(x-)/] + 0.5
Mean = 
Standard deviation = 
Can be derived from binomial distribution
3. Requirements
5. Statistics
54
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
3. Requirements
5. Statistics
55
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 distribution
Used to quantify events that occur
relatively infrequently but at a regular rate
3. Requirements
5. Statistics
56
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
3. Requirements
5. Statistics
57
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
3. Requirements
5. Statistics
58
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
3. Requirements
5. Statistics
59
Raleigh (1 of 2)
f(r) = [1/(22) * exp[-r2/(2 2)]
F(r) = 1 - exp[-r2/(2 2)]
Mean =  sqrt(/2)
Standard deviation =  sqrt(2)
Derived from binomial distribution
Used to describe radial distribution when
uncertainty in x and y are described by
normal distributions
3. Requirements
5. Statistics
60
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
3. Requirements
5. Statistics
61
Sampling
A frequent problem is obtaining enough
samples to be confident in the answer
N
N>M
M
3. Requirements
5. Statistics
62
Combining error sources (1 of 4)
Variances from multiple error sources can
be combined by adding variances
 Example
xorig = standard deviation in original position = 1 m
vorig = standard deviation in original velocity = 0.5 m/s
T = time between samples = 2 sec
xcurrent = error in current position
= square root of [(xorig)2 + (vorig * T)2] = sqrt(2)
3. Requirements
5. Statistics
63
Combining error sources (2 of 4)
When multiple dimensions are included,
covariance matrices can be added
P1 = covariance of error source 1
P2 = covariance of error source 2
P = resulting covariance = P1 + P2
When an error source goes through a
linear transformation, resulting covariance
is expressed as follows
T = linear transformation
TT = transform of linear transformation
Porig = covariance of original error source
P = T * P * TT
3. Requirements
5. Statistics
64
Combining error sources (3 of 4)
Example of propagation of position
xorig = standard deviation in original position = 2 m
vorig = standard deviation in original velocity = 0.5
m/s
T = time between samples = 4 sec
xcurrent = error in current position
xcurrent = xorig + T * vorig
vcurrent = vorig
T = 1 0.5
0 1
Pcurrent = T * P orig * TT =
3. Requirements
Porig =
1
0
4
1
22 0
0 0.52
4
0
5. Statistics
0
0.25
1
4
0
1
= 16 4
4 0.25
65
Combining error sources (4 of 4)
Example of angular rotation
Xoriginal = original coordinates
Xcurrent = current coordinates
T = transformation corresponding to angular rotation
y
y’
T = cos -sin 
where  = atan(0.75)
sin  cos 
Porig =
3. Requirements
x
1.64 -0.48
-0.48 1.36
Pcurrent = T * P orig * TT =

x’
0.8 -0.6
0.6 0.8
1.64 -0.48
-0.48 1.36
5. Statistics
0.8 0.6
-0.6 0.8
= 2
0
0
1
66
6. Software
Memory
Throughput
Language
Development method
3. Requirements
6. Software
67
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
3. Requirements
6. Software
68
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
pass
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 percentage
3. Requirements
6. Software
69
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
3. Requirements
6. Software
70
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
3. Requirements
6. Software
71
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
pass
There are two ways of interpreting of spare throughput
capacity based on reference used as denominator
3. Requirements
6. Software
72
Throughput (3 of 5)
Availability of spare throughput
• Available at the highest-priorityapplication 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
3. Requirements
6. Software
73
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
3. Requirements
6. Software
74
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
3. Requirements
6. Software
75
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
3. Requirements
6. Software
76
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
3. Requirements
6. Software
77
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
3. Requirements
6. Software
78