Souljah44
Junior Member level 1
Hi All,
This is my first ADC and verifying it is proving to be more difficult then actually designing the subblock.
I have been able to do a transient simulation in cadence (spectre) and have successfully imported the data into matlab.
This is where I'm encountering most of my headache.
1) I'm new at matlab
2)All of the fft examples I've seen use as input a time varying signal defined as a function. The data that I have is in a table form: transient output with respect to time.
I'm not sure how to progress from here. Do I have to build a function from the data?
2) Getting the SNDR is a bit more than just finding and plotting the FFT. Could you please give me a hand with that.
This is what I have so far:
Any help would be greatly appreciated.
Thanks!
   Updated   
Hi all,
I had to take the transpose of one of the multiplication operands.
The other questions still stand: namely:
1) what form should my input data be in. As it is now, dout is just a collections of data points that can be plotted independent of time.
For instance attachment1 is the plot of dout vs time (what i expect) but I can also plot dout without specifying the xaxis. The two plots are not the same at all.
Doing fft on dout directly results in a plot that looks like a triangle.
2) how to set nbw
3) how to proceed to obtain final snr
Thanks!
This is my first ADC and verifying it is proving to be more difficult then actually designing the subblock.
I have been able to do a transient simulation in cadence (spectre) and have successfully imported the data into matlab.
This is where I'm encountering most of my headache.
1) I'm new at matlab
2)All of the fft examples I've seen use as input a time varying signal defined as a function. The data that I have is in a table form: transient output with respect to time.
I'm not sure how to progress from here. Do I have to build a function from the data?
2) Getting the SNDR is a bit more than just finding and plotting the FFT. Could you please give me a hand with that.
This is what I have so far:
Code:
%I import my cadence transient output and save the variables in [time] and [dout]
%I plot dout with respect to time to verify that I have the right data
figure(1)
plot(time,dout)
%xlabel('time (ms)')
%ylabel('V (V)')
%grid on
%From poking around, I know that using hann window and setting N as 64 times OSR is a good idea so that's what I do next
%nb is number of signal bin and for hann, I've also seen in the literature that it's supposed to be 3
OSR=2048.00021;
N=64*OSR;
w=hann(N);
nb=3;
%my input signal is defined here
fbin=12207.03;
%How do I set my noise bandwidth (NBW). I've read that for hann, it has to be 1.5/N but I've seen a couple of examples that use a different value.
%The operation below gives me and error. I'm applying windowing to the data and "fft'ing" it. I get this error:
%:Error using Inner matrix dimensions must agree.
%I've also tried w*.dout but that also fails.
V=fft(w*dout)
Thanks!
   Updated   
Hi all,
I had to take the transpose of one of the multiplication operands.
The other questions still stand: namely:
1) what form should my input data be in. As it is now, dout is just a collections of data points that can be plotted independent of time.
For instance attachment1 is the plot of dout vs time (what i expect) but I can also plot dout without specifying the xaxis. The two plots are not the same at all.
Doing fft on dout directly results in a plot that looks like a triangle.
2) how to set nbw
3) how to proceed to obtain final snr
Thanks!
Attachments

24 KB Views: 1

17.2 KB Views: 1
Last edited by a moderator: