Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hello,
I am trying trying plot the I/V curve on the graph of the diode model, having as example from "Simulation on Mathcad the SPICE Model of the Diode Dmbr2045mfs.pdf" by Pedro Vitoriano.
an somebody help me?
Thank you.
Solved! Go to Solution.
@Bogdan_d wrote:
Hi,
As mention in older versions of MathCAD (MathCAD 15), from what I remember square bracket have been consider as simple brackets not matrix.
No, none of the older versions of real Mathcad allowed to type in square brackets to structure expressions.
But Mathcad 15 for example used square brackets to display nested expressions
but allowed only round parentheses to be typed in.
Typing in an opening square bracket would create a vector index - in Mathcad 15 even when typed in after an operation like a multiplication:
Typing 2*[ creates
Prime usually avoids square brackets when displaying nested expressions
and typing in 2*[ creates a matrix .
Concerning the plot you would have to use a log scale on the y-axis and manually type in 0.1 and 100 as lower and upper limit.
The result nonetheless does not match exactly the picture you posted. So either other input values were used or other formulas.
Here a pic from the version with units which I posted
or using a waterfall plot
Using square brackets in an expression " [ ]" causes Mathcad to define a matrix.
You should consider applying units.
I doubt this regarding brackets.
The brackets are not defined as matrix. Is a way for me to see between where I have closed them or not (old habit from old vs of MathCAD).
Nevertheless it doesn't work to change the brackets.
By the way I cannot open the file, I have MathCAD 9.
Hi
Besides the brackets, the scalar variable and function Id are the same?
Either use the Math | Style | Labels to define the appropriate definitions of variable and function to each instance of Id.
Or use different names for the variable and function.
Prime 9 enclosed.
Cheers
Terry
@Bogdan_d wrote:
I doubt this regarding brackets.
You may doubt it but Fred is absolutely right about it. That's the way Prime works - if you type a square bracket, Prime creates a matrix (as if you had typed Ctrl+M). You have to use the program as it is, not as you would like it to be 😉
You may be used to using square and curly brackets for structuring, but in Mathcad, please only use round brackets for this purpose. If you type square brackets, you automatically create a matrix, which is not what you want here.
1) So replace the square brackets by parenthesis (or omit them entirely, as is sometimes possible in your sheet).
BTW, is there any specific reason why you used "t1" as name for the formal function argument and not simply "t"? Anyway, the name of the formal argument can be freely chosen, I just was curious.
2) In you solve block you wrote IS(t), but IS is a constant scalar (0.0003) and not a function. I guess you meant Is(t).
3) For plotting its better to use range with smaller increments to get a smooth plot
4) For displaying values and possible further calculations with them you should not use ranges but rather vectors! See my comments concerning the creation of the vector in the attached sheet.
Prime 9 sheet attached
Hi,
As mention in older versions of MathCAD (MathCAD 15), from what I remember square bracket have been consider as simple brackets not matrix. OK understood this topic, different version, etc. I am not working daily in MathCAD, not even not monthly.
SPICE model for components are coming without dimension, my porpoise was to make it to work and then to add the units.
t1 no reason, was a copy from the original document mention above.
The final graph it should look like this or at least this was my end results looking for:
Nevertheless thank you for you response and help
@Bogdan_d wrote:
Hi,
As mention in older versions of MathCAD (MathCAD 15), from what I remember square bracket have been consider as simple brackets not matrix.
No, none of the older versions of real Mathcad allowed to type in square brackets to structure expressions.
But Mathcad 15 for example used square brackets to display nested expressions
but allowed only round parentheses to be typed in.
Typing in an opening square bracket would create a vector index - in Mathcad 15 even when typed in after an operation like a multiplication:
Typing 2*[ creates
Prime usually avoids square brackets when displaying nested expressions
and typing in 2*[ creates a matrix .
Concerning the plot you would have to use a log scale on the y-axis and manually type in 0.1 and 100 as lower and upper limit.
The result nonetheless does not match exactly the picture you posted. So either other input values were used or other formulas.
Here a pic from the version with units which I posted
or using a waterfall plot
Then I should understand that here this it was a matrix as in the original post?
@Bogdan_d wrote:
Then I should understand that here this it was a matrix as in the original post?
No! What the picture shows was (and has to be) typed in as normal round parentheses. similar to the example I posted, Mathacd 15 just shows the 'outer' pairs of parentheses as square brackets when it displays the expression. I guess this was implemented that way for better clearness and to highlight the structure of the expression. But it could be quite confusing and even worse, Mathcad 15 would sometimes show a matrix with round parentheses:
That way by simply looking at a printout it was hard to impossible to say which pair of parentheses or square brackets would denote a matrix. In the picture below I colored the matrix 'parentheses' in red. We can't distinguish the center two expressions, can't we?
In Prime (and Prime still lags far behind the old Mathcad in many respects in terms of quality and functionality) this is one of the few better implemented things as its more consequent and clear:
MathCAD 15, at least for me was in some cases more intuitive.
I have seen a lot of feature added in Prime, but also some taken out. For instance cursors on a kind of graph, but another type of graph if you want to see the lines for log scale, but without cursors.
Yes, some people will reply you can make a function. No, as engineer I don't have time tome for the science of formulas written in 10 ways, but applicability.
I do appreciate the explanations. Thank you.
I fully agree that Prime in sum is a step backwards compared to Mathcad, even though some details are better (like the creation of matrices and the ctrl-J feature in programming). Especially when it comes to plotting, a lot of useful things are missing.
The options for 3D plots are ridiculous and embarrassing, and those for 2D plots are not much better. The latter lacks axis labels, grid lines, a second y-axis, the option to select the size of the points/symbols independently of the line thickness, etc. And there are unnecessary restrictions on the number of points that can be displayed in a plot.
To compensate for the shortcomings of at least the 2D plots, PTC decided not to improve its own plots, but to purchase and implement third-party software. And unfortunately, that is the miscarriage we see in the program as "Chart Component". It is extremely poorly implemented, extremely slow to respond, tedious and cumbersome to use, does not take into account the set Windows zoom factor, cannot handle units, ...
But at least this component offers labels, grid lines, a secondary y-axis, and a few other things. Definitely not what Prime users would have wished for, though. BTW, the trace cursor you mention still is not available nor is a quick way to zoom in an out in a plot.
Nice, Thank you. I will follow in future this hint.
Apart from all other input:
You shouldn't need to define q and k.
The electron charge is a known constant in Prime:
Same for the Boltzmann constant:
You can find them in the 'Constants' panel.
But, using those you would need to use units for the other parameters as appropriate. Although that should not be a problem:
Your parameters would become:
XTI and N remain unitless.
Then:
and:
Success!
Luc
Added units in my sheet according to Luc's suggestion
Thank you for your explanations.
