DoE + 3. Analysis
DoE + 3. Analysis
Design of
Experiments
1
Why Are Experiments Needed in Engineering: Basic purposes
To learn unknowns based on what’s known
• Discovery/Development:
uncover unexpected behaviors Material
or phenomena that were not discovery
initially considered and test
innovative ideas or products.
• Optimization: fine-tune
designs and processes for Manufacturing
maximum efficiency and optimization via
performance. mechanical tests
• Validation/Confirmation:
confirm whether theoretical
calculations and simulations Validation of
align with real-world behavior. physical
laws/models
Our course
2
Why Are Experiments Needed in Engineering: Practical aspects
• Ensure Safety, Reliability, and Real-World Validation:
• To identify potential failure modes, ensuring safety and
validating performance under real-world conditions with
variability, weather conditions, and uncertainty.
• Examples: Stress testing airplane wings to determine their
breaking points under extreme conditions.
• Regulatory Compliance:
• Many engineering solutions must meet specific legal and
industry standards, which require experimental validation.
• Example: Testing medical devices to meet Department of
Health certification requirements.
3
Steps in experiments
Example: alloy toughness optimization
1. Recognize the Problem:
Define the objective and scope of the experiment.
2. Select the Factors and Response Variable:
Determine the controlled factors and their levels/range of variation.
Identify the measurable outcome variables for the objective.
3. Design of the Experiment:
Select an appropriate experimental design (e.g., full factorial,
fractional factorial, etc.) to systematically study the factors and
their interactions. Defines how experiments are structured and
conducted (e.g., Full Factorial, Taguchi, RSM)
4. Perform the Experiment: Full factorial
Execute the experiments according to the design while controlling
constants and minimizing spurious factors.
5. Analyze the Data:
Use statistical tools to evaluate the main effects, interactions, and
significance of the factors on the response variable.
6. Draw Conclusions and Make Recommendations:
Summarize findings, identify optimal conditions, and provide
actionable insights for decision-making or future studies. 4
Design of Experiments (DoE) in Mechanical Engineering
1. Importance Key Components of DOE
2. Optimizes Engineering Processes – Helps in • Factors and Levels – Identifies
systematically planning experiments to improve independent variables (factors) and their
performance, efficiency, and reliability in possible levels affecting the system.
mechanical systems. • Response Variables – Defines measurable
3. Reduces Time and Costs – Efficiently outputs that indicate system performance.
determines the effects of multiple variables, • Experimental Design Types:
minimizing the number of required • Full Factorial Design
experiments.
• Fractional Factorial Design
4. Enhances Product Quality – Identifies key
• Taguchi Method
factors influencing performance, leading to
better design and manufacturing outcomes.
5. Supports Data-Driven Decision Making –
Uses statistical methods to analyze
experimental results, ensuring objective
conclusions.
5
Design of experimental factors*
Why? Experiments are Type Role in DoE Example
• expensive;
Factors intentionally kept
Wall insulation, room size,
• time consuming; Constants fixed to avoid influencing
number of windows.
the results.
• not perfectly repeatable.
Variables deliberately Heater power, ventilation
Controlled Factors manipulated to study their air flow rate, window &
Example: winter room temperature effects. curtain usage.
Outcomes or results
Response Variables measured during the Room temperature (°C).
experiment.
Outdoor temperature,
Unintended or uncontrolled
Uncontrolled Factors humidity fluctuations,
variables but may
(aka spurious factors ) heater/sensor fluctuation,
influence results.
human metabolism.
Combined effects of two or
Interaction between heater
more factors, which may
Interaction Factors power and ventilation air
differ from the sum of their
flow.
individual effects.
Important! 6
Design of experimental factors: example 1
A student wants to study how the cup material (ceramic, plastic, or metal)
affects how quickly hot coffee cools down. They pour coffee at 90°C into
different cups and measure the temperature drop over 10 minutes. The
experiment is conducted in an air-conditioned room.
Which of the following correctly identifies the response variable, controlled
factor, constant, and spurious factor?
A. C.
• Response Variable: Cup material • Response Variable: Initial coffee temperature
• Controlled Factor: Temperature drop • Controlled Factor: Room temperature
• Constant: Room temperature • Constant: Cup material
• Spurious Factor: Air humidity • Spurious Factor: Coffee stirring speed
B. D.
• Response Variable: Temperature drop • Response Variable: Room temperature
• Controlled Factor: Cup material • Controlled Factor: Coffee type
• Constant: Initial coffee temperature • Constant: Cup material
• Spurious Factor: Room temperature fluctuations • Spurious Factor: Coffee cooling rate
7
Design of experimental factors: example 2
A. C.
• Response Variable: Power output • Response Variable: Power output
• Controlled Factor: Fuel type • Controlled Factor: Air pressure
• Constant: Air pressure • Constant: Fuel type
• Spurious Factor: Ambient temperature • Spurious Factor: Fuel quality variations
B. D.
• Response Variable: Fuel type • Response Variable: Fuel consumption
• Controlled Factor: Power output • Controlled Factor: Engine temperature
• Constant: Fuel consumption • Constant: Power output
• Spurious Factor: Air temperature • Spurious Factor: Engine load variations
8
Types of experimental designs (DoE)
Best guess Example: winter comfort
9
Types of experimental designs (DoE)
10
Test matrix
Determine the ranges and levels of X and Y for a test matrix as follows:
X Y Values
Values Y1 Y2 Y3 Y4 Y5
X1
OR
R(x,y)
X2
X3
X4
X5
11
One-factor-at-a-time (OFAT) vs. full factorial
Y
X Y1 Y2 Y3 Y4 … Y10
X1
. .
. …
. .
X10
some reptations)
12
One-factor-at-a-time (OFAT) vs. full factorial
• Assume we have two factors, each has two levels
Regular OFAT will need 6 runs But full factorial only needs 4 runs
Run Factor A Factor B Notes 1,2
1 Low Low Baseline (starting point) A B
Change A (A effect at B- B+
2 High Low
B=Low) 3,4
A- -, - -, +
Repeat Baseline (to
3 Low Low A+ +,- +,+
compare B effect)
Change B (B effect at
4 Low High 5,6
A=Low)
Blue arrows = a possible OFAT
Change A again (A effect
5 High High Table = full factorial
at B=High)
6 Low High Repeat B effect test A-, B+
A+, B-
A-, B-
13
One-factor-at-a-time (OFAT) vs. full factorial
14
Two-Level Factorial Experiment: Microwave Popcorn
Objective:
Identify key factors affecting popcorn taste score and unpopped kernels
Factor Name Units Low Level (–) High Level (+) Standard Run # A B C Y1 Y2
A Brand Cost Cheap Costly 1 8 – – – 74 3.1
B Time Minutes 4 6 2 1 + – – 75 3.5
C Power Percent 75 100 3 2 – + – 71 1.6
Responses: 4 4 + + – 80 1.2
Taste Score Y1: 1 (Worst) to 100 (Best). 5 3 – – + 81 0.7
Unpopped Kernels Y2: by weight (lower is better).
6 5 + – + 77 0.7
• Notice that the interaction effect of BC is even greater on an absolute scale than its parents B and C.
• In other words, the combination of time (B) and power (C) produces a big (negative) impact on taste.
What else can you find? Discuss with your classmates.
17
Reduced one-factor-at-a-time (OFAT) test matrix
Under the condition/assumption that factors are uncorrelated (do not interact), we can design
a reduced test matrix (reduced OFAT), where we vary one factor at a time (holding the other
factor constant). We can derive mathematically all the other untested conditions.
Example
Math example R(x,y) = 1- y2-x2
Y Values
X Values Y1 Y2 Y3 Y4 Y5
X1
R(x,y)
X2
X3
X4
X5
Y Values
X Values Y1 Y2 Y3 Y4 Y5
X1
X2
X3
X4
X5
10
10
𝑅 𝑋, 𝑌 = 𝑘 ⋅ 𝑎1 𝑋 2 + 𝑎2 𝑋 + 𝑎3 + 𝑎4 𝑌 2 + 𝑎5 𝑌 + 𝑎6
𝑘
𝑘=1
10 10
10
= 𝑘 ⋅ 𝑎1 𝑋 2 + 𝑎2 𝑋 + 𝑎3 + 𝑎4 𝑌 2 + 𝑎5 𝑌 + 𝑎6
𝑘
𝑘=1 𝑘=1
Add zeros
𝑅 𝑋1 , 𝑌4 = 𝑃(𝑋1 ) + 𝑄(𝑌4 ) = 𝑃 𝑋1 + 𝑄 𝑌3 − 𝑄 𝑌3 + 𝑃 𝑋3 − 𝑃 𝑋3 + 𝑄 𝑌4
= 𝑃 𝑋1 + 𝑄 𝑌3 + 𝑃 𝑋3 + 𝑄 𝑌4 − 𝑃 𝑋3 + 𝑄 𝑌3
= 𝑅 𝑋1 , 𝑌3 + 𝑅 𝑋3 , 𝑌4 − 𝑅 𝑋3 , 𝑌3 19
One-factor-at-a-time (OFAT) test matrix
How about 𝑅 𝑋, 𝑌 = 𝑎1 𝑋 2 + 𝑎2 𝑋 + 𝑎3 𝑎4 𝑌 2 + 𝑎5 𝑌 + 𝑎6 ?
Y Values
X Values Y1 Y2 Y3 Y4 Y5
X1
X2
X3
X4
X5
Discuss with your classmates and identify the matrix elements to use to find out the R(X4, Y2)
Which three values in the table shall we need to figure out R(X4,Y2)
20
More complex fractional factorial
Combinations are strategically chosen for efficiency.
A. Heater power B. Indoor air flow C. Window & Curtain
+: high +: high +: open
- : low - : low - : closed
Full factorial Fractional factorial
Expt. A B C Expt. A B C
1 + + + 1 + + +
2 + - + 2 + - -
3 + - - 3 - + -
4 + - + 4 - - +
5 - + +
• Assumption: B = A × C, meaning air flow depends on the interaction between
6 - - +
Heating Power (A) and Window & Curtain Position (C).
7 - - - • Aliasing: Assume the interaction effect A × C is aliased with the main effect of
B, so any observed effect of B could come from either B or the interaction A × C.
8 - - +
• Simplification: Assume A × C is much smaller than B (due to active ventilation),
allowing the DoE to treat them as the same and reduce experimental runs.
A good reference: 22
Design and Analysis of Experiments By Doug Montgomery Not required
Additional consideration – Statistics and Sequence
Statistical Considerations in DOE
• Randomization & Replication – Ensures unbiased results and improves reliability.
• Analysis of Variance (ANOVA) – Determines which factors significantly affect performance.
• Regression Analysis – Models relationships between variables for prediction and optimization.
• Signal-to-Noise Ratio – Used in robust design to improve performance under varying conditions.
(see Lecture 3)
Week
Task 1 2 3 4 5 6 7 8 9 10 11 12
A
B
C
D
E
F
G
H 24
3. Sampling and
Analysis
25
Two types of data in mechanical engineering
A. Static or steady-state B. Transient signal (Time dependent)
(Time independent or weakly dependent)
Pressure Mechanical loading
Length ofinside
a bolta pipe
Stress
Strain
Time
Temperature
of a room Complex function of time
26
Uncertainty: Systematic and Random error
A measured value always come with a degree of uncertainty (e.g., a length of 2.00.1 m)
The form of 𝑥0 ± ∆𝑥0 means that we should expect the true value to fall in the range of
𝑥0 − ∆𝑥0 < 𝑥 < 𝑥0 + ∆𝑥0
27
Data analysis: mean of the sample
Suppose x1, x2, …, xn is a set of n observations (a sample with size n) under the same condition.
Therefore, the unbiased estimator of the true value is the arithmetic mean
𝑛
𝑥0 = 𝑥𝑖 /𝑛 = 𝑥ҧ
𝑖=1 28
Uncertainty analysis: two kinds of standard errors
How to get ∆𝑥0 from a finite number of measurements?
Intuitively, to ensure high confidence that someone else’s measurement will lie within the
range you gave based on your measurement, the interval should be reported as
ഥ − 𝐬𝐜𝐥𝐚𝐞 ∗ 𝐒𝐄𝐌, 𝒙
[𝒙 ഥ + 𝐬𝐜𝐚𝐥𝐞 ∗ 𝐒𝐄𝐌]
29
Linear regression from the minimization of the square error
• Useful in both calibration and Output data y1, y2, …, yn measured under input conditions of x1, x2, …, xn.
data analysis For a linear correlation (y = ax + b) that best fits all the data,
the mean square error S must be minimized:
• Linear fitting most common 𝑛
1
• Visually simple 𝑆 = 𝑦𝑖 − 𝑎𝑥𝑖 + 𝑏 2
𝑛
𝑖=1
• Easy data processing Setting S/a=0 and S/b=0, we have
y = ax + b 𝑏 𝑥𝑖 + 𝑎 𝑥𝑖2 = 𝑥𝑖 𝑦𝑖
𝑛𝑏 + 𝑎 𝑥𝑖 = 𝑦𝑖
The vague measurement result we discussed previously 𝑥0 ± ∆𝑥0 is more rigorously expressed as
ഥ ± 𝒛𝝈𝒙ഥ
𝒙
where 𝜎𝑥ҧ is the standard error of the mean and z is the z-score corresponding to the desired confidence
level you want to report.
• This expression defines a confidence interval, which provides a range of values within which the true
population mean is likely to lie (depending on your desired percentage). The larger the z-score, the
larger the range, hence more likely the measured data is within the range.
• The z-score is a statistical measure that represents the number of standard deviations a data point (or
sample mean) is from the population mean.
• It comes from the z-test, assuming the data follows Gaussian distribution (strictly t-score should be
Student's t-test - Wikipedia
used when sample data size is taken into account, see Student's t-test - Wikipedia)
31
Confidence interval and z-score
The z-score connects uncertainty to confidence intervals by determining the width of the interval
based on the chosen confidence level. Larger confidence levels (e.g., 99%) require larger z-scores,
resulting in wider intervals to account for greater uncertainty.
Confidence Level z
90% 𝟏. 𝟔𝟓
95% 𝟏. 𝟗𝟔 (“2σ”)
99% 𝟐. 𝟓𝟖
99.7% 𝟑. 𝟎𝟎 (“3σ”)
99.9% 𝟑. 𝟐𝟗
99.99% 𝟑. 𝟖𝟗
99.999% 𝟒. 𝟒𝟐
99.9999% 𝟒. 𝟖𝟗
For example, at the confidence level of 95%, 95% of your repeated measurements should fall
ഥ − 𝟏. 𝟗𝟔𝝈ഥ𝒙 < 𝑥 < 𝒙
in the range of 𝒙 ഥ + 𝟏. 𝟗𝟔𝝈ഥ𝒙 while only 5% will be out of the range
32
A. Repeat measurements
A hypothetic measurement: 1000 times
Response = -3,-2,-1,0,1,2 or 3
(equal probability) 𝑥ҧ
Repeat 50 times
Standard Deviation
𝜎𝑥
2.0
1.5
1.0
• The mean (𝑥)ҧ approaches the true value (𝑥0 ). 200 400 600 800 1000
Measurement No.
0.05
𝑥0 = 𝑥ҧ Why?
Measurement No.
200 400 600 800 1000 33
Error propagation: absolute error of a calculated value
Let F be a function of a few variables F=F(x, y, z, ...). If the values of these variables
are measured or found in literature with corresponding errors
If all errors are biased similarly and measured independently, the Absolute Error of
the function at F0=F(x0, y0, z0, ...) is
34
Error propagation: relative error
Relative Error using the ratio expression (percentage change)
2 2 2
Δ𝐹0 𝑥0 𝜕𝐹 Δ𝑥0 𝑦0 𝜕𝐹 Δ𝑦0 𝑧0 𝜕𝐹 Δ𝑧0
= + +
𝐹0 𝐹0 𝜕𝑥 𝑥0 𝐹0 𝜕𝑦 𝑦0 𝐹0 𝜕𝑧 𝑧0
𝜕ln(𝐹) 𝑥 𝜕𝐹
Note = 𝜕ln(𝐹) Δ𝑥0
2
𝜕ln(𝐹) Δ𝑦0
2
𝜕ln(𝐹) Δ𝑧0
2
𝜕ln(𝑥) 𝐹 𝜕𝑥
= + +
𝜕ln(𝑥) 𝑥0 𝜕ln(𝑦) 𝑦0 𝜕ln(𝑧) 𝑧0
𝑦2
𝐹 =5∗ 𝑥∗
Example exp 𝑧
1
Take the ln of the function first ln 𝐹 = ln 5 + ln 𝑥 + 2 ln 𝑦 − 𝑧
2
then calculate. 𝜕ln(𝐹) 1 𝜕ln(𝐹) 𝜕ln(𝐹) 𝜕ln(𝐹)
= , = 2, = 1 = −𝑧
𝜕ln(𝑥) 2 𝜕ln(𝑦) 𝜕ln(𝑧) 𝜕(𝑧)
𝑧
( x + y ) = (x )2 + (y )2
pessimistic estimate optimistic estimate realistic estimate
x x
y)
y y
x+
y
(
(x+y) (x+y) x
Simple cases: Multiplication and division
𝑥𝑦
𝐹= ln 𝐹 = ln 𝑥 + ln 𝑦 − ln(𝑧)
𝑧
2 2 2
Δ𝐹0 Δ𝑥0 Δ𝑦0 Δ𝑧0 Square of ln derivatives are all 1
= + +
𝐹0 𝑥 𝑦 𝑧
Relative error
36
Uncertainty analysis – An example
An experiment to determine the Young’s modulus of a plastic rod under a fixed load:
𝑚𝑔
𝐸=
𝐴𝜀
The weight (m) that exerts the load is measured by a balance, 10.1 ± 0.4 kg
The area (A) perpendicular to the load is determined with a ruler, 5.10 ± 0.02 cm2
Both at the confidence level of 99%
𝑔 = 9.81 m/s2
The engineering strain (ε) measured by a strain gauge for five time
0.0020, 0.0017, 0.0018, 0.0019, 0.0020 Kept one more significant
𝜀 ҧ = 0.00188 figure (than they should
𝜎𝜀ത = 0.000058, Δε = 𝜎𝜀ത ∗ 2.58 = 0.00015 have) to reduce rounding
errors (optional)
10.1 × 9.81 8 Pa = 0.10 GPa
𝛦= = 1.03 × 10
5.10 × 10−4 × 0.00188
CI z 𝑔𝛥𝑚 2 𝑚𝑔𝛥𝐴 2 𝑚𝑔𝛥𝜀 2
𝛥𝐸 = + − 𝐴2𝜀 + − 𝐴𝜀2 =0.01 GPa
𝐴𝜀
99% 𝟐. 𝟓𝟖
Finally: 𝛦 = 0.10 ± 0.01 GPa
37
Error reduction
38
Error reduction
Random Errors
1. Increase reliability by repeating measurements and analyzing the
uncertainty.
2. Estimate uncertainty when uncertainty analysis is not possible:
• For stable measurements, use half of the least significant digit displayed
as the uncertainty estimate.
• For fluctuating measurements, use half the range of fluctuation displayed
as the estimate. Uncertainty:
3. Prevent instrument drift: Allow instruments to reach thermal equilibrium 0.5 if steady;
1 if fluctuating
with their environment by turning them on a few hours before use. btw 250 - 252
4. Discard invalid data caused by operator mistakes.
5. Develop skill and consistency through care and experience.
39
B. Time dependent signal: Fourier transform
A general solution
∞
A function of frequency
Since temperature T can have any arbitrary profile,
can we decompose any arbitrary function into a series
of sin and cos as the basis?
40
The Use of DFT and Fourier Transform in Mechanical Engineering
The Fourier Transform (FT) and Discrete Fourier Transform (DFT) are powerful mathematical tools
used in mechanical engineering to analyze and process signals. They help engineers gain insights
into frequency components, identify patterns, and design better systems.
Applications:
vs.
41
The Use of DFT and Fourier Transform in Mechanical Engineering
The Fourier Transform (FT) and Discrete Fourier Transform (DFT) are powerful mathematical tools
used in mechanical engineering to analyze and process signals. They help engineers gain insights
into frequency components, identify patterns, and design better systems.
Applications:
Seemingly random data
• Vibration Analysis: Identifying dominant frequencies in
vibrating systems to detect faults and optimize designs.
42
The Use of DFT and Fourier Transform in Mechanical Engineering
The Fourier Transform (FT) and Discrete Fourier Transform (DFT) are powerful mathematical tools
used in mechanical engineering to analyze and process signals. They help engineers gain insights
into frequency components, identify patterns, and design better systems.
Raw time domain signal
Applications:
43
Fourier series
1
Any bounded, periodic function (of a period T, and hence a single frequency 𝑓0 = 𝑇, angular frequency
2𝜋
𝜔0 = ) can be represented by the summation of an infinite series of sinusoidal functions
𝑇
∞ ∞
𝑎0 𝑎0
𝐹 𝑡 = + (𝑎𝑛 cos(2𝜋𝑛𝑓0 𝑡) + 𝑏𝑛 sin(2𝜋𝑛𝑓0 𝑡)) = + (𝑎𝑛 cos(𝑛𝜔0 𝑡) + 𝑏𝑛 sin(𝑛𝜔0 𝑡))
2 2
𝑛=1 𝑛=1
The coefficients can be computed by integrations within one period [-T/2, T/2]. Since the function is
periodic, any time range [t, t+T], like [0, T] can be used for integration
𝑇ൗ
2
1 𝑇Τ2 2
𝑎0 = 𝐹 𝑇 𝑡 ⅆ𝑡, and 𝑎𝑛 = න 𝐹 𝑡 cos 𝑛𝜔𝑡 ⅆ𝑡
𝑇 −
2
𝑇
𝑇
−2
𝑇ൗ
2
2
𝑏𝑛 = න 𝐹 𝑡 sin(𝑛𝜔𝑡) ⅆ𝑡
𝑇
𝑇
−2
44
Fourier series
2𝜋
Example: a periodic square wave with amplitude of 2 (T = 60.0 s, 𝜔0 = 60.0 = 0.105 rad/s)
Amplitude (V)
0.5 0.5
0
0 -0.5 0 50 100 150 200 250
t (second)
0 50 100 150 200 250 -1
-0.5 t (second) -1.5
4
𝑓1 𝑡 = sin 𝜔0 𝑡
-1 𝜋
1.5
With two terms
1
4 sin 3 𝜔0 𝑡 sin 5 𝜔0 𝑡 sin 7 𝜔0 𝑡
Amplitude (V)
𝑓∞ 𝑡 = sin 𝜔0 𝑡 + + + +. . . 0.5
𝜋 3 5 7 0
-0.5 0 50 100 150 200 250
• In practical calculation, the summation is cutoff at -1
t (second)
Amplitude (V)
0.5 0.5
Amplitude (V)
0.5
0 0
0
-0.5 0 50 100 150 200 250 -0.5 0 50 100 150 200 250 0 50 100 150 200 250
t (second) t (second) -0.5 t (second)
-1 -1
-1.5 -1.5 -1
Sawtooth, triangle, or any other periodic waveforms can be expanded into such
infinite series, just with different coefficients
46
Complex exponential form of Fourier series
Trigonometric form Complex exponential form
∞
𝑎0 ∞
𝐹 𝑡 = + (𝑎𝑛 cos(𝑛𝜔0 𝑡) + 𝑏𝑛 sin(𝑛𝜔0 𝑡))
2 𝐹(𝑡) = 𝑐𝑛 ⅇ 𝑖𝑛𝜔0𝑡
𝑛=1
𝑇ൗ
2 Euler’s identity 𝑛=−∞
2
𝑎𝑛 = න 𝐹 𝑡 cos(𝑛𝜔0 𝑡) ⅆ𝑡 ⅇ 𝑖𝜑 = 𝑐𝑜𝑠 𝜑 + 𝑖 𝑠𝑖𝑛 𝜑 𝑇ൗ
𝑇 1 2
𝑇
−2 𝑐𝑜𝑠 𝜑 = ⅇ 𝑖𝜑 + ⅇ −𝑖𝜑 ; 1
2 𝑐𝑛 = න 𝐹 𝑡 ⅇ −𝑖𝑛𝜔0𝑡 ⅆ𝑡
𝑇ൗ
2
𝑇
2 1 𝑖𝜑 𝑇
−2
𝑏𝑛 = න 𝐹 𝑡 sin(𝑛𝜔0 𝑡) ⅆ𝑡 𝑠𝑖𝑛 𝜑 = ⅇ − ⅇ −𝑖𝜑 ;
𝑇 2
𝑇
−2 𝑖 = −1
• The Fourier Series decomposes periodic signals with a single frequency ω0 into discrete frequency
components nω0.
• What if 𝑓 𝑡 is not periodic?
• For non-periodic signals, it essentially means the period T→∞, which means the spacing between
2𝜋
frequency components Δ𝜔 = 𝜔0 = →0, which can be treated as infinitesimal variation ⅆ𝜔
𝑇
2𝜋
• Intuitively, the frequency components 𝑛𝜔0 = 𝑛 = 𝜔 become a continuous variable
𝑇
• Thus, for non-periodic signals, instead of summing discrete frequency components, we integrate
over all possible frequencies.
Define 𝐹෨ 𝜔
∞ ∞
𝑖𝑛2𝜋 1 ∞ ′ 𝑖𝑛2𝜋
𝐹 𝑡 = lim 𝑐𝑛 ⅇ 𝑇 𝑡 = lim න 𝐹 𝑡′ ⅇ −𝑖𝑛𝜔0 𝑡 ⅆ𝑡′ ⅇ 𝑇 𝑡
𝑇→∞ 𝑇→∞ 𝑇 −∞
𝑛=−∞ 𝑛=−∞
𝑖𝑛2𝜋
1 2𝜋 𝑡 1 ∞
= lim σ∞𝑛=−∞ 𝐹෨ 𝜔 ⅇ 𝑇 = −∞
𝐹෨ 𝜔 ⅇ 𝑖𝜔𝑡 ⅆ𝜔
2𝜋 𝑇→∞ 𝑇 2𝜋
By the definition of Cauchy integral
Periodic
Fourier transform
∞
𝐹෨ 𝜔 = න 𝐹(𝑡) ⅇ −𝑖𝜔𝑡 ⅆ𝑡
−∞
Aperiodic
Inverse Fourier transform
1 ∞
𝐹 𝑡 = න 𝐹෨ 𝜔 ⅇ 𝑖𝜔𝑡 ⅆ𝜔
2𝜋 −∞
49
Discrete data from sampling
Analog signal
Continuous data
Sampling
Analog to digital (A/D)
Digital signal • Noise immunity in transmission
Discrete data
• Error detection & correction
• Data processing by computers
DFT: derived by sampling the Fourier Series representation of a periodic signal at discrete time
• 𝑋[𝑘] represents the frequency spectrum of the signal.
• k is the frequency index (dimensionless frequency, unit = 1)
2𝜋
• Generally use digital frequency ( 𝑁 𝑘, radian per sample)
DFT forcefully assumes that the input signal is periodic, inherent in its mathematical definition.
𝑋 𝑘 = 𝑋 𝑘 + 𝑚𝑁
For page 51-59, the equations are not
Try to prove it yourself 𝑥 𝑛 = 𝑥[𝑛 + 𝑚𝑁] required to be memorized. But you
need to understand the coefficients, the
trends and the phenomena.
Discrete Fourier transform (DFT)
Represent the sampling in Time Domain and Frequency domain (sec and Hz as unit):
Assume sampling time interval of ΔT for a signal 𝑥 𝑛 = 𝑥[𝑡𝑛 ] with length N, the forward and
inverse DFT are
𝑁−1 𝑁−1
Forward 2𝜋𝑘
−𝑖 𝑛∆𝑇
𝑋 𝑓𝑘 = 𝑋 𝑘 = 𝑥[𝑛]ⅇ 𝑁∆𝑇 = 𝑥 𝑡𝑛 ⅇ −𝑖2𝜋𝑓𝑘 𝑡𝑛
𝑛=0 𝑛=0 Same thing as last
𝑁−1 𝑁−1 page, with physical
Reverse 1 𝑖
2𝜋𝑘
𝑛∆𝑇 1
𝑥 𝑡𝑛 = 𝑥[𝑛] = 𝑋 𝑘 ⅇ 𝑁∆𝑇 = 𝑋 𝑓𝑘 ⅇ 𝑖2𝜋𝑓𝑘 𝑡𝑛 time/frequency as
𝑁 𝑁 variables
𝑘=0 𝑘=0
in sec
in Hz
In practice, the FFT output of any real valued signal is symmetric with respect to y axis, and the
frequencies are presented in terms of positive and negative frequency components:
1 −1 −1
The frequency bins range from 0 to (positive frequencies) and from to (negative frequencies).
2∆𝑇 2∆𝑇 𝑁∆𝑇 52
Discrete Fourier transform (DFT): algorithm
DFT is usually performed through fast Fourier DFT for a discrete, aperiodic function X(k) of N samples
transform (FFT), with the Cooley-Tukey algorithm, at a time interval of ΔT
to reduce the number of operation to (N/2)Log2N. 𝑁−1
2𝜋
Cooley, James W.; Tukey, John W. (1965). "An algorithm for the machine −𝑖𝑛 𝑁 𝑘
calculation of complex Fourier series". Math. Comput. 19 (90): 297–301. 𝑋[𝑘] = 𝑥[𝑛]ⅇ
𝑛=0
𝑁−1
1 2𝜋
𝑖𝑛 𝑁 𝑘
𝑥[𝑛] = 𝑋 𝑘 ⅇ
𝑁
𝑘=0
t0=0 tN-1=(N-1)ΔΤ
Sampling frequency decides the band width n=0 n=N-1
in DFT
1
𝑓𝑠 = ∆𝑇 (max frequency in the DFT spectrum)
55
Aliasing
Aliasing
• A sampled signal can be fitted to a function of a
lower and higher frequency than its true frequency
56
Shannon Sampling theorem
Can we recover the real-world analog signal?
Shannon sampling theorem:
1) Yes, any band-limited function can be perfectly recovered from equidistant sampling.
2) 2) Sampling frequency must be at least twice the maximum frequency in the signal so that
information will not be lost in the sampling process, i.e.
𝒇𝑺 > 𝟐𝒇𝑴 (or ΔT < TM/2)
• Sample the signal more frequently (don’t under-sample it).
• Remove the other frequency components not of your interest. (anti-aliasing band filter)
Frequency (Hz)
0.1 0.6 1.1 57
DFT spectrum with aliasing for a realistic signal
58
Leakage
When the signal frequency is exactly interger multiple Otherwise, leakage
of the frequency bins 𝑓𝑀 = 𝑚Δ𝑓 (m is an integer), the Reconstructed after DFT
signal can be well captured in the DFT spectra Power
Power 𝑓M Original
𝑓𝑀
Frequency (Hz)
Δf
1 Frequency (Hz)
∆𝑓 =
𝑁∆𝑇 When 𝑓M < Δ𝑓, signal cannot be reconstructed
• To suppress leakage, we can intentionally choose
1 𝑚 Power
𝑓𝑀 = 𝑚Δ𝑓 i.e., 𝑇 = 𝑡 ⇒ 𝑡𝑡𝑜𝑡 = 𝑚𝑇𝑀 , use the
𝑀 𝑡𝑜𝑡
𝑓M
measurement time just integer number of the signal
period (if 𝑓𝑀 is a single frequency).
• Or, sample for long time and collect enough
datapoints, so Δf becomes small.
• Make sure 𝚫𝒇 ≪ 𝒇𝒎 (the minimum frequency of Frequency (Hz)
interest). Δf 59
Recap of Fourier transform
Transform the signal as a function of time to • Fourier series, a summation of sin &
a function of frequency cos functions, for any periodic function
Power Spectrum
Peaks indicate major
Phase shift components for analysis and
frequency domain signal
filtering
60