LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transfer function using impulse

Hi,

I am trying to get the transfer function of a system by applying an impulse input. I generated an impulse using the Impulse Pattern.vi in LabVIEW and applied it to a simple low pass filter circuit on the NI ELVIS II prototyping board. I tried to plot the magnitude spectrum of the acquired signal. But nothing is being plotted. Following are the details:

OS: Windows 7

LabVIEW Version: LabVIEW 2012

 

I gave '10' samples with delay between samples '1' for the Impulse Pattern.vi. Kindly help.

0 Kudos
Message 1 of 5
(2,410 Views)

That is simple dataflow. Most likely DAQ Assistant 2 (read data) runs before DAQ Assistant (write data).

 

Another issue is that your low pass filter has a transient response which tends to delay the output. How large the delay is depends on the filter characteristics, but it is quite possible that the delay is comparable to the amount of data you read.

 

It is also possible that the impulse generated has so little energy in the passband of your filter that the output is very small.

 

So what should you do?

1. Verify that the impulse you generate will produce a meaningful signal from the low pass filter. You may need a different impulse signal.

2. Determine the expected delay from your filter.

3. Control the timing of the Read and Write in your VI so that (A) the read acquisition is running before the impulse is generated, (B) read both the input and the output of the filter by acquiring two channels of data, (C) make sure the read acquisition runs long enough to capture the transient and the response from the impulse, (D) note that there is no assurance that you will capture the impulse when both the read and write  DAQ sampling is at 1 kHz, and (E) report back here how it works.

 

Lynn

0 Kudos
Message 2 of 5
(2,377 Views)

Thank you for the reply. I am relatively new to LabVIEW. I did the following modifications to the code

  • Defined a trigger input for both DAQs at the rising edge of PFI0.
  • Increased the amplitude of the impulse to 10. Also increased the no of samples and the delay between samples for the impulse signal.
  • In the configuration tab for the DAQ, I set the generation mode as N samples(100 samples at 10k)
  • Using the NI ELVISmx Instrument Launcher, I apply a +5V signal to PFI0.

The graph is being plotted now, but it still does not make much sense to me. Please help. The Low Pass Filter has R=220 ohms and C=1 microfarad, giving a time constant of 220 micro seconds only.

 

Please correct me if I am doing something wrong here.

0 Kudos
Message 3 of 5
(2,352 Views)

I do not see any code in the AO DAQ Assistant to trigger from the PFI0 line.

 

Please run the vI so that some data shows on the graphs. From the Edit menu select Make Current Values Default. Save. Post that VI. Then we can see your data.

 

Lynn

0 Kudos
Message 4 of 5
(2,332 Views)

Hi

I applied a manual trigger to the PFI0 line using NI ELVISmx Instrument Launcher software(connected +5 V to PFI0 line). I did that because I did not know how to trigger it through code in LabVIEW. 

 

I have done what you said. Posting that VI here

0 Kudos
Message 5 of 5
(2,322 Views)