Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hello!
I have started to use Mathcad a bit for circuit analysis with laplace transform. However, often the invlaplace does not give the output i expect.
Am i doing something wrong?
I have attached a worksheet where i want to plot iL(t). However cant get it to work.
If i redefine the step function i am using (only using simple step) it works...... i need to be able to analyze step functions...
Would be great to get some input...
Best regards Kanka
@Kanka wrote:
Hello!
I have started to use Mathcad a bit for circuit analysis with laplace transform. However, often the invlaplace does not give the output i expect.
Am i doing something wrong?
No, Prime is doing wrong. It should work, but the symbolics (=muPad) in Mathcad is sure not state of the art and comparable with Maple or Mathematica 😞
Whenever you use a decimal point in conjunction with symbolics, the symbolics switches in some sort of numerics mode and calculations like equations solving or invlaplace might fail because of this.
I fear that there is not much you can do other than avoiding float numbers:
??
Yes, thats the same outcome as in the OPs sheet. I had not changed the plot limits he had set
Hi!
Thanks! I changed from 0.001 to 10^-3 and it worked...
Still a bit puzzled how 10^-3 would be treated as an integer and 0.001 not but I suppose that is how the engine work.
Seems like i am up and running again...!
Thanks
/Kanka
The value 0.001 is a floating point number with precision limited by the number of bits used to represent mantissa.
The value 10^-3 is (fortunately !!!) represented internally by the ratio 1/1000. That' s a ratio of two integers that the symbolic processor can work with.
In general, when working with symbolics, I prefer to use symbols throughout. So if you define v.L(t,A,T) with A=amplitude, T=pulse width; this should give you U.L(s,A,T) and you define I.L(s,L,R,U) and finally should get i.L(t,L,R,A,T).
Only AFTER that you fill in the numbers. That will allow you to use any amplitude, width, resistor and coil values for further processing...
Success!
Luc
One thing I do not understand is why the clearsym() should be used. It makes indeed a difference... What does it do. Help only says that it clears the symbol.... I don't get it... /Kanka
Clear.sym(...) makes an variable undefined, but only for symbolic evaluation. clear(...) some sort of deletes the variable, its former value is unknown to symbolics and numerics.
So if you use T:=0.001 and the write clear.sym(T) afterwards, any symbolic evaluation command (like "invlapace"= does not know anything about the value of T and treats it as an unknown variable.
The plots use numeric evaluation and they still know about the value of T (and the other variables).
BTW, using symbolics througout sure is a nice an clean approach. Unfortunately Mathcads symbolics engine (mupad) is not on the level with other nowadays state of the art symbolic programs. So now and then you may be faced with the situation that mupad won't be able to find a general symbolics result, while it would still be able to give you a result using the concrete values of the variables (in your case it was the other way round, though).
Furthermore using symbolics as you have seen in Francesco's example that it often is necessary to add a couple of "assume" statements to tell Prime that a variable is real or positive, etc.
You can omit the clear.sym statements if you define your variables after the symbolic evaluations and before the plot.
Hallo Werneros.....
The following errors of Prime and mathcad 15 have been known for a long time: