# Modelling of a RC series connection in time and frequency domain

Started by September 7, 2009
Hi!

Suppose there is resistor R and a capacitor C connected in series. A voltage
U_0 is applied at time t=0. The current in the time domain is then

I(t) = U_0/R * e^(-t/RC)                (1)

Taking a Laplace transform and substituting s by j*2*\pi*f, I get the
frequency domain current:

I(f) = U_0*C/(j*2*\pi*f*R*C+1)  	(2)

Now the problem: I defined values for U_0, R and C, calculated the time
domain signal by Eq. 1 and transformed it by DFT (using the Python function
numpy.fft.rfft). Then, I normalized the result by multiplying with 2/N,
except the first and the last sample, which were multiplied with 1/N.
N is the number of samples of the time signal.

A comparison with the signal predicted by Eq. 2 shows a significant
difference. What am I doing wrong?

Many thanks!

Eugen


On 7 Sep, 13:38, Eugen Artus <eugen.ar...@arcor.de> wrote:
> Hi!
>
> Suppose there is resistor R and a capacitor C connected in series. A volt=
age
> U_0 is applied at time t=3D0. The current in the time domain is then
>
> I(t) =3D U_0/R * e^(-t/RC) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(1)
>
> Taking a Laplace transform and substituting s by j*2*\pi*f, I get the
> frequency domain current:
>
> I(f) =3D U_0*C/(j*2*\pi*f*R*C+1) =A0 =A0 =A0 =A0 =A0(2)
>
> Now the problem: I defined values for U_0, R and C, calculated the time
> domain signal by Eq. 1 and transformed it by DFT (using the Python functi=
on
> numpy.fft.rfft). Then, I normalized the result by multiplying with 2/N,
> except the first and the last sample, which were multiplied with 1/N.
> N is the number of samples of the time signal.
>
> A comparison with the signal predicted by Eq. 2 shows a significant
> difference. What am I doing wrong?

The error you make is that you think that the DFT and the
Fourier Transform are the seame operation. In fact, they are
fundamentally different:

- The FT works with infinitely long, continuous-time signals.
- The DFT works with dicrete-time data of finite length.

These differences have a couple of consequences, like

- The DFT produces a discrete, finite-length spectrum
- The FT produces a continuous, infinitely wide spectrum

The FT and the DFT can be linked, but then you have to
apply the sampling theorem, map the frequency response
of the RC cirquit to Z-transform domain by using a
BiLinear Transform (BLT), and so on.

Rune

On Sep 7, 8:00=A0am, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 7 Sep, 13:38, Eugen Artus <eugen.ar...@arcor.de> wrote:
>
>
>
> > Hi!
>
> > Suppose there is resistor R and a capacitor C connected in series. A vo=
ltage
> > U_0 is applied at time t=3D0. The current in the time domain is then
>
> > I(t) =3D U_0/R * e^(-t/RC) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(1)
>
> > Taking a Laplace transform and substituting s by j*2*\pi*f, I get the
> > frequency domain current:
>
> > I(f) =3D U_0*C/(j*2*\pi*f*R*C+1) =A0 =A0 =A0 =A0 =A0(2)
>
> > Now the problem: I defined values for U_0, R and C, calculated the time
> > domain signal by Eq. 1 and transformed it by DFT (using the Python func=
tion
> > numpy.fft.rfft). Then, I normalized the result by multiplying with 2/N,
> > except the first and the last sample, which were multiplied with 1/N.
> > N is the number of samples of the time signal.
>
> > A comparison with the signal predicted by Eq. 2 shows a significant
> > difference. What am I doing wrong?
>
> The error you make is that you think that the DFT and the
> Fourier Transform are the seame operation. In fact, they are
> fundamentally different:
>
> - The FT works with infinitely long, continuous-time signals.
> - The DFT works with dicrete-time data of finite length.
>
> These differences have a couple of consequences, like
>
> - The DFT produces a discrete, finite-length spectrum
> - The FT produces a continuous, infinitely wide spectrum
>
> The FT and the DFT can be linked, but then you have to
> apply the sampling theorem, map the frequency response
> of the RC cirquit to Z-transform domain by using a
> BiLinear Transform (BLT), and so on.
>
> Rune

To add to Rune's comment, the DFT operates on discrete,
finite, PERIODIC time series and produces a discrete, finite,
PERIODIC frequency series.

One way to get around this is to use zero padding judiciously.

Julius

On 7 Sep, 15:13, julius <juli...@gmail.com> wrote:
> On Sep 7, 8:00=A0am, Rune Allnor <all...@tele.ntnu.no> wrote:
>
>
>
>
>
> > On 7 Sep, 13:38, Eugen Artus <eugen.ar...@arcor.de> wrote:
>
> > > Hi!
>
> > > Suppose there is resistor R and a capacitor C connected in series. A =
voltage
> > > U_0 is applied at time t=3D0. The current in the time domain is then
>
> > > I(t) =3D U_0/R * e^(-t/RC) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(1)
>
> > > Taking a Laplace transform and substituting s by j*2*\pi*f, I get the
> > > frequency domain current:
>
> > > I(f) =3D U_0*C/(j*2*\pi*f*R*C+1) =A0 =A0 =A0 =A0 =A0(2)
>
> > > Now the problem: I defined values for U_0, R and C, calculated the ti=
me
> > > domain signal by Eq. 1 and transformed it by DFT (using the Python fu=
nction
> > > numpy.fft.rfft). Then, I normalized the result by multiplying with 2/=
N,
> > > except the first and the last sample, which were multiplied with 1/N.
> > > N is the number of samples of the time signal.
>
> > > A comparison with the signal predicted by Eq. 2 shows a significant
> > > difference. What am I doing wrong?
>
> > The error you make is that you think that the DFT and the
> > Fourier Transform are the seame operation. In fact, they are
> > fundamentally different:
>
> > - The FT works with infinitely long, continuous-time signals.
> > - The DFT works with dicrete-time data of finite length.
>
> > These differences have a couple of consequences, like
>
> > - The DFT produces a discrete, finite-length spectrum
> > - The FT produces a continuous, infinitely wide spectrum
>
> > The FT and the DFT can be linked, but then you have to
> > apply the sampling theorem, map the frequency response
> > of the RC cirquit to Z-transform domain by using a
> > BiLinear Transform (BLT), and so on.
>
> > Rune
>
> To add to Rune's comment, the DFT operates on discrete,
> finite, PERIODIC time series and produces a discrete, finite,
> PERIODIC frequency series.
>
> One way to get around this is to use zero padding judiciously.

Ah. Here are some data I have lying around:

x =3D [1,2,3,4,5,6,7,8,9];

Those numbers are all there is to this data set.
No more. No less.

Remind me, where is that period?

Rune

Rune Allnor wrote:
> On 7 Sep, 15:13, julius <juli...@gmail.com> wrote:
>> On Sep 7, 8:00 am, Rune Allnor <all...@tele.ntnu.no> wrote:
>>
>>
>>
>>
>>
>>> On 7 Sep, 13:38, Eugen Artus <eugen.ar...@arcor.de> wrote:
>>>> Hi!
>>>> Suppose there is resistor R and a capacitor C connected in series. A voltage
>>>> U_0 is applied at time t=0. The current in the time domain is then
>>>> I(t) = U_0/R * e^(-t/RC)                (1)
>>>> Taking a Laplace transform and substituting s by j*2*\pi*f, I get the
>>>> frequency domain current:
>>>> I(f) = U_0*C/(j*2*\pi*f*R*C+1)          (2)
>>>> Now the problem: I defined values for U_0, R and C, calculated the time
>>>> domain signal by Eq. 1 and transformed it by DFT (using the Python function
>>>> numpy.fft.rfft). Then, I normalized the result by multiplying with 2/N,
>>>> except the first and the last sample, which were multiplied with 1/N.
>>>> N is the number of samples of the time signal.
>>>> A comparison with the signal predicted by Eq. 2 shows a significant
>>>> difference. What am I doing wrong?
>>> The error you make is that you think that the DFT and the
>>> Fourier Transform are the seame operation. In fact, they are
>>> fundamentally different:
>>> - The FT works with infinitely long, continuous-time signals.
>>> - The DFT works with dicrete-time data of finite length.
>>> These differences have a couple of consequences, like
>>> - The DFT produces a discrete, finite-length spectrum
>>> - The FT produces a continuous, infinitely wide spectrum
>>> The FT and the DFT can be linked, but then you have to
>>> apply the sampling theorem, map the frequency response
>>> of the RC cirquit to Z-transform domain by using a
>>> BiLinear Transform (BLT), and so on.
>>> Rune
>> To add to Rune's comment, the DFT operates on discrete,
>> finite, PERIODIC time series and produces a discrete, finite,
>> PERIODIC frequency series.
>>
>> One way to get around this is to use zero padding judiciously.
>
> Ah. Here are some data I have lying around:
>
> x = [1,2,3,4,5,6,7,8,9];
>
> Those numbers are all there is to this data set.
> No more. No less.
>
> Remind me, where is that period?

The period is not associated with the numbers, but rather with what the
FFT does. The result of performing an FFT on your data is exactly the
same as performing one on ...1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,....

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;

On Mon, 07 Sep 2009 08:30:10 -0700, Rune Allnor wrote:

> On 7 Sep, 15:13, julius <juli...@gmail.com> wrote:
>> On Sep 7, 8:00&nbsp;am, Rune Allnor <all...@tele.ntnu.no> wrote:
>>
>>
>>
>>
>>
>> > On 7 Sep, 13:38, Eugen Artus <eugen.ar...@arcor.de> wrote:
>>
>> > > Hi!
>>
>> > > Suppose there is resistor R and a capacitor C connected in series.
>> > > A voltage U_0 is applied at time t=0. The current in the time
>> > > domain is then
>>
>> > > I(t) = U_0/R * e^(-t/RC) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1)
>>
>> > > Taking a Laplace transform and substituting s by j*2*\pi*f, I get
>> > > the frequency domain current:
>>
>> > > I(f) = U_0*C/(j*2*\pi*f*R*C+1) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(2)
>>
>> > > Now the problem: I defined values for U_0, R and C, calculated the
>> > > time domain signal by Eq. 1 and transformed it by DFT (using the
>> > > Python function numpy.fft.rfft). Then, I normalized the result by
>> > > multiplying with 2/N, except the first and the last sample, which
>> > > were multiplied with 1/N. N is the number of samples of the time
>> > > signal.
>>
>> > > A comparison with the signal predicted by Eq. 2 shows a significant
>> > > difference. What am I doing wrong?
>>
>> > The error you make is that you think that the DFT and the Fourier
>> > Transform are the seame operation. In fact, they are fundamentally
>> > different:
>>
>> > - The FT works with infinitely long, continuous-time signals. - The
>> > DFT works with dicrete-time data of finite length.
>>
>> > These differences have a couple of consequences, like
>>
>> > - The DFT produces a discrete, finite-length spectrum - The FT
>> > produces a continuous, infinitely wide spectrum
>>
>> > The FT and the DFT can be linked, but then you have to apply the
>> > sampling theorem, map the frequency response of the RC cirquit to
>> > Z-transform domain by using a BiLinear Transform (BLT), and so on.
>>
>> > Rune
>>
>> To add to Rune's comment, the DFT operates on discrete, finite,
>> PERIODIC time series and produces a discrete, finite, PERIODIC
>> frequency series.
>>
>> One way to get around this is to use zero padding judiciously.
>
> Ah. Here are some data I have lying around:
>
> x = [1,2,3,4,5,6,7,8,9];
>
> Those numbers are all there is to this data set. No more. No less.
>
> Remind me, where is that period?

No where.  Which is why you should use the DFT judiciously on this
sequence, because the DFT implicitly assumes a periodic, evenly sampled
sequence and your sequence is not periodic.

--
www.wescottdesign.com

On 7 Sep, 17:36, Tim Wescott <t...@seemywebsite.com> wrote:
> On Mon, 07 Sep 2009 08:30:10 -0700, Rune Allnor wrote:
> > On 7 Sep, 15:13, julius <juli...@gmail.com> wrote:
> >> On Sep 7, 8:00=A0am, Rune Allnor <all...@tele.ntnu.no> wrote:
>
> >> > On 7 Sep, 13:38, Eugen Artus <eugen.ar...@arcor.de> wrote:
>
> >> > > Hi!
>
> >> > > Suppose there is resistor R and a capacitor C connected in series.
> >> > > A voltage U_0 is applied at time t=3D0. The current in the time
> >> > > domain is then
>
> >> > > I(t) =3D U_0/R * e^(-t/RC) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(1)
>
> >> > > Taking a Laplace transform and substituting s by j*2*\pi*f, I get
> >> > > the frequency domain current:
>
> >> > > I(f) =3D U_0*C/(j*2*\pi*f*R*C+1) =A0 =A0 =A0 =A0 =A0(2)
>
> >> > > Now the problem: I defined values for U_0, R and C, calculated the
> >> > > time domain signal by Eq. 1 and transformed it by DFT (using the
> >> > > Python function numpy.fft.rfft). Then, I normalized the result by
> >> > > multiplying with 2/N, except the first and the last sample, which
> >> > > were multiplied with 1/N. N is the number of samples of the time
> >> > > signal.
>
> >> > > A comparison with the signal predicted by Eq. 2 shows a significan=
t
> >> > > difference. What am I doing wrong?
>
> >> > The error you make is that you think that the DFT and the Fourier
> >> > Transform are the seame operation. In fact, they are fundamentally
> >> > different:
>
> >> > - The FT works with infinitely long, continuous-time signals. - The
> >> > DFT works with dicrete-time data of finite length.
>
> >> > These differences have a couple of consequences, like
>
> >> > - The DFT produces a discrete, finite-length spectrum - The FT
> >> > produces a continuous, infinitely wide spectrum
>
> >> > The FT and the DFT can be linked, but then you have to apply the
> >> > sampling theorem, map the frequency response of the RC cirquit to
> >> > Z-transform domain by using a BiLinear Transform (BLT), and so on.
>
> >> > Rune
>
> >> To add to Rune's comment, the DFT operates on discrete, finite,
> >> PERIODIC time series and produces a discrete, finite, PERIODIC
> >> frequency series.
>
> >> One way to get around this is to use zero padding judiciously.
>
> > Ah. Here are some data I have lying around:
>
> > x =3D [1,2,3,4,5,6,7,8,9];
>
> > Those numbers are all there is to this data set. No more. No less.
>
> > Remind me, where is that period?
>
> No where. =A0Which is why you should use the DFT judiciously on this
> sequence, because the DFT implicitly assumes a periodic, evenly sampled
> sequence and your sequence is not periodic.

... so you seem to mean that the DFT can not be used on
this sequence? If so, what does the numbers

X =3D fft(x) =3D
[ 45.0000
-4.5000 +12.3636i
-4.5000 + 5.3629i
-4.5000 + 2.5981i
-4.5000 + 0.7935i
-4.5000 - 0.7935i
-4.5000 - 2.5981i
-4.5000 - 5.3629i
-4.5000 -12.3636i]

signify?

Rune

On Mon, 07 Sep 2009 11:35:23 -0400, Jerry Avins wrote:

> Rune Allnor wrote:
>> On 7 Sep, 15:13, julius <juli...@gmail.com> wrote:
>>> On Sep 7, 8:00 am, Rune Allnor <all...@tele.ntnu.no> wrote:
>>>
>>>
>>>
>>>
>>>
>>>> On 7 Sep, 13:38, Eugen Artus <eugen.ar...@arcor.de> wrote:
>>>>> Hi!
>>>>> Suppose there is resistor R and a capacitor C connected in series. A
>>>>> voltage U_0 is applied at time t=0. The current in the time domain
>>>>> is then I(t) = U_0/R * e^(-t/RC)                (1) Taking a Laplace
>>>>> transform and substituting s by j*2*\pi*f, I get the frequency
>>>>> domain current:
>>>>> I(f) = U_0*C/(j*2*\pi*f*R*C+1)          (2) Now the problem: I
>>>>> defined values for U_0, R and C, calculated the time domain signal
>>>>> by Eq. 1 and transformed it by DFT (using the Python function
>>>>> numpy.fft.rfft). Then, I normalized the result by multiplying with
>>>>> 2/N, except the first and the last sample, which were multiplied
>>>>> with 1/N. N is the number of samples of the time signal. A
>>>>> comparison with the signal predicted by Eq. 2 shows a significant
>>>>> difference. What am I doing wrong?
>>>> The error you make is that you think that the DFT and the Fourier
>>>> Transform are the seame operation. In fact, they are fundamentally
>>>> different:
>>>> - The FT works with infinitely long, continuous-time signals. - The
>>>> DFT works with dicrete-time data of finite length. These differences
>>>> have a couple of consequences, like - The DFT produces a discrete,
>>>> finite-length spectrum - The FT produces a continuous, infinitely
>>>> wide spectrum The FT and the DFT can be linked, but then you have to
>>>> apply the sampling theorem, map the frequency response of the RC
>>>> cirquit to Z-transform domain by using a BiLinear Transform (BLT),
>>>> and so on.
>>>> Rune
>>> To add to Rune's comment, the DFT operates on discrete, finite,
>>> PERIODIC time series and produces a discrete, finite, PERIODIC
>>> frequency series.
>>>
>>> One way to get around this is to use zero padding judiciously.
>>
>> Ah. Here are some data I have lying around:
>>
>> x = [1,2,3,4,5,6,7,8,9];
>>
>> Those numbers are all there is to this data set. No more. No less.
>>
>> Remind me, where is that period?
>
> The period is not associated with the numbers, but rather with what the
> FFT does. The result of performing an FFT on your data is exactly the
> same as performing one on ...1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,....

After I wrote my response, I realized that one doesn't have to insist on
periodicity -- one can insist, instead, on data that lives on a 1-sphere
(i.e. a circle).  Then the periodicity becomes an illusion generated by
our insistence on data existing on a line.

The two are mathematically equivalent, of course; only how one thinks
about one or the other is different between the two cases.  The
_important_ thing is that -- to the DFT -- if you have a sequence [x0,
x1, ... , x{n-1}] then x{n-1} is exactly as adjacent to x0 x1 is.  Thus
if you use the DFT to analyze a sequence of numbers that are all there is
in the data set, no more, then you need to either make sure that the data
set is circular to match the DFT, or you have to do whatever is necessary
to insure that the approximation to the DFT input is valid.

--
www.wescottdesign.com

On 7 Sep, 18:55, Tim Wescott <t...@seemywebsite.com> wrote:
> On Mon, 07 Sep 2009 11:35:23 -0400, Jerry Avins wrote:
> > Rune Allnor wrote:
> >> On 7 Sep, 15:13, julius <juli...@gmail.com> wrote:
> >>> On Sep 7, 8:00 am, Rune Allnor <all...@tele.ntnu.no> wrote:
>
> >>>> On 7 Sep, 13:38, Eugen Artus <eugen.ar...@arcor.de> wrote:
> >>>>> Hi!
> >>>>> Suppose there is resistor R and a capacitor C connected in series. =
A
> >>>>> voltage U_0 is applied at time t=3D0. The current in the time domai=
n
> >>>>> is then I(t) =3D U_0/R * e^(-t/RC) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(=
1) Taking a Laplace
> >>>>> transform and substituting s by j*2*\pi*f, I get the frequency
> >>>>> domain current:
> >>>>> I(f) =3D U_0*C/(j*2*\pi*f*R*C+1) =A0 =A0 =A0 =A0 =A0(2) Now the pro=
blem: I
> >>>>> defined values for U_0, R and C, calculated the time domain signal
> >>>>> by Eq. 1 and transformed it by DFT (using the Python function
> >>>>> numpy.fft.rfft). Then, I normalized the result by multiplying with
> >>>>> 2/N, except the first and the last sample, which were multiplied
> >>>>> with 1/N. N is the number of samples of the time signal. A
> >>>>> comparison with the signal predicted by Eq. 2 shows a significant
> >>>>> difference. What am I doing wrong?
> >>>> The error you make is that you think that the DFT and the Fourier
> >>>> Transform are the seame operation. In fact, they are fundamentally
> >>>> different:
> >>>> - The FT works with infinitely long, continuous-time signals. - The
> >>>> DFT works with dicrete-time data of finite length. These differences
> >>>> have a couple of consequences, like - The DFT produces a discrete,
> >>>> finite-length spectrum - The FT produces a continuous, infinitely
> >>>> wide spectrum The FT and the DFT can be linked, but then you have to
> >>>> apply the sampling theorem, map the frequency response of the RC
> >>>> cirquit to Z-transform domain by using a BiLinear Transform (BLT),
> >>>> and so on.
> >>>> Rune
> >>> To add to Rune's comment, the DFT operates on discrete, finite,
> >>> PERIODIC time series and produces a discrete, finite, PERIODIC
> >>> frequency series.
>
> >>> One way to get around this is to use zero padding judiciously.
>
> >> Ah. Here are some data I have lying around:
>
> >> x =3D [1,2,3,4,5,6,7,8,9];
>
> >> Those numbers are all there is to this data set. No more. No less.
>
> >> Remind me, where is that period?
>
> > The period is not associated with the numbers, but rather with what the
> > FFT does. The result of performing an FFT on your data is exactly the
> > same as performing one on ...1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,....
>
> After I wrote my response, I realized that one doesn't have to insist on
> periodicity -- one can insist, instead, on data that lives on a 1-sphere
> (i.e. a circle). =A0Then the periodicity becomes an illusion generated by
> our insistence on data existing on a line.

Very good. Not perfect, but a lot better than most of the
sheep who make their opinions known here.

realize that your argument is the usual relation between the
DFT and ZT, just applied in reverse. Usually one starts out
with the ZT (which uses the rectangular form of complex numbers)
and argue that it is related to the DFT, which represents the
unit circle on polar form. In that case the 'periodicity'
of the DFT becomes an illusion caused by the ambiguity
of the polar representation of complex numbers.

doubt discover that even the complex plane is irrelevant,
as the DFT only maps an N-length complex-valued vector
to a different set of basis vectors.

Rune

On Mon, 07 Sep 2009 09:48:56 -0700, Rune Allnor wrote:

> On 7 Sep, 17:36, Tim Wescott <t...@seemywebsite.com> wrote:
>> On Mon, 07 Sep 2009 08:30:10 -0700, Rune Allnor wrote:
>> > On 7 Sep, 15:13, julius <juli...@gmail.com> wrote:
>> >> On Sep 7, 8:00&nbsp;am, Rune Allnor <all...@tele.ntnu.no> wrote:
>>
>> >> > On 7 Sep, 13:38, Eugen Artus <eugen.ar...@arcor.de> wrote:
>>
>> >> > > Hi!
>>
>> >> > > Suppose there is resistor R and a capacitor C connected in
>> >> > > series. A voltage U_0 is applied at time t=0. The current in the
>> >> > > time domain is then
>>
>> >> > > I(t) = U_0/R * e^(-t/RC) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(1)
>>
>> >> > > Taking a Laplace transform and substituting s by j*2*\pi*f, I
>> >> > > get the frequency domain current:
>>
>> >> > > I(f) = U_0*C/(j*2*\pi*f*R*C+1) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(2)
>>
>> >> > > Now the problem: I defined values for U_0, R and C, calculated
>> >> > > the time domain signal by Eq. 1 and transformed it by DFT (using
>> >> > > the Python function numpy.fft.rfft). Then, I normalized the
>> >> > > result by multiplying with 2/N, except the first and the last
>> >> > > sample, which were multiplied with 1/N. N is the number of
>> >> > > samples of the time signal.
>>
>> >> > > A comparison with the signal predicted by Eq. 2 shows a
>> >> > > significant difference. What am I doing wrong?
>>
>> >> > The error you make is that you think that the DFT and the Fourier
>> >> > Transform are the seame operation. In fact, they are fundamentally
>> >> > different:
>>
>> >> > - The FT works with infinitely long, continuous-time signals. -
>> >> > The DFT works with dicrete-time data of finite length.
>>
>> >> > These differences have a couple of consequences, like
>>
>> >> > - The DFT produces a discrete, finite-length spectrum - The FT
>> >> > produces a continuous, infinitely wide spectrum
>>
>> >> > The FT and the DFT can be linked, but then you have to apply the
>> >> > sampling theorem, map the frequency response of the RC cirquit to
>> >> > Z-transform domain by using a BiLinear Transform (BLT), and so on.
>>
>> >> > Rune
>>
>> >> To add to Rune's comment, the DFT operates on discrete, finite,
>> >> PERIODIC time series and produces a discrete, finite, PERIODIC
>> >> frequency series.
>>
>> >> One way to get around this is to use zero padding judiciously.
>>
>> > Ah. Here are some data I have lying around:
>>
>> > x = [1,2,3,4,5,6,7,8,9];
>>
>> > Those numbers are all there is to this data set. No more. No less.
>>
>> > Remind me, where is that period?
>>
>> No where. &nbsp;Which is why you should use the DFT judiciously on this
>> sequence, because the DFT implicitly assumes a periodic, evenly sampled
>> sequence and your sequence is not periodic.
>
> ... so you seem to mean that the DFT can not be used on this sequence?
> If so, what does the numbers
>
> X = fft(x) =
> [ 45.0000
>   -4.5000 +12.3636i
>   -4.5000 + 5.3629i
>   -4.5000 + 2.5981i
>   -4.5000 + 0.7935i
>   -4.5000 - 0.7935i
>   -4.5000 - 2.5981i
>   -4.5000 - 5.3629i
>   -4.5000 -12.3636i]
>
> signify?

Well, if the sequence is taken from a program written in C, and if the
variable in question is an enumeration of fruit, and if the mapping
between meaning and numbers goes

1: apples
2: oranges
3: grapes
4: kumquats
5: peaches
6: banannas
7: grapefruit
8: rose hips
9: mangoes,

then the sequence you present means Absolutely Nothing.  That doesn't
mean you can't take the DFT of it, just that you have chosen a
mathematical operation that means nothing to the data at hand.

So I will repeat and expand my original assertion, in hopes that by
repetition I can make up for my lack of brilliance: the DFT implicitly
assumes a certain temporal organization of the sequence (not to mention
the assumption that the numbers stand for real quantities), and if those
assumptions are totally invalid for the input, then the output stands
more as an unfortunate comment on the abilities and sensibility of the
practitioner than they stand for any meaningful interpretation of the
data.

Without saying what that sequence means, one may as well pick up a copy
of the I Ching, randomly invent a way to translate ten integers into the
six lines of a hexagram, and use the sequence to predict what you're
going to eat for breakfast tomorrow.  Either way the interpretation will
be as accurate and meaningful, and the I Ching is always more fun than
the output of an FFT.

--
www.wescottdesign.com