A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit...

40
A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors Thesis Research

Transcript of A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit...

Page 1: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

A Multi-sensor Embedded Microcontroller System for Condition

Monitoring of RC Helicopters

A Multi-sensor Embedded Microcontroller System for Condition

Monitoring of RC Helicopters

Artit JirapatnakulB.S. Electrical Engineering, May 2005

Honors Thesis Research

Page 2: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

System Capabilities

Communicate with sensors IMU: Crossbow IMU400-CC GPS: Novatel Superstar II Compass: Honeywell HMR3100

Data processing Reliable data transmission to computer Visualization in graphical interface

Page 3: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Sensors

Crossbow IMU400CC Linear acceleration

along three orthogonal axes

Rotational rates along three orthogonal axes

Connected via RS232 at 38.4kbps

Novatel Superstar II Latitude and Longitude Velocity Altitude Time and Date

Connected via RS232 at 9.6kbps

Honeywell HMR3100 Measures heading Connected via RS232 at

9.6kbps

Page 4: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Sensors

Sensors mounted in plastic containment unit

IMU GPSCompass

Page 5: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Microcontrollers

PIC18F8720 16-bit RISC CPU Up to 10MIPS 3840 bytes RAM

dsPIC30F6014 16-bit RISC CPU with

DSP Up to 30MIPS 8192 bytes RAM

Page 6: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

System Design

Several processing boards are used Advantages

Allows greater number of sensors to be used Boards can be located closer to sensors Distributed processing

Disadvantages Slightly greater complexity

Page 7: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

System Diagram using PIC18s

9.6kbps

38.4kbps

9.6kbps

57.6kbps

57.6kbps

IMU

GPS

Compass

Slave PIC*

Master PIC

* Can also be used with dsPIC instead

Page 8: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

System Setup using dsPIC

Laptop for visualization

dsPIC development board

Sensor box

System setup with dsPIC and IMU connected to laptop

Page 9: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Results

Sensor monitoring with PIC18 Can PIC18 keep up with data rate of all three

sensors? Connected IMU, GPS, and Compass to two

PIC18 boards PIC18 boards decoded sensor packets and

multiplexed them

Page 10: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Results

Page 11: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Results

Sensor monitoring with PIC18 Communication with sensors successful PIC18 is able to process at data rates of sensors Graphical interface works correctly

Page 12: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Results

dsPIC processing of IMU data Perform ten sample sliding window RMS

calculation in real-time Transmit unprocessed IMU data along with RMS

values for three linear accelerations

Page 13: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Results

Page 14: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Results

Statistics calculations on PIC18

Ten sample sliding window RMS calculation by PIC18 compared to calculations in MATLAB

Page 15: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Results

Statistics calculation on PIC18

Ten sample sliding window skew calculation performed by PIC as compared with calculations in MATLAB

Page 16: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Results

Statistics calculation on PIC18

Ten sample sliding window kurtosis calculation on PIC18 compared to calculation in MATLAB

Page 17: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Future Work

Wireless connection between system and computer

Design and fabricate small PC boards for system

Testing with additional algorithms Actual flight testing

Page 18: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Multi-Sensor Fusion For Feature Tracking and Prediction Using

Particle Filters

Multi-Sensor Fusion For Feature Tracking and Prediction Using

Particle Filters

Cory Smith

M.S. Electrical Engineering, May 2005

Dr. Kenneth Jenkins – Co-advisor

Dr. Amulya Garga – Co-advisor

Dr. David Hall – Committee Member

Committee Members:

Page 19: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Presentation Outline

Motivation and thesis focus

Theory – Kalman and particle filtering, prediction, remaining useful life (RUL) of mechanical systems

Results – simulation data and mechanical fault data collected by the Conditioned-Based Maintenance department

Decision-level fusion – theory and results

Conclusions and further research topics

Page 20: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Motivation

Tracking in real-world scenarios usually involves

systems with non-linear models and non-Gaussian

noise

Kalman filter provides the optimal solution as long as

the system is linear with Gaussian noise

Particle filter does not require Gaussian noise

distributions and works with both linear and non-

linear models

Page 21: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Focus of the Thesis

Compare Kalman and particle filters with regard to their ability to track and predict features using simulated data and CBM mechanical fault data

Estimate remaining useful life (RUL) of mechanical systems

Utilize decision-level data fusion techniques to increase RUL accuracy

Page 22: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Kalman FilteringProcessing Steps (Gelb, 1974)

1( ) ( )T Tk k k k k k k

K P H R H P H

PredictForward

Compute Kalman Gain

ReceiveMeasurement

( ) ( )1 1ˆ ˆk k k

x Φ x

( ) ( )1 1 1 1

Tk k k k k

P Φ P Φ Q

UpdatePrediction

( ) ( ) ( )ˆ ˆ ˆk k k k k k x x K z H x

( ) ( )k k k k P I K H P

( )ˆk k k k z H x v

Page 23: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Kalman FilteringModels for Application

ˆk

k k

k

x

x

x

x

2121

0 1

0 0 1k

Φ

1

0

0k

H

5 4 31 1 120 8 6

4 3 2 21 1 18 3 2

3 21 16 2

k w

Q

State Vector:

Transition Matrix:

Measurement Vector:

Process Noise Matrix:

Estimating position, velocity and acceleration

Based on kinematics:21

1 1 12k k k kx x x x

Only measuring position

Derivation may be found in (Bar-Shalom, 1993)

Page 24: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Particle FilterFundamentals

Particle filters do not rely on any assumptions regarding noise distributions or linear models

Utilizes Monte Carlo (MC) Integration to approximate the true density

Choose an initial proposal density (Ex: Gaussian) to get started, then use the prior distribution as the proposal

As the number of samples approaches infinity, the proposal density approaches the true density

The particle filter is more computationally intensive than the Kalman filter

Page 25: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Particle FilterProcessing Flow (Ristic, 2004)

( )( ) ( ) ( )1~ ( | )i i

k k kp x x x

( , )k k k kz h x v

2( )( )

( ) exp2

ik ki

kk

w

z x

R

Draw Samples from Proposal Density(Predict Forward)

Receive Measurement

Compute Particle Weights

UpdateProposal

( )1ˆ T

k k kw

x x( )

1new proposal ( | )ik kp x x

( )( ) ( ) ( )1ˆ ˆi i

k k k k

x Φ x w

Page 26: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Initial Proposal Density (Ex. Gaussian)

Sample from Proposal Density and Predict Forward

True Underlying Posterior Density

Take measurement, compute likelihoods, and weight particles accordingly. This becomes the new proposal density for k+1.

Particle FilterGraphical Representation (Doucet, 2001)

},...,1{ ~ )( Nix ik

},...,1{ )( Nix ik

)|( kk zxp

Page 27: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Particle FilterDegeneracy Phenomenon

After a few iterations, all but one particle will contain negligible weight. Solution: Resample (Ristic, 2004)

Refine proposal density by sampling from the

particles with high weights and discarding those

with negligible weights.

This will focus on “important” areas of the

distribution giving it more “definition” to resemble

the true underlying distribution

Page 28: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Resample from “important areas” of the estimated density

New normalized particles for k+1

Particle FilterResampling (Ristic, 2004)

},...,1{ ~ )(1 Nix i

k

)|( kk zxp

Page 29: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Prediction

The Kalman and particle filters may be used to estimate the state without any measurement updates

The prediction relies only on the prediction equations for each filter:

( ) ( )( )i ik n k n k

x Φ x

Tk n k n k k n k n P Φ P Φ Q

ˆ ˆk n k n k x Φ x

The state transition and process noise matrices become a function of the time interval since the last measurement:

2121 ( )

0 1

0 0 1k n

n n

n

Φ

5 4 31 1 120 8 6

4 3 2 21 1 18 3 2

3 21 16 2

( ) ( ) ( )

( ) ( ) ( )

( ) ( )k n v

n n n

n n n

n n

Q

(KF)( )ˆ T

k n k n kw

x x(PF)

Page 30: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Remaining Useful Life (RUL)

Time

Fea

ture

Val

ue

Failure Threshold

Detection Threshold

Feature Track

Predicted Track with Confidence Intervals

Failure Threshold Crossing

RUL

Time

Fea

ture

Val

ue

Failure Threshold

Detection Threshold

Feature Track

Predicted Track with Confidence Intervals

Failure Threshold Crossing

RUL

• RUL is the amount of time left before a system reaches mechanical failure

Page 31: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

2 3( ) 1 2 5 5f t t t t

Third-Order Simulation

0 20 40 60 80 1000

2

4

6

8

10

12

14

Time (Hrs.)

Fe

atu

re V

alu

e

3rd Order Simulation Data

Feature Plot

Third-order simulation data was generated using the model:

where is zero-mean Gaussian noise ~ N(0,0.2)

100 200 300 400 500 600 700 800 900 10000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Number of Particles (N)

Ab

solu

te E

rro

r (F

eatu

re V

alu

e)

Particle Filter, Proc. Noise = 0.9Particle Filter, Proc. Noise = 0.09Particle Filter, Proc. Noise = 0.009Kalman Filter, Proc. Noise = 0.9Kalman Filter, Proc. Noise = 0.09Kalman Filter, Proc. Noise = 0.009

3rd Order Simulation Tracking ResultsTracking Error

Page 32: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

0 20 40 60 80 100

0

2

4

6

8

10

12

14

Time (Hrs.)

Fe

atu

re V

alu

e

Actual DataKalman Filter Track, Proc. Noise = 0.009Particle Filter Track (N=100), Proc. Noise = 0.009

0 20 40 60 80 1000

2

4

6

8

10

12

14

Time (Hrs.)

Fe

atu

re V

alu

e

Actual DataKalman Filter Track, Proc. Noise = 0.009Particle Filter Track (N=1000), Proc. Noise = 0.009

0 20 40 60 80 1000

2

4

6

8

10

12

14

Time (Hrs.)

Fe

atu

re V

alu

e

Actual DataKalman Filter Track, Proc. Noise = 0.009Particle Filter Track (N=1000), Proc. Noise = 0.9

Third-Order SimulationTracking Results

0 20 40 60 80 1000

2

4

6

8

10

12

14

Time (Hrs.)

Fe

atu

re V

alu

eActual trajectoryKalman filter track, Proc. Noise = 0.009Particle filter track (N=100) , Proc. Noise = 0.9

Page 33: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Third-Order Simulation

Particle Paths

44 46 48 50 52 54 56-6

-4

-2

0

2

4

6

8

10

12

Fe

atu

re V

alu

e

Time (Hrs.)

Particle Paths, Proc. Noise = 0.9Proc. Noise = 0.9

44 46 48 50 52 54 56-6

-4

-2

0

2

4

6

8

10

12

Fe

atu

re V

alu

eTime (Hrs.)

Particle Paths, Proc. Noise = 0.009Proc. Noise = 0.009

• With the high process noise many particles are discarded during resampling

• By lowering the process noise, more particles have sufficient weight

Page 34: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Computational Comparison

• Kalman filter is O(2d3) dominated by the covariance update

• Particle filter is O(Nd2) from individual particle propagation (Gustafsson, 2002)

100 200 300 400 500 600 700 800 900 10000

1

2

3

4

5

Number of Particles (N)

Av

era

ge

Co

mp

uta

tio

n T

ime

(s

ec

on

ds

) Particle Filter, Proc. Noise = 0.009Kalman Filter, Proc. Noise = 0.009

• The computation time for both filters was computed using cputime in Matlab

• Plot shows that increasing the number of particles increases the computational costs as expected

Page 35: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

Third-Order Simulation

Prediction Results

0 20 40 60 80 1000

2

4

6

8

10

12

Time = 26

Time (Hrs.)

Fe

atu

re V

alu

e

0 20 40 60 80 1000

2

4

6

8

10

12

Time = 50

Time (Hrs.)

Fe

atu

re V

alu

e

0 20 40 60 80 1000

2

4

6

8

10

12

Time = 75

Time (Hrs.)

Fe

atu

re V

alu

e

0 20 40 60 80 1000

2

4

6

8

10

12

Time = 90

Time (Hrs.)

Fe

atu

re V

alu

e1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

10

MeasurementsFeature trackFeature prediction95% Confidence boundsFailure threshold

Page 36: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

3 Separate Seeded Fault Run to Failure TestsEDM Notch Initiated at Input Pinion Tooth Root

(EDM: Electrical Discharge Machine)2 Accelerometers (100kHz sampling)

Source: NAVAIR 4.4.2 Patuxent River Naval Air Station

H-60 Intermediate Gearbox (IGB)

Page 37: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

NAWCAD Helicopter DataFM0

0 10 20 30 40 50 60 70 80 901.5

2

2.5

3

3.5

4

4.5Feat.Avg.All.FM0

Time

Fe

atu

re V

alu

e

Raw DataSmoothed Data

10 20 30 40 50 60 70 800

10

20

30

40

50

60

70

80

Time

RU

L

Actual RULParticle Filter Estimate (N=1000)Particle Filter Lower 95% Conf. Interv.Kalman Filter EstimateKalman Filter Lower 95% Conf. Interv.

Page 38: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

10 20 30 40 50 60 70 800

10

20

30

40

50

60

70 Actual RULParticle Filter Estimate (N=1000)Particle Filter Lower 95% Conf. Interv.Kalman Filter EstimateKalman Filter Lower 95% Conf. Interv.

RU

L

Time0 10 20 30 40 50 60 70 80 90

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35Feat.Avg.All.SBlvl

Raw DataSmoothed Data

Fe

atu

re V

alu

e

Time

NAWCAD Helicopter DataSBlvl

Page 39: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

References

Bar-Shalom, Y., Li, X.-R., Estimation and Tracking: Principles, Techniques, and Software, Boston, MA, Artech House, 1993.

Cleveland, W. S., “Robust Locally Weighted Regression and Smoothing Scatterplots,” Journal of the American Statistical Association, Vol. 74, No. 368,Dec. 1979, pp. 829-836.

Doucet, A., Freitas, N., Gordon, N., Sequential Monte Carlo Methods in Practice,New York, NY, Springer-Verlag, 2001.

Erdley, J., “Data Fusion for Improved Machinery Fault Classification,” M.S. Thesis in Electrical Engineering, The Pennsylvania State University, University Park, PA, May., 1997

Gelb, A., and technical staff of The Analytic Sciences Corportation, Applied Optimal Estimation, The M.I.T. Press, Cambridge, Massachusetts, and London, England,1974.

Gustafsson, F., Gunnarsson, F., Bergman, N., Forssell, U., Jansson, J., Karlsson, R., and Nordlund, P.-J., “Particle Filters for Position, Navigation, and Tracking,” IEEE Transactions on Signal Processing, Vol. 50, No. 2, Feb. 2002, pp. 425-237.

McClintic, K. T., “Feature Prediction and Tracking for Monitoring the Condition of Complex Mechanical Systems,” M.S. Thesis in Acoustics, The Pennsylvania State University, University Park, PA, Dec., 1998

Ristic, B., Arulampalam, S., Gordon, N., Beyond the Kalman Filter, Boston, MA, Artech House, 2004.

Page 40: A Multi-sensor Embedded Microcontroller System for Condition Monitoring of RC Helicopters Artit Jirapatnakul B.S. Electrical Engineering, May 2005 Honors.

0 2 4 6 80

0.01

0.02

0.03

0.04

0.05

0 2 4 6 80

0.005

0.01

0.015

0 2 4 6 80

0.005

0.01

0.015

0 2 4 6 80

1

2

3x 10

-3

0 2 4 6 80

2

4

6x 10

-3

0 2 4 6 80

0.5

1

1.5x 10

-3

Particle Distributions at Time = 50

N = 100, Proc. Noise = 0.9

N = 500, Proc. Noise = 0.9

N = 1000, Proc. Noise = 0.9

N = 100, Proc. Noise = 0.009

N = 500, Proc. Noise = 0.009

N = 1000, Proc. Noise = 0.009

Wei

ght

Wei

ght

Wei

ght

Wei

ght

Wei

ght

Wei

ght

Feature Value Feature Value

N=1000, Proc. Noise = 0.009

N=500, Proc. Noise = 0.009

N=100, Proc. Noise = 0.009

N=1000, Proc. Noise = 0.9

N=500, Proc. Noise = 0.9

N=100, Proc. Noise = 0.9Time = 50 Hrs.

Third-Order SimulationParticle Distributions