Test 1

$RecursionLimit:=100000

fS=.

Définitions

n:=32

nn=(2^n)

normalize[i_]:=i-nn*Sign[i]*⌊((Abs[i]+nn/2+(Sign[i]-1)/2)/nn)⌋

oplus[i_,j_]:=normalize[i+j]

ominus[i_,j_]:=normalize[i-j]

Signaux de sortie

y1[t_]:=s7[t]/;t≥0
y1[t_]:=0/;t<0

y2[t_]:=s7[t]/;t≥0
y2[t_]:=0/;t<0

Signal d’entrée utilisateur

us1=.

Signaux intermédiaires

p1[t_]:=0.001*(10^(0.05*us1[t]))/;t≥0
p1[t_]:=0/;t<0

s1[t_]:=k2+r2[t-1]/;t≥0
s1[t_]:=0/;t<0

s2[t_]:=k3+r3[t-1]/;t≥0
s2[t_]:=0/;t<0

s3[t_]:=k4+r4[t-1]/;t≥0
s3[t_]:=0/;t<0

s4[t_]:=k5+r5[t-1]/;t≥0
s4[t_]:=0/;t<0

s5[t_]:=k6+r6[t-1]/;t≥0
s5[t_]:=0/;t<0

s6[t_]:=k7+r7[t-1]/;t≥0
s6[t_]:=0/;t<0

s7[t_]:=r8[t]*(v1[IntegerPart[65536*r7[t]]]+v1[IntegerPart[65536*r6[t]]]+v1[IntegerPart[65536*r5[t]]]+v1[IntegerPart[65536*r4[t]]]+v1[IntegerPart[65536*r3[t]]]+v1[IntegerPart[65536*r2[t]]])/;t≥0
s7[t_]:=0/;t<0

r1[t_]:=oplus[1,r1[t-1]]/;t≥0
r1[t_]:=0/;t<0

r2[t_]:=s1[t]-⌊s1[t]⌋/;t≥0
r2[t_]:=0/;t<0

r3[t_]:=s2[t]-⌊s2[t]⌋/;t≥0
r3[t_]:=0/;t<0

r4[t_]:=s3[t]-⌊s3[t]⌋/;t≥0
r4[t_]:=0/;t<0

r5[t_]:=s4[t]-⌊s4[t]⌋/;t≥0
r5[t_]:=0/;t<0

r6[t_]:=s5[t]-⌊s5[t]⌋/;t≥0
r6[t_]:=0/;t<0

r7[t_]:=s6[t]-⌊s6[t]⌋/;t≥0
r7[t_]:=0/;t<0

r8[t_]:=p1[t]+0.999*r8[t-1]/;t≥0
r8[t_]:=0/;t<0

v1[t_]:=(Assert[0≤t≤65535];Sin[9.58737992428526*(10^(-5))*ominus[r1[t],1]])/;t≥0
v1[t_]:=0/;t<0

Constantes

k1:=fS

k2:=(440.329987/k1)

k3:=(587/k1)

k4:=(587.25/k1)

k5:=(440/k1)

k6:=(330.200012/k1)

k7:=(330/k1)

Tests

tmax:=Pi

us1[t_]:=0

Plot[us1[t],{t,0,tmax}]

fS:=11025

DiscretePlot[y1[t],{t,0,tmax,0.05}]

fS:=44100

DiscretePlot[y1[t],{t,0,tmax,0.05}]

us1[t_]:=If[t≥0,Sin[6*t],0]

Plot[us1[t],{t,0,tmax}]

fS:=11025

DiscretePlot[y1[t],{t,0,tmax,0.05}]

fS:=44100

DiscretePlot[y1[t],{t,0,tmax,0.05}]