I am try to genrate quadrature phasor vector using ippsTone_Direct_32f
foffsin = foffCos + pi/2;
.ippStatsSin = ippsTone_Direct_32f(&v2,Np,1.0,foffsin,&ZeroPh1,ippAlgHintAccurate);
but the genrated phasor is inverse i.e instead sin(x) its gnerating sin(-x); If i try foffsin = foffCos - pi/2 the phasor is all zero.
Kindly let me know what could be wrong.
The problem was due to freq range in case of real is 0-0.5 instead of 0-1. But t perfromace of IPP function is not comparable with matlab. Kindly share some light on this
Thats correct matlab uses double but if use the float variable in matlab the the results should be same.But you will see this is not the case. I tried comparing the tone generation with direct sin and cos function and compared the results are different.Tone generation function is not correctly working
ippC = ippsVectorSlope_32f(&v1,Np,0,foff);
ippA = ippsCos_32f_A24(&v1, &v2, Np);
ippB = ippsSin_32f_A24(&v1, &v3, Np);
ippStatsSin = ippsTone_Direct_32fc(pbuf,Np,1.0,foff,&ZeroPh,ippAlgHintAccurate);
Used following matlab code
ph = single(pi/ang);
xI = single(cos(ph.*in));
xQ = single(sin(ph.*in));
And compared the result among them and with matlab. The direct implementation exactly matches matlab while tone genrator has rounding error and it grows as number of sample
Kindly verify the tone genrator implementation Function.