No Slide Title

Download Report

Transcript No Slide Title

Least Squares Fit to Main Harmonics
The observed flow u’ may be represented
as the sum of M harmonics:
u’ = u0 + ΣjM=1 Aj sin (j t + j)
For M = 1 harmonic (e.g. a diurnal or
semidiurnal constituent):
u’ = u0 + A1 sin (1t + 1)
With the trigonometric identity:
sin (A + B) = cosBsinA + cosAsinB
u’ = u0 + a1 sin (1t ) + b1 cos (1t )
taking:
a1 = A1 cos 1
b1 = A1 sin 1
so u’ is the ‘harmonic representation’
The squared errors between the observed current u and the harmonic representation may be
expressed as 2 :
2 = ΣN [u - u’ ]2 = u 2 - 2uu’ + u’ 2
Using u’ = u0 + a1 sin (1t ) + b1 cos (1t )
Then:
2 = ΣN {u 2 - 2uu0 - 2ua1 sin (1t ) - 2ub1 cos (1t ) + u02 + 2u0a1 sin (1t ) +
2u0b1 cos (1t ) + 2a1 b1 sin (1t ) cos (1t ) + a12 sin2 (1t ) +
b12 cos2 (1t ) }
Then, to find the minimum distance between observed and theoretical values we need to minimize
2 with respect to u0 a1 and b1, i.e., δ 2/ δu0 , δ 2/ δa1 , δ 2/ δb1 :
δ2/ δu0
= ΣN { -2u +2u0 + 2a1 sin (1t ) + 2b1 cos (1t ) } = 0
δ2/ δa1
= ΣN { -2u sin (1t ) +2u0 sin (1t ) + 2b1 sin (1t ) cos (1t ) + 2a1 sin2(1t ) } = 0
δ2/ δb1
= ΣN {-2u cos (1t ) +2u0 cos (1t ) + 2a1 sin (1t ) cos (1t ) + 2b1 cos2(1t ) } = 0
ΣN { -2u +2u0 + 2a1 sin (1t ) + 2b1 cos (1t ) } = 0
ΣN {-2u sin (1t ) +2u0 sin (1t ) + 2b1 sin (1t ) cos (1t ) + 2a1 sin2(1t ) } = 0
ΣN { -2u cos (1t ) +2u0 cos (1t ) + 2a1 sin (1t ) cos (1t ) + 2b1 cos2(1t ) } = 0
Rearranging:
ΣN { u = u0 + a1 sin (1t ) + b1 cos (1t ) }
ΣN { u sin (1t ) = u0 sin (1t ) + b1 sin (1t ) cos (1t ) + a1 sin2(1t ) }
ΣN { u cos (1t ) = u0 cos (1t ) + a1 sin (1t ) cos (1t ) + b1 cos2(1t ) }
And in matrix form:
Σ
Σ
Σ
Nu
Nu
sin (1t )
Nu
cos (1t )
=
B=AX
Σ sin ( t )
Σ sin ( t )
Σ sin ( t ) cos ( t )
N
N
Σ sin ( t )
Σ cos ( t )
N
N
1
1
N
N
1
2
1
1
1
X = A-1 B
Σ
Σ
Σ
N cos
N sin
(1t )
(1t ) cos (1t )
N cos2( t
1
)
u0
a1
b1
Finally...
The residual or mean is u0
The phase of constituent 1 is: 1 = atan ( b1 / a1 )
The amplitude of constituent 1 is: A1 = ( b12 + a12 )½
Pay attention to the arc tangent function used. For example,
in IDL you should use atan (b1,a1) and in MATLAB, you should use atan2
For M = 2 harmonics (e.g. diurnal and semidiurnal constituents):
u’ = u0 + A1 sin (1t + 1) + A2 sin (2t + 2)
Matrix A is then:
Σ sin ( t )
Σ sin ( t ) Σ sin ( t )
Σ cos ( t ) Σ sin ( t ) cos ( t )
Σ sin ( t ) Σ sin ( t ) sin ( t )
Σ cos ( t ) Σ sin ( t ) cos ( t )
N
N
N
N
N
N
1
N
1
1
N
N
2
2
N
2
1
1
1
1
2
1
2
Σ cos ( t )
Σ sin ( t )
Σ cos ( t )
Σ sin ( t ) cos ( t ) Σ sin ( t ) sin ( t ) Σ sin ( t ) cos ( t )
Σ cos ( t )
Σ cos ( t ) sin ( t ) Σ cos ( t ) cos ( t )
Σ cos ( t ) sin ( t ) Σ sin ( t )
Σ sin ( t ) cos ( t )
Σ cos ( t ) cos ( t ) Σ sin ( t ) cos ( t ) Σ cos ( t )
N
N
1
N
N
N
2
1
1
N
1
N
2
1
2
Σ
Σ
Σ
Σ
Σ
N
2
N
1
Remember that: X = A-1 B
and B =
N
1
2
N
N
2
1
N
2
N
2
2
2
N
u0
Nu
Nu
sin (1t )
Nu
cos (1t )
Nu
sin (2t )
Nu
cos (2t )
2
a1
X=
b1
a2
b2
2
1
2
1
2
2
2
2
Goodness of Fit:
Root mean square error:
Σ [< uobs > - upred] 2
[1/N Σ (uobs - upred) 2] ½
-------------------------------------
Σ [<uobs > - uobs] 2
Fit with M2 only
Fit with M2, K1
Fit with M2,
S2, K1
Rayleigh Criterion: record frequency ≤ ω1 – ω2
Fit with M2, S2,
K1,
M4, M6
Tidal Ellipse Parameters
ua, va, up, vp are the amplitudes and phases of the east-west and north-south components of velocity
Qcc




1
1 2
ua  v a2  2uav a sin(v p  u p ) 2 amplitude of the clockwise rotary component
2
1
1 2
2
 ua  v a  2uav a sin(v p  u p ) 2 amplitude of the counter-clockwise rotary component
2
 u sin u p  v a cos v p 
 c  tan1  a
 phase of the clockwise rotary component
 ua cos u p  v a sin v p 
Qc 
 cc
  ua sin u p  v a cos v p 
 tan 

u
cos
u

v
sin
v
a
p
a
p


1
phase of the counter-clockwise rotary component
The characteristics of the tidal ellipses are:
Ellipse Coordinates:
Major axis = M = Qcc + Qc
minor axis = m = Qcc - Qc
ellipticity = m / M
Phase = -0.5 (thetacc - thetac)
Orientation = 0.5 (thetacc + thetac)
x  M cos cos  t  m sin sin  t
y  M sin cos  t  m cos sin  t
  orientatio n
  harmonic frequency; t  time
M2
S2
K1