Delay

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi
I developed a program into a ATmega32. It determines the actual phase angle of the three-phase utility.
I use the internal ADC to read the voltage values and after the calculation a PWM signal is generated, which is filtered by a low-pass filter (simple R-C). The output signal is a sawtooth signal between 0-5V (0 means 0degree and 5V means 360 degree).
Today I made measurements and I saved the measured values with a Oscilloscope to compare it with the simulation results in matlab. The shape of the output signal is the same as the simulation result, but there is a 1.3ms delay between the two signals, which is relative high comparing it with the 20ms time period of the output signal.
When I tested the program in the AVR Studio I find that the code works properly.
My question is that has anybody any idea why this delay occur? It is comes from the filtering?
I use a filter with 5kHz cut off frequency, and I use 9bit fast PWM with the 15Mhz clock signal.
Thanks any advice

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For a first order low-pass filter, the output voltage will always lag the input voltage by some phase delay between 0-90 degrees. For the a 20ms period, 1.3ms is ~23 degrees.

You would have to examine the phase response of your filter to verify that the the delay is not coming from other sources.