Download 06_dsgn

Document related concepts

Generalized linear model wikipedia , lookup

Chirp spectrum wikipedia , lookup

Transcript
Agenda for design activity
1. Requirements
2. Numbers
3. Decibels
4. Matrices
5. Transforms
6. Statistics
7. Software
1
1. Requirements
Definition of a requirement
Occurrence of requirements
Guidelines for a good requirement
Examples for each guideline
Tools for writing good requirements
Notes
1. Requirements
2
Definition of a requirement
Something obligatory or demanded
Statement of some needed thing or
characteristic
1. Requirements
3
Occurrence of requirements
Writing requirements occurs in both the
understand- requirements activity and the
design activity
The customer has RAA for requirements in
the understand- requirements activity
even though the contractor may actually
write the requirements
The contractor has RAA for requirements
in the design activity
1. Requirements 4
Guidelines for a good requirement
Needed
Capable of being verified
Feasible schedule, cost, and
implementation
At correct level in hierarchy
Cannot be misunderstood
Grammar and spelling correct
Does not duplicate information
Errors in requirements come mainly from
incorrect facts (50%), omissions (30%),
inconsistent (15%), ambiguous (2%), misplaced (2%)
1. Requirements 5
Example for each guideline
Example 1 -- needed
Example 2 -- verification
Example 3 -- feasible
Example 4 -- level
Example 5 -- understanding
Example 6 -- duplication
Example 7 -- grammar and spelling
Example 8 -- tough requirements
1. Requirements
6
Example 1 -- needed
The motor shall weigh less than 10 pounds.
The software shall use less than 75 percent of
the computer memory available for software.
The MTBF shall be greater than 1000 hours.
1. Requirements
7
Example 2 -- verification (1 of 3)
Customer want -- The outside wall shall be a
material that requires low maintenance
1. Requirements
8
Example 2 -- verification (2 of 3)
First possible rewording -- The outside
wall shall be brick.
• More verifiable
• Limits contractor options
• Not a customer requirement
1. Requirements
9
Example 2 -- verification (3 of 3)
Second possible rewording -- The outside
wall shall be one that requires low
maintenance. Low maintenance material
is one of the following: brick, stone,
concrete, stucco, aluminum, vinyl, or
material of similar durability; it is not one
of the following: wood, fabric, cardboard,
paper or material of similar durability
• Uses definition to explain undefined
term
1. Requirements 10
Example 3 -- feasible
Not feasible requirement -- The assembly
shall be made of pure aluminum having a
density of less than 50 pounds per cubic
foot
1. Requirements 11
Example 4 -- level
airplane
 Airplane shall be capable carrying up to 2000 pounds
 Wing airfoil shall be of type Clark Y
wing
 Wing airfoil shall be of type Clark Y
Wing airfoil type is generally a result of design
and should appear in the lower product spec
and not in the higher product spec.
1. Requirements
12
Example 5 -- understanding
Avoid imprecise terms such as
• Optimize
• Maximize
• Accommodate
• Etc.
• Support
• Adequate
1. Requirements
13
Example 6 -- duplication
Capable of a maximum rate of 100 gpm
Capable of a minimum rate of 10 gpm
Run BIT while pumping 10 gpm - 100 gpm
Vs: Run BIT while pumping between min.
and max.
1. Requirements 14
Example 7 -- grammar and spelling
The computers is comercial-off-the-shelf
items
Incorrect grammar or spelling will divert
customer review of the requirements from
the technical content
1. Requirements
15
Example 8 -- tough requirements
BIT false alarm rate < 3 percent
Computer throughput < 75 percent of capacity
Perform over all altitudes and speeds
Conform with all local, state, and national laws
There shall be no loss of performance
Shall be safe
The display shall look the same
TBDs and TBRs
Statistics
1. Requirements
16
Tools for writing good requirements
Requirements elicitation
Modeling
Trade studies
1. Requirements
17
Notes
Perfect requirements can’t always be
written
It’s not possible to avoid all calamities
Requirements and design are similar and
therefore are often confused and placed at
the wrong level in the hierarchy
1. Requirements
18
2. Numbers
Significant digits
Precision
Accuracy
2. Numbers
19
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
2. Numbers 20
Significant digits (2 of 5)
number
digits
251
25.1
0.000251
251x105
2.51x10-3
2512.
251.0
3
3
3
3
3
4
4
Examples
implied range
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-3
2511.5 to 2512.5
250.95 to 251.05
2. Numbers
21
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
2. Numbers 22
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
2. Numbers
23
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
2. Numbers 24
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
2. Numbers 25
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.
2. Numbers
26
3. Decibels
Definitions
Common values
Examples
Advantages
Decibels as absolute units
Powers of 2
3. Decibels 27
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. Decibels
28
Definitions (2 of 2)
Power ratio
• dB = 10 log10(P2/P1)
• P2/P1=10dB/10
Voltage power
• dB = 20 log10(V2/V1)
• V2/V1=10dB/20
3. Decibels
29
Common values
dB
0
1
2
3
4
5
6
7
8
9
10
20
30
ratio
1
1.26
1.6
2
2.5
3.2
4
5
6.3
8
10
100
1000
3. Decibels
30
Examples
5000 = 5 x 1000; 7 dB + 30 dB = 37 dB
49 dB = 40 dB + 9 dB; 8 x 10,000 = 80,000
3. Decibels
31
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. Decibels
32
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. Decibels
33
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. Decibels 34
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. Decibels
35
4. Matrices
Addition
Subtraction
Multiplication
Vector, dot product, & outer product
Transpose
Determinant of a 2x2 matrix
Cofactor and adjoint matrices
Determinant
Inverse matrix
Orthogonal matrix
4. Matrices
36
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
4. Matrices
37
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
4. Matrices
38
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
4. Matrices
39
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
4. Matrices
40
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
4. Matrices
41
Determinant of a 2x2 matrix
B
=
1 -1
-2 1
= -1
2x2 determinant = b11 * b22 - b12 * b21
4. Matrices
42
Cofactor and adjoint matrices
1 -1 0
A= -2 1 -3
2 0 2
1 -3
-2 -3
0 2
2 2
B = cofactor = - -1
0
0
2
1
2
-1 0 - 1
0 -3
-2
C=BT = adjoint=
0
2
0
-3
2 2 3
-2 2 3
-2 -2 -1
-2
2
-
1
0
1 -1
2 0
2 -2 -2
= 2 2 -2
3 3 -1
1 -1
-2 1
4. Matrices
43
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 column of the adjoint matrix =
dot product of any row (or column) in A times
the corresponding row (or column) in the cofactor matrix
4. Matrices 44
Inverse matrix
B = A-1 =adjoint(A)/determinant(A) =
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
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
4. Matrices
45
Orthogonal matrix
An orthogonal matrix is a matrix whose
inverse is equal to its transpose.
1
0
0
0
0
cos  sin 
-sin  cos 
1
0
0
0
0
1 0 0
cos  -sin  = 0 1 0
sin  cos 
0 0 1
4. Matrices
46
5. Transforms
Definition
Examples
Time-domain solution
Frequency-domain solution
Terms used with frequency response
Power spectrum
Sinusoidal motion
Example -- vibration
5. Transforms
47
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
solution
in transform
way of
thinking
solution
in original
way of
thinking
inverse
transform
5. Transforms
48
Examples (1 of 3)
problem
in English
solution
in English
English to
algebra
solution
in algebra
algebra to
English
5. Transforms
49
Examples (2 of 3)
problem
in English
solution
in English
English to
matrices
solution
in matrices
matrices to
English
5. Transforms
50
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
5. Transforms
51
Time-domain solution
We typically think in the time domain -- a
time input produces a time output
input
output
amplitude
amplitude
time
system
time
5. Transforms
52
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
5. Transforms
53
Frequency-domain solution (2 of 2)
input (sinusoids)
output
amplitude (dB)
magnitude (dB)
0
log frequency
phase (angle)
0
system
log frequency
phase (angle)
0
-180
log frequency
log frequency
5. Transforms
54
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/octave, power
2
10
frequency
5. Transforms
55
Power spectrum
A power spectrum is a special form of
frequency response in which the ordinate
represents power
g2-Hz (dB)
log frequency
5. Transforms 56
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)
5. Transforms
57
Example -- vibration
input
g2-Hz (dB)
log frequency
transmissivity-squared
[amplitude (dB)] 2
log frequency
output
g2-Hz (dB)
log frequency
Output vibration is product of input vibration
times the transmissivity-squared at each frequency
5. Transforms
58
6. Statistics (1 of 2)
Frequency distribution
Sample mean
Sample variance
CEP
Density function
Distribution function
Uniform
Binomial
6. Statistics
59
6. Statistics (1 of 2)
Normal
Poisson
Exponential
Raleigh
Excel tools
Sampling
Combining error sources
6. Statistics
60
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
2
4
5
60
61
62
7
4
6
6
3
22
63 64 65 66 67
height (inches)
68
6. Statistics
61
Sample mean
N
  =  xi
i=1
N
An estimate of the population mean
Example  = [ 2 x 60 +
4 x 61 +
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
6. Statistics
62
Sample variance
N
  2=
i=1(xi -  )2
N-1
An estimate of the population variance
 = standard deviation
Example 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
6. Statistics
63
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
6. Statistics
64
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
6. Statistics
65
Distribution function
Probability that a numerical event x or less
occurs
The integral of the density function
F(x)
1.0
x
6. Statistics 66
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)
6. Statistics
67
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
6. Statistics
68
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)]
6. Statistics 69
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
6. Statistics
70
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
6. Statistics 71
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
6. Statistics
72
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
6. Statistics
73
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
6. Statistics 74
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
6. Statistics
75
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
6. Statistics
76
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 normal distribution
Used to describe radial distribution when
uncertainty in x and y are described by
normal distributions
6. Statistics 77
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
6. Statistics 78
Excel tools
Functions
• COUNT
• AVERAGE
• MEDIAN
• STDDEV
• BINODIST
• POISSON
Tools
• Data Analysis
• Random number generation
• Histogram
6. Statistics 79
Sampling
A frequent problem is obtaining enough
samples to be confident in the answer
N
N>M
M
6. Statistics 80
Combining error sources (1 of 3)
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
6. Statistics 81
Combining error sources (2 of 3)
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 4
0 1
Pcurrent = T * P orig * TT =
Porig =
1
0
4
1
22 0
0 0.52
4
0
0
0.25
1
4
0
1
= 8
1
1
0.25
6. Statistics 82
Combining error sources (3 of 3)
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 =
x
1.64 -0.48
-0.48 1.36
Pcurrent = T * P orig * TT =
0.8 -0.6
0.6 0.8

x’
1.64 -0.48
-0.48 1.36
0.8 0.6
-0.6 0.8
= 2
0
0
1
6. Statistics
83
7. Software
Memory
Throughput
Language
Development method
7. Software
84
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
7. Software
85
Memory (2 of 3)
There shall be 50 % 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
7. Software 86
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
7. Software 87
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
7. Software 88
Throughput (2 of 5)
There shall be 100 % 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
7. Software
89
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
7. Software 90
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
7. Software 91
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
7. Software 92
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
7. Software 93
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
7. Software 94
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
7. Software 95