LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Step response for frequency response

Hello !

 

We're doing a project in which we need to calculate the frequency response of an unknown impedance. We use a square wave as the input of the circuit and we can obtain, with a DAQ, the step response of both the known and the unknown impedances. We use the step response of the known impedance to get the value of the current on the circuit.

 

After that, we take both tension and current signals, apply the derivative with the Derivative x(t).vi, rebuild the waveform, apply FFT Spectrum Mag-Phase(with the Hanning window) to get both the magnitude and phase of the signals. We unbundle these clusters to get the arrays. Then, we rebuild the waveform (again) to calculate the harmonics with the Harmonic Distortion Analyzer.vi. After that, we select only the odd numbered harmonics and build another array with them. Then we divide the Magnitude signals of both and subtract the Phase signals. After that we plot it using a XY plot, but we're not getting the correct graphs or the ones we expected.

 

What are we doing wrong ? Does it have anything to do with the Hanning window or is our thought process that is wrong somewhere?

 

Thanks for reading !

0 Kudos
Message 1 of 8
(2,793 Views)

Anyone please?

0 Kudos
Message 2 of 8
(2,759 Views)

One way to debug this kind of setup is to make graphs every step of the way.

0 Kudos
Message 3 of 8
(2,736 Views)

All the graphs are turning correct until the end. The input signal is being well recieved, the derivative graph clearly shows the impulse that we wanted to obtain, the FFT is also working fine. But when we divide the Magnitude of the voltage for the magnitude of the current we can't obtain the frequency response of the resistance. Are we using the correct harmonic VI ? do we even have to calculate the harmonics of the signal ? Or what can we do ? I can include the file or print-screens if that helps.

0 Kudos
Message 4 of 8
(2,730 Views)

I suggest coming up with a way to digitize the voltage and the current. I have been doing this for quite a while with good results.

pat

0 Kudos
Message 5 of 8
(2,713 Views)

How could we do that?

0 Kudos
Message 6 of 8
(2,710 Views)

I am not familiar with your circuitry. I have used power amps and other circuitry that make  a voltage and current output available. By digitizing both using two different channels the impedance cam be calculated at various frequencies etc. If you do not have a current sence built into your circuit would it be possible to measure the voltage across a known impedance in the circuit signal path giving the current measurement after scaling for the impedance.

pat

0 Kudos
Message 7 of 8
(2,679 Views)

Also, is it necessay to use a square wave for the input signal? If a swept sine signal is used the impedance can be calculated at various frequencies when the output voltage and current are measured.

pat

0 Kudos
Message 8 of 8
(2,676 Views)