sinusoidal ADC output for FFT

Status
Not open for further replies.

singhji0000

Junior Member level 3
Joined
Apr 1, 2011
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,464
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?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…