ГОСТ Р 56914—2016
p r in t ! ( 1\n S ta L is tic s : \n * )f
p r in tl( *Filename: fcsVn*, Iname);
p rin L l(• Sample count: % d \n *,i)j
p r in tl( * Sample ra te
p rin L l( ’ Max(vd)
: %1.0l MH*Vn",le - б /<vtim e (1 ]-vLime10JJ1:
: %4.01 mVVn’.max vd*1000);
p r
in t i
<’ M in(vd): %4.01 mV\n-.min, vd*1000
);
re tu rn i ;
j / * . * * . . . . . * * » . * * . End ReadCsv ++**+*+*++*+++*/
*
/***
/***
*»•
** •
»»♦
f
/
/
/+ **♦ ********+ # *+ + **♦ + *******+ **♦ ♦ **♦ ♦ **♦ ♦ **♦ ♦ **♦ ♦ **♦ ♦ **♦ ♦ **♦ ♦ **
/
/* * *DFT : D iscre te F ourier Transform***
/***•*****» ************» **» » **» » **» » **» » **» » **» » **» » **» » **» » **» »
/
/***
D e scrip tio n :***
f
/***
This lu n c tio n c a lc u la te the F ourier coelfacient***
/
/***
f
In p u t: Number o l samples
* » *
/
/***
G lobal V a ria b le s:
f
/**» /
/***
D isplays R esults:
*»•
f
/***
C a
rrie r co e ih cie n t
+*+
/ /***
Upper sideband
co e ih cie n t
/
/***
Lower sideband co e ih cie n t
■*»*
!
?+•+++•+++•+++•+++•+++•+++•+++•++++++**+++(►+++++++*+*+++++++++•+
f
vo id d lt ( in t count]
(
float cO real,cO ,imag,cO abs.cD_phaee;
float c l re a l,c l,.im a g ,c l a b s .c l phase:
float c2. re a l.c 2 . im ag,c2..abs,c2 phase;
in tN. d a ta .c e n te r.s ta rt,e n d :
float wO.wu.wl;
in t i;
w0= (float) (13 .5 6 e 6 *2 .0 )*p i;/* c a rrie r13.56 MHz */
wu=<lloat) (1.0+ 1.0/N.FSCJB) *w0; /* upper sideband 13.98 MHz * /
w l= (flo a t)<1.0-1.0/N FSUB]*wO; /* lower sideband 13.14 MHz *
/
cO real=0
cO imag=0
c l re a l
=0
cl.im ag=0
c2 re a l
=0
/* re a l p a rt o f the c a rrie r lo a rie r co e ih cie n t * /
/* imag p a rt o l the c a rrie r lo u rie r c o e ih cie n t */
/ 4 re a l p a rt o l the up. sideband lo u rie r c o e ih cie n t * /
/* imag p a rt o l the up. sideband lo u rie r co e ih cie n t * /
/*re a l p a rt o l the lo . sideband lo u rie r co e ih cie n t
*/
c
2
imag=0/*imag p a rt o l the lo . sideband lo u rie r coelfacient * /
ce n te r= (co u n t+ l)/2 ; /*center address * /
/ • * • • • * • • • • s ig n a l s e le c tio nо ******» *» ***» » **» » **» » **» » ***/
/+Number o l samples lo r two s u b -c a rrie r periodsV
N d a ta = (in t) <0.5+2.0*N FS’JB/ (v tim e [2 !-v tim e U l) /13.56e6F) ;
/* Note: (vLim e121- v tim e [ll) are the scope sample ra te V
s ta rt= c e n te r-(in t)< N .d a ta /2 .0 + 0 .5 );
end=start+N d a ta -lr
35