WOLFRAM NOTEBOOK

(Local) In[]:=
gT_samp=10^(-2);(*samplingperiod*)
(Local) In[]:=
g_f=10;(*frequency*)
(Local) In[]:=
x[t_]=Exp[I*2Pi*g_f*t];(*continuoustimewave*)
(Local) In[]:=
x_d[t_]=x[Floor[t/gT_samp]*gT_samp];(*discretizedwave*)
(Local) In[]:=
Plot[{Re[x[t]],Re[x_d[t]]},{t,0,2/g_f},Filling->Axis,PlotLegends->"Expressions"]
(Local) Out[]=
Re(x(t))
Re(x_d(t))
(Local) In[]:=
gN=200;gT_int=gN*gT_samp;(*Integrationtime*)
(Local) In[]:=
X[f_]=Integrate[x[t]*Exp[-I*2Pi*f*t],{t,0,gT_int}]/gT_int
(Local) Out[]=
-
-4fπ
2(20π-2fπ)
(Local) In[]:=
X_d[f_]=(1-Exp[-I*2Pi*f*gT_samp])/(I*2Pi*f)/gT_int*Exp[I*2Pi*(g_f-f)/2*(gN-1)*gT_samp]*gN*Sinc[2Pi*(g_f-f)/2*gN*gT_samp]/Sinc[2Pi*(g_f-f)/2*gT_samp](*equalstoIntegrate[f_d[t]*Exp[-I*2Pi*f*t],{t,0,gT_int}]/gT_int*)
(Local) Out[]=
-
50
199
100
(10-f)π
1-
-
1
50
fπ
Sinc[2(10-f)π]
fπSinc
1
100
(10-f)π
(Local) In[]:=
Plot[{20Log10[Abs[X[f]]],20Log10[Abs[X_d[f]]]},{f,0,2g_f},PlotRange->{-80,0},PlotStyle->{Default,Dashed},PlotLegends->"Expressions",PlotLabel->"power spectrum in the neighborhood of original frequency"]
(Local) Out[]=
20
log
10
(X(f))
20
log
10
(X_d(f))
(Local) In[]:=
Plot[Arg[X[f]]/Degree,{f,0,2g_f},PlotRangeFull,PlotLabel"phase of the spectrum of original signal"]
(Local) Out[]=
(Local) In[]:=
Plot[Arg[X_d[f]]/Degree,{f,0,2g_f},PlotRangeFull,PlotLabel"phase of the spectrum of discretized signal"]
(Local) Out[]=
Plot[{20Log10[Abs[X[f]]],20Log10[Abs[X_d[f]]]},{f,0,3/gT_samp},PlotRange->{-80,0},PlotLegends->"Expressions",PlotLabel->"power spectrum with harmonics"]
(Local) Out[]=
20
log
10
(X(f))
20
log
10
(X_d(f))
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.