I am using Mathcad Prime 3.0 and I am trying to plot a bode diagram of a transfer function of a transimpedance amplifer. Moreover, I would like to display the gain of the transfer function in dB. However, when I try to calculate the gain in dB Mathcad is giving me an error saying "units do not match". As an attachment you can find my worksheet. Does anybody know the reason?
Your transfer function returns a quantity with units of Ohms. That obviously should not be the case, and you get the error regarding units because you can't take the log of a quantity with units.
So the solution is to just divide the argument of the Log function by 1 Ohm. After that it will plot, and when you've changed the x-axis to logarithmic you can easily see that the frequency characteristic falls off at around 20 Hz.
You need to do the same for the arguments of Im and Re in de phase determination.
When I use functions that can't handle units (such as log), I like to use the SIUnitsOf() function. This way, I don't have any problem with units, whatever the input unit is.
Example : f(x) := log(x / SIUnitsOf(x))