cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Laplace transform problem. Does not get invlaplace transform.

Kanka
4-Participant

Laplace transform problem. Does not get invlaplace transform.

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

10 REPLIES 10
Werner_E
24-Ruby V
(To: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:

B.png

ttokoro
20-Turquoise
(To:Werner_E)

RL circuitRL circuit

??

Yes, thats the same outcome as in the OPs sheet. I had not changed the plot limits he had set

B.png

 

Kanka
4-Participant
(To:Werner_E)

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

LucMeekes
23-Emerald III
(To: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

Kanka
4-Participant
(To:LucMeekes)

Thanks! Symbolics throughout is indeed an aproach I didn't think about. I usually set my variables on the top of the sheet... 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
Werner_E
24-Ruby V
(To:Kanka)


 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.

 

-MFra-
21-Topaz II
(To:Werner_E)

Hallo Werneros.....

 

-MFra-
21-Topaz II
(To:Kanka)

...So it's more beautiful .....

kanka.jpg

-MFra-
21-Topaz II
(To:Kanka)

The following errors of Prime and mathcad 15 have been known for a long time:

errors.jpg

Top Tags