ГОСТ Р ИСО/МЭК10373-7— 2011
printf(" Sample count: %d\n*,i);
printff Sample rate : %1.0f MHz\n’.1e-6.’(vtime[1l-vbme[0)));
printf(“ Max(vd): %4.0f mV\n".max
_
vd’1000):
printf(" Min(vd): %4.0f mV\n\min
_
vd’1000);
return i:
V.......
DFT : Discrete Fourier Transform
**7
Description:
This function calculate die Fourier coefficient
..v
/****•
/•**
1
........
/*■*
/•’■
/*■*
/*.*
•*7
,...
Input: Number of samples
Global Variables:
Displays Results:
/*“
/*••
/**•
/*..
/*..
/*..
Carrier coefficient
Upper sideband coefficient
Lower sideband coefficient
/*.*
......
•*7
**7
•*7
*•7
**7
*•7
**7
void dft(int count)
{
float c0
_
real.cO
_
imag,cO
_
abs.cO
_
phase;
float c1
_
real.c1Jmag.c1
_
abs.c1
_
phase;
float c2
_
real.c2Jmag.c2
_
abs.c2
_
phase;
int N
_
data.center.start.end;
float wO.wu.wl;
int i;
w0=(floatX13.56e6*2.0)*pi: Г carrier 13.56 MHz 7
wu=(floatX1.0+1.0/N
_
FSUB)*w0; /* upper sideband 13.98 MHz 7
wl=(float)(1.0-1.0/N
_
FSUB)’w0; Г lower sideband 13.14 MHz 7
c0
_
real=0; Г real part of the carrier fourier coefficient V
c0
_
imag=0; Г imag part of the carrier fourier coefficient 7
c1
_
real=0; Г real part of the up. sideband fourier coefficient 7
c1
_
imag=0; Г imag part of the up. sideband fourier coefficient 7
c2
_
real=0: /’ real part of the lo. sideband fourier coefficient 7
c2
_
imag=0; /* imag part of the lo. sideband fourier coefficient 7
center=(count+1)/2; /* center address 7
/***•’**••• signal selection
.
..............................
/• Number of samples for two subcarrier periods 7
N
_
data={int)(0.5*2.0,N
_
FSUBf(vtime(2l-vtimel1l)/13.56e6F);
/* Note: (vtime[2J-vtime[1)) are the scope sample rate 7
start=center-(int)(N
_
dataf2.0+0.5);
end=start+N
_
data-1;
/...........................
...
DFT..................*.................*...............I
for( i=start;i<=end:i++)
22