My lab is trying to put together a transfer function for a circuit. Because the board I have can't output in the required frequencies, the signal is begin generated by a signal generator being controlled by hand. We're generating signals at 6,10,20,60,100,200 etc. Hz, all the way up to about 100kHz. Now, I'm hoping to use the TransferFunction function in the Advanced Analysis library to do most of the work for me, but I completely do not understand its documentation, nor do I understand the documentation of the FFT function it's supposedly based on. For example, when I run the following code:
#include <analysis.h>
static double mag[1024];
static double df;
static double phase[1024];
static double SineTwo[1024];
static double sineOne[1024];
int main()
{
SinePattern (1024, 1.0, 0.0, 15.0, sineOne);
SinePattern (1024, 1.45, 47.0, 15.0, SineTwo);
SinePattern(1024,1.0,0.0,1.0,sineThree);
TransferFunction (sineOne, SineTwo, 1024, (1.0/1024.0), mag, phase,
&df);
return 0;
}
and breakpoint on the return statement, the phase and mag arrays look nothing like I hoped.
Right now we're using an oscilloscope and having to calibrate it to each frequency and loaboriously take the measurements by hand. If I can get this program up and running it'll help alot.
Using: Labwindows/CVI 6.0 with a Multifunction DAQ (PCI-6036E)