3
$\begingroup$

I am wondering how to create a single rectangle pulse with nonlinear riding and falling edges on both sides.
I don't know whether it is better to do it piecewise or to mathematically transform the original rectangle with some function (e.g. a convolution).

So far, I' ve constructed my pulse with UnitStep functions :

trapezoid[t_] := 
 622.4*10^6*(t - 0.6*10^-12)*UnitStep[t - 0.6*10^-12] - 
  622.4*10^6*(t - 7.83*10^-12)*UnitStep[t - 7.83*10^-12] - 
  493.7*10^6*(t - 96.235*10^-12)*UnitStep[t - 96.235*10^-12] + 
  493.7*10^6*(t - 105.12*10^-12)*UnitStep[t - 105.12*10^-12]

Plot[trapezoid[t], {t, 0, 130*10^-12}, PlotRange -> {0, 5*10^-3}]

enter image description here

The point is that I need a preferably continuous shape so that I can Laplace transform it eventually.

Any help is welcome, because I am stuck defining the edges between the flat top and the 0 values before the rise.

Note: this is a very short pulse (100 ps long), if that is relevant, and the rise time is around 6 ps.

Thank you!

Tamás

$\endgroup$
5
  • $\begingroup$ Welcome! Please provide any already existing code (if available), so we can build on that. Do you have any more specific info on what you mean by "nonlinear"? $\endgroup$
    – Yves Klett
    Dec 12 '14 at 9:55
  • $\begingroup$ So far, I've constructed my pulse with UnitStep functions: trapezoid[t_] := 622.4*10^6*(t - 0.6*10^-12)*UnitStep[t - 0.6*10^-12] - 622.4*10^6*(t - 7.83*10^-12)*UnitStep[t - 7.83*10^-12] - 493.7*10^6*(t - 96.235*10^-12)*UnitStep[t - 96.235*10^-12] + 493.7*10^6*(t - 105.12*10^-12)*UnitStep[t - 105.12*10^-12] I'd like to make the edges not straight lines, rather "smooth" lines. Thank you! $\endgroup$ Dec 12 '14 at 10:27
  • $\begingroup$ Here is the plot command and range: Plot[trapezoid[t], {t, 0, 130*10^-12}, PlotRange -> {0, 5*10^-3}] Thank you in advance! $\endgroup$ Dec 12 '14 at 10:36
  • 1
    $\begingroup$ Hyperbolic tangents are useful for smooth step functions, e.g. Plot[0.5 (Tanh[10 (x - 1)] - Tanh[10 (x - 3)]), {x, 0, 4}] $\endgroup$ Dec 12 '14 at 13:44
  • $\begingroup$ At least closely related: 38293 $\endgroup$
    – Kuba
    Dec 12 '14 at 16:03
9
$\begingroup$

The convolution approach is quite flexible. For example, here a Gaussian function is used to round the edges of the rectangle:

f[y_] = Convolve[Exp[-100 x^2], UnitStep[x - 1] - UnitStep[x - 2], x, y];
Plot[f[y], {y, 0, 3}]

enter image description here

One nice thing about the Gaussian is that it gives an analytic form, as you can see by querying f[y]

1/20 Sqrt[π] Erfc[10 - 10 y] - 1/20 Sqrt[π] Erfc[20 - 10 y]

You can find the Laplace Transform using:

LaplaceTransform[f[y], y, s]
$\endgroup$
4
  • $\begingroup$ Hello. Thanks for your answer. I am wondering how I can transform the above to the tiny pulse I need (see original question). I've tried a few things, but I lose the rectangle shape unfortunately. Thank you! P.S.: Have a wonderful new year! $\endgroup$ Jan 7 '15 at 8:52
  • $\begingroup$ To get a tiny pulse, use a very narrow distance between the unit steps and a very narrow Gaussian. $\endgroup$
    – bill s
    Nov 8 '19 at 15:34
  • $\begingroup$ Can you provide any reference to the analytical solution or its derivation? Thanks $\endgroup$ Apr 28 at 14:36
  • $\begingroup$ @Asheesh Sharma -- I don't know how Mathematica does the integration, but the answer is in f[y] above, containing a couple of Error functions and a couple of square roots. $\endgroup$
    – bill s
    Apr 28 at 18:58

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.