singhji0000
Junior Member level 3
i need to calculate FFT of the sinusoidal output of incremental ADC with 16 bit resolution
In order to achieve sinusoidal output vs input samples, i gave ramp input voltage amplitude from 0 to 3V for 20000 samples in sin function with fixed frequency freq =1 and fs = 60K with ADC cycles 257 and veried the phase from 0 to 2pi.
algorithm:
for vin = 0 to 3 with step input v =3/20000
for phase = 0 to 2pi
output = ADCout(vin,freq,phase,fs);
end
rmsout = sqrt(mean(output))
end
plot(rmsout)
ADCout is function which has sin wave input function = vin*sin(2pi*f/fs*i/n) where n are number of cycles =257 and i varies from 1 to n
but i dont get the sinusoidal output function wrt samples, so that i can take fft.
Am i doing it the right way?
In order to achieve sinusoidal output vs input samples, i gave ramp input voltage amplitude from 0 to 3V for 20000 samples in sin function with fixed frequency freq =1 and fs = 60K with ADC cycles 257 and veried the phase from 0 to 2pi.
algorithm:
for vin = 0 to 3 with step input v =3/20000
for phase = 0 to 2pi
output = ADCout(vin,freq,phase,fs);
end
rmsout = sqrt(mean(output))
end
plot(rmsout)
ADCout is function which has sin wave input function = vin*sin(2pi*f/fs*i/n) where n are number of cycles =257 and i varies from 1 to n
but i dont get the sinusoidal output function wrt samples, so that i can take fft.
Am i doing it the right way?