0
$\begingroup$

Well, I have the following code:

Clear["Global`*"];
u = 5;
\[Tau] = (1/2)*10^(-3);
c = 10^(-6);
r = 1000;
y = u*Sum[((1 - E^((-t + \[Tau] + 4 n \[Tau])/(c*r)))  HeavisideTheta[
        t - 4 n \[Tau]] HeavisideTheta[
        t - \[Tau] - 4 n \[Tau]]) - ((1 - E^((-t + (3 + 4 n) \[Tau])/(
         c*r))) HeavisideTheta[t - 4 n \[Tau]] HeavisideTheta[
        t - (3 + 4 n) \[Tau]]), {n, 0, Infinity}];

And I want to find the ripple in the voltage given by y when the transient part of that function is over. I can do that by finding the period time of that function and I found that I can use:

$$\lim_{\text{k}\to\infty}\left|\text{y}\left(\left(2\text{k}+3\right)\tau\right)-\text{y}\left(\left(2\text{k}+1\right)\tau\right)\right|\tag1$$

Programming that in Mathematica, gives the following code:

FullSimplify[
 Limit[Abs[(y /. t -> (2*k + 3)*\[Tau]) - (y /. 
      t -> (2*k + 1)*\[Tau])], k -> Infinity]]

And Mathematica returns:

Interval[{0, 20}]

Which is wrong, because it must return (I know that that is the good answer):

$$\frac{5 (e-1)}{1+e}\approx2.31059\tag2$$

Where is my mistake, is it a coding mistake? Or a mathematical mistake? Thanks for any help.

$\endgroup$
1
$\begingroup$

Not an answer just trying to clarify what you are looking for. I evaluate your code

Clear["Global`*"];
u = 5;
τ = (1/2)*10^(-3);
c = 10^(-6);
r = 1000;
y = u*Sum[((1 - E^((-t + τ + 4 n τ)/(c*r))) HeavisideTheta[
        t - 4 n τ] HeavisideTheta[
        t - τ - 4 n τ]) - ((1 - 
         E^((-t + (3 + 4 n) τ)/(c*r))) HeavisideTheta[
        t - 4 n τ] HeavisideTheta[t - (3 + 4 n) τ]), {n, 0, 
     Infinity}];

Your result for y is enter image description here

Now I plot the the results putting in some vertical lines at the piecewise locations

Plot[y, {t, 0, 25/1000},
 Epilog -> {Pink, InfiniteLine[{1/2000, 0}, {0, 1}], 
   InfiniteLine[{3/2000, 0}, {0, 1}]}]

enter image description here

It does not look like the transient is ever over...

What do you want the amplitude of the oscillation?

$\endgroup$
1
  • $\begingroup$ Yes, I got that too. But the thing I want is, what is the absolute difference between the top (maximum) and the bottom (minimum) of the function when time goes to infinity. $\endgroup$
    – Jan
    Jul 26 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.