LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Non Ideal RC Impulse Response to Square Wave Issue

Solved!
Go to solution

Hi NI Team,

I'm having a little trouble with understanding why the signal response amplitude of my simulated square wave, when passed through a non ideal RC response filter, is incorrect. Qualitatively, the response shape seems correct, but the amplitude is off.

 

I'm generating a Square Wave (where you specify the frequency and pulse width), the amplitude is fixed at 1 and the offset is also 1 so that the square wave goes from 0 to 1.. 

 

Next, I construct the non-ideal RC impulse response kernel ((1/RC)*exp(-t/RC))  using the Formula Waveform Vi, and finally I use the Continuous Convolution VI to convolve the square wave signal with the RC impulse response to generate the signal output ...

This is explained for example in the following link :

 

http://web.cecs.pdx.edu/~ece2xx/ECE222/Slides/ConvolutionIntegralx4.pdf

 

Although, I think the author may have a typo in the kernel amplitude (I think this should be 1/RC and not RC) but the rest looks fine.

 

In the attached VI, use a Signal Frequency of 300 Hz, Signal Pulse Width of 0.01 ms, and RC bandwidth of 380 Hz.

An RC bandwidth of 380 Hz would be a RC time constant of ~ 2.6 ms. Thus, when a unit square wave with a pulse width << than 2.6ms, the resultant response signal should have an amplitude of 1 (matching the unit square wave signal here) and fall off appropriately as e^(-t/RC) ...

 

This appears correct when the simulation is run. However, when I increase the Pulse Width to say 2.6ms, (which should show a charging of the RC circuit to an amplitude of ~0.5 and then discharging as e^(-t/RC), the amplitude is much too high..

 

Do I have a gross error in my understanding here or maybe I am using one of these VI's incorrectly ?

 

Thank you for your help and time in advance!

 

RC Response.png

 

 0.01ms.PNG2.6ms.PNG

0 Kudos
Message 1 of 2
(3,823 Views)
Solution
Accepted by topic author zmod_cz

I actually made a mistake in my interpretation of the correct amplitude for the two cases I presented. I was still unable to resolve the discrepency here but thanks to this post, I was able to fix the issue. For this case, one must "normalize" the convolution kernel to the "sum" of the elements in the resultant kernel waveform y data. I am posting the solution here in case someone else runs into this issue.

 

 

 RC Response_rev0.png

 

0.01ms_rev0.PNG2.6ms_rev0.PNG

0 Kudos
Message 2 of 2
(3,768 Views)