Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I am trying to simulate RC Circuit with Pulsed Input. I am getting small notch at the transition, Which goes away at high tau values.
I am new to mathcad,Please provide insights.
Regards,
Shiv
Solved! Go to Solution.
It may help to set the step size of Odesolve, using the extra parameter to the Odesolve function.
If that works, I think that is a better way than to strip off data...
Success!
Luc
Odesolve uses a numeric approximation algorithm where the output value at every next time step is calculated on the basis of previous output values and the input. Now your input is an ideal square wave, so it jumps instantaneously. This may cause an overshoot in the next time value. This overshoot will be damped as the tau value increases.
Success!
Luc
What do you recommend to remove this overshoot. Some hint would be enough.
Thanks for the help.
It may help to set the step size of Odesolve, using the extra parameter to the Odesolve function.
If that works, I think that is a better way than to strip off data...
Success!
Luc
Thanks for the help.
First of all let me say that in Prime (on contrary to Mathcad 15 and below) you are allowed to use units in a solve block with "odesolve". Therefore its not necessary to strip the units as you did. See screenshot and attached Prime 6 worksheet.
I don't think that you can get rid of those overshoots which stem from the numeric methods used (unfortunately Prime is not able to solve an ODE symbolically).
You can use some cheats to avoid those overshoots showing in the plot, though.
1) You may setup a larger step width in your range for t. You'll have to experiment which value fits best. The drawback is that the vertical lines are not vertical but have a slight visible slope now and that you get rounded corners.
2) You may define a function (I called it x2) based on the results of the solve block function which simply cuts off those overshoots.
Luc is perfectly right with his suggestion to increase the step width in "odesolve". In case you don't know - its an optional fourth argument of "odesolve". The default value is 10^3.
Yeah, I also Tried it. Thanks for the help.