aa = 2: b = 10: cc = 5: dd = 8: e = 3: f = 2: g = 4: h = 5: q = 1
a = 2: b = 10: c = 5: d = 8: e = 3: f = 2: g = 4: h = 5 'to not write T1 T2 T3 T4 a=T1;b=T2, c=T3 , d=T4 '
DT
(0) = e
* Sin(-4 * _Pi * 2 / c
) + f
* Sin(-4 * _Pi * 2 / d
) + q
+ g
* (1 - Cos(-4 * _Pi * 2 / a
)) + h
* (1 - Cos(-4 * _Pi * 2 / b
))DT
(1) = e
* Sin(-3 * _Pi * 2 / c
) + f
* Sin(-3 * _Pi * 2 / d
) + q
+ g
* (1 - Cos(-3 * _Pi * 2 / a
)) + h
* (1 - Cos(-3 * _Pi * 2 / b
))DT
(2) = e
* Sin(-2 * _Pi * 2 / c
) + f
* Sin(-2 * _Pi * 2 / d
) + q
+ g
* (1 - Cos(-2 * _Pi * 2 / a
)) + h
* (1 - Cos(-2 * _Pi * 2 / b
))DT
(3) = e
* Sin(-1 * _Pi * 2 / c
) + f
* Sin(-1 * _Pi * 2 / d
) + q
+ g
* (1 - Cos(-1 * _Pi * 2 / a
)) + h
* (1 - Cos(-1 * _Pi * 2 / b
))DT(4) = q
DT
(5) = e
* Sin(1 * _Pi * 2 / c
) + f
* Sin(1 * _Pi * 2 / d
) + q
+ g
* (1 - Cos(1 * _Pi * 2 / a
)) + h
* (1 - Cos(1 * _Pi * 2 / b
))DT
(6) = e
* Sin(2 * _Pi * 2 / c
) + f
* Sin(2 * _Pi * 2 / d
) + q
+ g
* (1 - Cos(2 * _Pi * 2 / a
)) + h
* (1 - Cos(2 * _Pi * 2 / b
))DT
(7) = e
* Sin(3 * _Pi * 2 / c
) + f
* Sin(3 * _Pi * 2 / d
) + q
+ g
* (1 - Cos(3 * _Pi * 2 / a
)) + h
* (1 - Cos(3 * _Pi * 2 / b
))DT
(8) = e
* Sin(4 * _Pi * 2 / c
) + f
* Sin(4 * _Pi * 2 / d
) + q
+ g
* (1 - Cos(4 * _Pi * 2 / a
)) + h
* (1 - Cos(4 * _Pi * 2 / b
))
For I
= 1 To 4: DS
(I
) = (DT
(4 + I
) - DT
(4 - I
)) / 2: DC
(I
) = (DT
(4 + I
) + DT
(4 - I
)) / 2 - DT
(4):
Next I
MS = 50
S(I, 1) = DS(I)
S
(I
, 2) = Sin(2 * 3.141596 * I
/ T3
) S
(I
, 3) = Sin(2 * 3.141596 * I
/ T4
) S(I, 4) = 1
S(5, j) = S(1, j)
S(6, j) = S(2, j)
D1S = S(1, 1) * S(2, 2) * S(3, 3) + S(2, 1) * S(3, 2) * S(1, 3) + S(3, 1) * S(1, 2) * S(2, 3) - S(1, 1) * S(3, 2) * S(2, 3) - S(2, 1) * S(1, 2) * S(3, 3) - S(3, 1) * S(2, 2) * S(1, 3)
D2S = S(2, 1) * S(3, 2) * S(4, 3) + S(3, 1) * S(4, 2) * S(2, 3) + S(4, 1) * S(2, 2) * S(3, 3) - S(2, 1) * S(4, 2) * S(3, 3) - S(3, 1) * S(2, 2) * S(4, 3) - S(4, 1) * S(3, 2) * S(2, 3)
D3S = S(3, 1) * S(4, 2) * S(5, 3) + S(4, 1) * S(5, 2) * S(3, 3) + S(5, 1) * S(3, 2) * S(4, 3) - S(3, 1) * S(5, 2) * S(4, 3) - S(4, 1) * S(3, 2) * S(5, 3) - S(5, 1) * S(4, 2) * S(3, 3)
D4S = S(4, 1) * S(5, 2) * S(6, 3) + S(5, 1) * S(6, 2) * S(4, 3) + S(6, 1) * S(4, 2) * S(5, 3) - S(4, 1) * S(6, 2) * S(5, 3) - S(5, 1) * S(4, 2) * S(6, 3) - S(6, 1) * S(5, 2) * S(4, 3)
DETS = -S(4, 4) * D1S + S(1, 4) * D2S - S(2, 4) * D3S + S(3, 4) * D4S
TT3 = T3
TT4 = T4
Print "TT3="; TT3;
"TT4="; TT4
ys
(4) = AS1
* (1 - Cos(2 * 3.141596 * 4 / TT3
)) + AS2
* (1 - Cos(2 * 3.141596 * 4 / TT4
))ys
(3) = AS1
* (1 - Cos(2 * 3.141596 * 3 / TT3
)) + AS2
* (1 - Cos(2 * 3.141596 * 3 / TT4
))ys
(2) = AS1
* (1 - Cos(2 * 3.141596 * 2 / TT3
)) + AS2
* (1 - Cos(2 * 3.141596 * 2 / TT4
))ys
(1) = AS1
* (1 - Cos(2 * 3.141596 * 1 / TT3
)) + AS2
* (1 - Cos(2 * 3.141596 * 1 / TT4
))
MAS = 50
AAS(I, 1) = ys(I)
AAS
(I
, 2) = Sin(2 * 3.141596 * I
/ TT3
) AAS
(I
, 3) = Sin(2 * 3.141596 * I
/ TT4
) AAS(I, 4) = 1
AAS(5, j) = AAS(1, j)
AAS(6, j) = AAS(2, j)
D1AS = S(1, 1) * S(2, 2) * S(3, 3) + S(2, 1) * S(3, 2) * S(1, 3) + S(3, 1) * S(1, 2) * S(2, 3) - S(1, 1) * S(3, 2) * S(2, 3) - S(2, 1) * S(1, 2) * S(3, 3) - S(3, 1) * S(2, 2) * S(1, 3)
D2AS = S(2, 1) * S(3, 2) * S(4, 3) + S(3, 1) * S(4, 2) * S(2, 3) + S(4, 1) * S(2, 2) * S(3, 3) - S(2, 1) * S(4, 2) * S(3, 3) - S(3, 1) * S(2, 2) * S(4, 3) - S(4, 1) * S(3, 2) * S(2, 3)
D3AS = S(3, 1) * S(4, 2) * S(5, 3) + S(4, 1) * S(5, 2) * S(3, 3) + S(5, 1) * S(3, 2) * S(4, 3) - S(3, 1) * S(5, 2) * S(4, 3) - S(4, 1) * S(3, 2) * S(5, 3) - S(5, 1) * S(4, 2) * S(3, 3)
D4AS = S(4, 1) * S(5, 2) * S(6, 3) + S(5, 1) * S(6, 2) * S(4, 3) + S(6, 1) * S(4, 2) * S(5, 3) - S(4, 1) * S(6, 2) * S(5, 3) - S(5, 1) * S(4, 2) * S(6, 3) - S(6, 1) * S(5, 2) * S(4, 3)
DETAS = -AAS(4, 4) * D1AS + AAS(1, 4) * D2AS - AAS(2, 4) * D3AS + AAS(3, 4) * D4AS
ASS1 = AS1
ASS2 = AS2
Print "AS1="; ASS1;
"AS2="; ASS2
MC = 50
C(I, 1) = DC(I)
C
(I
, 2) = 1 - Cos(2 * 3.141596 * I
/ T1
) C
(I
, 3) = 1 - Cos(2 * 3.141596 * I
/ T2
) C(I, 4) = 1
C(5, j) = C(1, j)
C(6, j) = C(2, j)
D1C = C(1, 1) * C(2, 2) * C(3, 3) + C(2, 1) * C(3, 2) * C(1, 3) + C(3, 1) * C(1, 2) * C(2, 3) - C(1, 1) * C(3, 2) * C(2, 3) - C(2, 1) * C(1, 2) * C(3, 3) - C(3, 1) * C(2, 2) * C(1, 3)
D2C = C(2, 1) * C(3, 2) * C(4, 3) + C(3, 1) * C(4, 2) * C(2, 3) + C(4, 1) * C(2, 2) * C(3, 3) - C(2, 1) * C(4, 2) * C(3, 3) - C(3, 1) * C(2, 2) * C(4, 3) - C(4, 1) * C(3, 2) * C(2, 3)
D3C = C(3, 1) * C(4, 2) * C(5, 3) + C(4, 1) * C(5, 2) * C(3, 3) + C(5, 1) * C(3, 2) * C(4, 3) - C(3, 1) * C(5, 2) * C(4, 3) - C(4, 1) * C(3, 2) * C(5, 3) - C(5, 1) * C(4, 2) * C(3, 3)
D4C = C(4, 1) * C(5, 2) * C(6, 3) + C(5, 1) * C(6, 2) * C(4, 3) + C(6, 1) * C(4, 2) * C(5, 3) - C(4, 1) * C(6, 2) * C(5, 3) - C(5, 1) * C(4, 2) * C(6, 3) - C(6, 1) * C(5, 2) * C(4, 3)
DETC = -C(4, 4) * D1C + C(1, 4) * D2C - C(2, 4) * D3C + C(3, 4) * D4C
TT1 = T1
TT2 = T2
Print "TT1="; TT1;
"TT2="; TT2
'yc(t) = DC(t) = AC1 * (1-cos(2 * _Pi * t / T1) + AC2 * (1-cosn(2 * _Pi * t / T2) model of the even part, in french "paire" '
yc
(4) = AC1
* (1 - Cos(2 * 3.141596 * 4 / TT1
)) + AC2
* (1 - Cos(2 * 3.141596 * 4 / TT2
))yc
(3) = AC1
* (1 - Cos(2 * 3.141596 * 3 / TT1
)) + AC2
* (1 - Cos(2 * 3.141596 * 3 / TT2
))yc
(2) = AC1
* (1 - Cos(2 * 3.141596 * 2 / TT1
)) + AC2
* (1 - Cos(2 * 3.141596 * 2 / TT2
))yc
(1) = AC1
* (1 - Cos(2 * 3.141596 * 1 / TT1
)) + AC2
* (1 - Cos(2 * 3.141596 * 1 / TT2
))
MAC = 50
AC(I, 1) = yc(I)
AC
(I
, 2) = 1 - Cos(2 * 3.141596 * I
/ TT1
) AC
(I
, 3) = 1 - Cos(2 * 3.141596 * I
/ TT2
) AC(I, 4) = 1
AC(5, j) = AC(1, j)
ACS(6, j) = AC(2, j)
D1AC = C(1, 1) * C(2, 2) * C(3, 3) + C(2, 1) * C(3, 2) * C(1, 3) + C(3, 1) * C(1, 2) * C(2, 3) - C(1, 1) * C(3, 2) * C(2, 3) - C(2, 1) * C(1, 2) * C(3, 3) - C(3, 1) * C(2, 2) * C(1, 3)
D2AC = C(2, 1) * C(3, 2) * C(4, 3) + C(3, 1) * C(4, 2) * C(2, 3) + C(4, 1) * C(2, 2) * C(3, 3) - C(2, 1) * C(4, 2) * C(3, 3) - C(3, 1) * C(2, 2) * C(4, 3) - C(4, 1) * C(3, 2) * C(2, 3)
D3AC = C(3, 1) * C(4, 2) * C(5, 3) + C(4, 1) * C(5, 2) * C(3, 3) + C(5, 1) * C(3, 2) * C(4, 3) - C(3, 1) * C(5, 2) * C(4, 3) - C(4, 1) * C(3, 2) * C(5, 3) - C(5, 1) * C(4, 2) * C(3, 3)
D4AC = C(4, 1) * C(5, 2) * C(6, 3) + C(5, 1) * C(6, 2) * C(4, 3) + C(6, 1) * C(4, 2) * C(5, 3) - C(4, 1) * C(6, 2) * C(5, 3) - C(5, 1) * C(4, 2) * C(6, 3) - C(6, 1) * C(5, 2) * C(4, 3)
DETAC = -C(4, 4) * D1AC + C(1, 4) * D2AC - C(2, 4) * D3AC + C(3, 4) * D4AC
If Abs(DETAC
) <= MAC
Then 'GoTo 4 Else GoTo 5 ACC1 = AC1
ACC2 = AC2
Print "AC1="; ACC1;
"AC2="; ACC2