Está en la página 1de 26

Signal characterization (time domain)

Simple measures. High order statistical moments. Energy and Power.

Simple measures

3 2.5 2 1.5 1 0.5 0 -0.5 -1 -1.5 -2 : : : : 0 2 4 6 8 10 12 14 16 signal maximum minimum max-abs 18 20 p2p-amp = 4.709

Maximum x: max(x) Minimum x: min(x) Peak amplitude: max(abs(x)) Peak-to-peak values: max(x)-min(x)

Simple measures
% signal characterization (time domain) fs = 100; dt = 1/fs; np = 2000; t = 0:dt:(np-1)*dt; s = sin(8*t)+cos(t.^1.5)+sin(0.1*t); [maxs,locmaxs] = max(s); tmaxs = t(locmaxs); [mins,locmins] = min(s); tmins = t(locmins); maxabs = max(abs(s)); tmaxabs = t(abs(s)==maxabs); p2pamp = maxs-mins; figure; plot(t,s,'-b',tmaxs, maxs,'or',tmins,mins,'^r',tmaxabs,maxabs,'+k','markersize',10); legend(': signal',': maximum',': minimum',': max-abs') text(1.01*tmaxabs,0.9*maxabs,['p2p-amp = ',num2str(p2pamp)])

Signal characterization (time domain)


Simple measures. High order statistical moments. Energy and Power.

High order statistical moments


A moment of a random variable is just the expected value of a power of the random variable First raw moment (moment about the origin):
2 1.5 1 0.5 0 -0.5 -1

0 1 = = = ( )

x1 x2

xn

10

The first raw moment is the mean (). E is the expectation operator that calculates the mean (expected value) of a random variable.

High order statistical moments


Other important moments: - The second central moment (moment about )

1 =

The second central moment is the variance ( ). The variance is a measure of how far a set of numbers is spread out. The standard deviation () shows how much dispersion exists from the mean. A useful property of standard deviation is that, unlike variance, it is expressed in the same units as the data. Commonly used to measure confidence in statistical conclusions and/or detect outliers.

High order statistical moments


The third standardized moment (Skewness):

1 =

Skewness is a measure of the asymmetry of the distribution. The skewness value can be positive or negative.

Skewness is sensitive to an assimetry being introduced into an initially simmetric system (e.g. an initially linear system undergoing inelastic excursions)

High order statistical moments


The fourth standardized moment (Kurtosis):

1 =

Kurtosis measures the peaked nature of the measured-response distribution. A higher kurtosis indicates a distribution, where a majority of the variance is caused by a few severe deviations from the mean rather than more frequent modest deviations.

High order statistical moments (implementation)


% statistical moments fs = 100; dt = 1/fs; np = 10000; t = 0:dt:(np-1)*dt; s = randn(size(t)); % normal distributed random numbers mr1 = sum(s)/np; mc2 = sum((s-mr1).^2)/np; std = sqrt(mc2); ms3 = (sum((s-mr1).^3)/np)/(std^3); ms4 = (sum((s-mr1).^4)/np)/(std^4); % 1st raw moment (mean) % 2dn central moment (variance) % standard deviation % 3rd standardized moment (skewness) % 4th standardized moment (kurtosis)

bins = 50; % number of bins for histogram aux = 3.6*np/bins; % auxiliar for plotting limsforx = [-5 5]; figure; subplot(211);plot(t,s) subplot(212);hist(s,bins); xlim(limsforx); hold on stem(mr1,aux,'r','linewidth',2,'markerfacecolor','g') stem([mr1-std, mr1+std],aux*[1 1],'--g','linewidth',2,'markerfacecolor','c') legend(': pdf',': mean', ': mean+(-)std') text(limsforx(1)+0.5,0.85*aux,['skewness = ',num2str(ms3)]); text(limsforx(1)+0.5,0.6*aux,['kurtosis = ',num2str(ms4)]);

High order statistical moments


Statistical moments of a normal random distributed signal (Gaussian Noise)
4 2 0 -2 -4 -6

10

20

30

40

50

60

70

80

90

100

For a perfect normal distribution

800 600 400 200 0 -5 skewness = -0.040885 kurtosis = 2.9747 : pdf : mean : mean+(-)std

=0 = 0 = 3
5

-4

-3

-2

-1

High order statistical moments


Statistical moments of a uniform random distributed signal
1 0.5 0 -0.5 -1

10

20

30

40

50

60

70

80

90

100

400 skewness = 0.0067829 300 200 100 0 kurtosis = 1.8083 : pdf : mean : mean+(-)std

-1

-0.8

-0.6

-0.4

-0.2

0.2

0.4

0.6

0.8

High order statistical moments


Statistical moments of an earthquake record (processed)
0.2 0.1 0 -0.1

accel. [g]

-0.2

10

15

20

25

30

35

Northridge Eq 1/17/94, 12:31, Hollywood


800 600 400 200 skewness = -0.028146 kurtosis = 7.2715 : pdf : mean : mean+(-)std

0 -0.15

-0.1

-0.05

0.05

0.1

0.15

High order statistical moments


The same record amplified by 5
1 0.5

accel. [g]

0 -0.5 -1

10

15

20

25

30

35

Northridge Eq 1/17/94, 12:31, Hollywood


800 600 400 200 0 -0.8 skewness = -0.028146 kurtosis = 7.2715 : pdf : mean : mean+(-)std

-0.6

-0.4

-0.2

0.2

0.4

0.6

0.8

High order statistical moments


The displacements calculated from the original record
5

disp.. [cm]

-5

10

15

20

25

30

35

Northridge Eq 1/17/94, 12:31, Hollywood


600 skewness = 0.36708 400 kurtosis = 4.4392 : pdf : mean : mean+(-)std

200

0 -5

-4

-3

-2

-1

High order statistical moments


Another earthquake record (processed)
0.5

accel. [g]

-0.5 0 20 40 60 80 100 120 140 160 180

Maule (Chile) 2010 - Angol


10000 8000 6000 4000 2000 0 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 skewness = -0.012967 kurtosis = 13.021 : pdf : mean : mean+(-)std

High order statistical moments


Just the strong motion part
1 0.5

accel. [g]

0 -0.5 -1 40

45

50

55

60

65

70

75

80

800 600 400 200 0 -0.8

Maule (Chile) 2010 - Angol


: pdf : mean : mean+(-)std

skewness = -0.0025242 kurtosis = 3.7366

What about a moving Kurtosis?


-0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8

High order statistical moments


The displacements calculated from the original record
10

disp.. [cm]

5 0 -5 -10

20

40

60

80

100

120

140

160

180

Maule (Chile) 2010 - Angol


4000 3000 2000 1000 0 -8 skewness = -0.38696 kurtosis = 9.8014 : pdf : mean : mean+(-)std

-6

-4

-2

Signal characterization (time domain)


Simple measures. High order statistical moments. Energy and Power.

Energy and Power


The energy of a signal x(t) can be defined as the area under the squared signal (good measurement of the strength of a signal): =

( , ) =

Power is a time average of energy: 1 = lim 2

1 ( , ) =

Often, the Root Mean Square (RMS), defined as = 1


is also used to give an indication of the average energy

Other signal statistics


The crest factor or peak-to-average ratio (PAR) is calculated from the peak amplitude of the signal divided by its RMS: max () = Gives an idea of how much impacting is occurring in a signal. The K-factor is defined as: = max

The crest factor and K-factor are often used to asses the deviation from sinusoidal response. What are the C and K values for a sinusoid?

% energy and power: np = 20000; dt = 0.01; tf = (np-1)*dt; t = (0:dt:tf)'; s = 3*sin(0.1*pi*t); E = dt*trapz(s.^2); P = E/tf; Et = dt*cumtrapz(s.^2); rms1 = sqrt(dt*trapz(s.^2)/tf); rms2 = sqrt(sum(s.^2)/np); C = max(abs(s))/rms1; K = max(abs(s))*rms1; figure; subplot(211); plot(t,s); subplot(212); plot(t,Et,t,E*ones(size(t)),'r-'); disp('=========================') disp(['E = ',num2str(E)]); disp(['P = ',num2str(P)]); disp(['RMS1 = ',num2str(rms1)]); disp(['RMS2 = ',num2str(rms2)]); disp(['C = ',num2str(C)]); disp(['K = ',num2str(K)]); disp('=========================')

Other signal statistics


% energy % power % how energy is accumulated in time

Energy, Power, Crest


A perfect sinusoidal:
4 2 0 -2 -4

20

40

60

80

100

120

140

160

180

200

1000 800 600 400 200 0 0 20 40 60 80 100 120 140 160 180 200

energy

-What are the units? -Will these values change with the sinusoid amplitude or frequency?

Energy, Power, Crest


Gaussian noise:
4 2 0 -2 -4

20

40

60

80

100

120

140

160

180

200

250 200 150 100 50 0 0 20 40 60 80 100 120 140 160 180 200

Energy, Power, Crest


White noise:
1 0.5 0 -0.5 -1

20

40

60

80

100

120

140

160

180

200

80 60 40 20 0

20

40

60

80

100

120

140

160

180

200

Energy, Power, Crest


Earthquake record:
1000 500 0 -500 -1000

0 x 10
5

20

40

60

80

100

120

140

160

180

15

10

20

40

60

80

100

120

140

160

180

Energy, Power, Crest


Earthquake record amplified by 5:
4000 2000 0 -2000 -4000

0 x 10
7

20

40

60

80

100

120

140

160

180

20

40

60

80

100

120

140

160

180

También podría gustarte