DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Magnitude and phase calculation of a transfer function using FFT

Hello.
I need  to compare two signals and generate two channels, one for magnitude (dB) and another for phase (degrees) between them and generate the results in the frequency domain. I want to use the FFT analysis functions of Diadem 8.1. Could you give some help?
0 Kudos
Message 1 of 13
(13,229 Views)

I'm not exactly sure how much detail you are looking for here.  Did you have a specific question about one of the FFT functions?  You basically have 2 FFT analysis functions.

With the FFT with one time signal, you are sending in for example a time-domain signal and getting the response signal which is now in the frequency domain.  With the FFT with two time signals, you know the input and output and you want to know what characteristics produced this output (coefficient of transfer function). Typically you perform multiple tests over and over again to get these coefficients to make sure they are correct.  Either of these methods will produce separate channels that contain the magnitude and the phase in the frequency domain.  You just need to check the options in the FFT Functions window that is available when you configure the analysis in the configuration dialog.

I hope this helps.

Regards,

Erin

NI Mexico

0 Kudos
Message 2 of 13
(13,208 Views)

Hello, Erin. Thanks for your fast response.

What  I am trying to do is the following:

I have three channels. Channel 1 for time, Channel 2 for Input and Channel 3 for Output. The input consists in a sinusoidal sweep from 1 to 30 Hz with a specific amplitude. The output is the response of my system, a PID controlled hydraulic actuator. When I use a spectrum analizer I can configure it to see two graphs (after some iterations and averages): one for magnitude (dB) and other for phase (degrees). In this way I can observe the relationship between the input and the output, not only in magnitude, but also the delay between the signals.

Maybe it is time to return to my old electronic engineering books to do this step by step, but I would like to use one of the Diadem functions.

Could you give to me some comments?

0 Kudos
Message 3 of 13
(13,196 Views)

You'll want to use the FFT (2 signals) function.  On the FFT functions tab, enable the transfer function, choose the method that you want, and select phase.  You'll also want to select amplitude.  That will generate 3 new channels: Frequency, Tr_Phase, and Tr_Amplitude.  You can then graph the system response in Frequency vs. Phase and Frequency vs. Amplitude.  That should be what you're looking for.

Saludos,

Erin

NI Mexico

0 Kudos
Message 4 of 13
(13,186 Views)

Thank you, Erin. That´s what I was looking for.

Do you have an email address where I could contact you? I live in Mexico, and I´d like to meet you. I am working in several Diadem Projects and it should be better for me to contact you by email or phone.

0 Kudos
Message 5 of 13
(13,179 Views)
Actually, you can contact National Instruments support through the following web page:
 
 
We'd be happy to help you out with any questions that you have about DIAdem or any other National Instruments product.
 
Saludos,
Erin
NI Mexico
0 Kudos
Message 6 of 13
(13,170 Views)

Hi

  I'm new to Vision Development module. I'm using C# and accessing the functions as a ActiveX control.

  My objective is to do a AutoFocus. I tried using the Contrast method : EdgeDetection followed by Quantify and STD/Mean. I got different  Zaxis coordinate  on the motion controller for STD and for Mean.

 

axCWIMAQ1.AcquireImage();

axCWIMAQViewer1.Attach(axCWIMAQ1.Images.Item(1));

oImageCopy = axCWIMAQViewer1.Image;

if (axCWIMAQViewer1.Image != null)

{

axCWIMAQVision1.EdgeFilter(axCWIMAQViewer1.Image, axCWIMAQViewer1.Image, NationalInstruments.CWIMAQControls.

CWIMAQGrayEdgeMethods.cwimaqGrayEdgeDiffer, 0, oImageCopy);

axCWIMAQVision1.Quantify(axCWIMAQViewer1.Image, oGQReport, oRQReport, axCWIMAQViewer1.Image);

fSTD = oGQReport.Item(1).StandardDeviation;

 For auto focus should I look into the peak of the STD or the mean ?

Please let me know your thoughts.

 

Thank you

Murugan

0 Kudos
Message 7 of 13
(12,548 Views)
Hi Murugan
 
I could recommend you an example from the developer zone. This example illustrates two methods for determining the best focus for your imaging system. One approach uses frequency content to determine edge sharpness. The other method uses an edge detector and measures the average intensity of the edges. Both methods return a relative score that you can use to automate focusing. The concept is similar for both, but the approaches are different. Experiment with both methods to find which works best for you.

To use these methods, you need a way to automatically control the focus of your imaging system. For example, you need a lens that supports programmatic focus adjustment or you need a way to programmatically move the camera relative to the object under inspection
 
 
Have a nice day!!
 
Coamín Cruz
AE Mexico
0 Kudos
Message 8 of 13
(12,510 Views)

Hello..

Actuall

 

0 Kudos
Message 9 of 13
(11,941 Views)

Hello..

Actuall i

 

0 Kudos
Message 10 of 13
(11,941 Views)