Spectrum Software
spacer
Industrial Strength Simulation
select:

divider

 

News:

Spectrum Software has released Micro-Cap 11, the eleventh generation of our SPICE circuit simulator.

For users of previous Micro-Cap versions, check out the new features available in the latest version. For those of you who are new to Micro-Cap, take our features tour to see what Micro-Cap has to offer.

 

divider

 

AC Analysis

 

I am plotting the output voltage of my amplifier in units of decibels. When I plot the expression:

20*log(V(Out))

I do not get the answer I would expect. When I plot the following expression:

dB(V(Out))

The simulation is exactly what I am looking for. Why is there a discrepancy between these two when they should be the same calculation?

 

The discrepancy between the two expressions lies in how they treat complex numbers which is how a voltage in AC analysis is stored internally in Micro-Cap. The dB operator will always calculate the magnitude of the variable it is working on before it performs its calculation. The expression:

dB(V(Out))

is functionally equivalent to:

dB(Mag(V(Out)))

However, the log operator will perform its calculation directly on the complex form of the variable. Only when the final value is plotted to the screen is the magnitude actually taken. In order to use the 20*log function to plot decibels, the Mag operator must also be included. The equivalent expression to the basic dB expression is:

20*log(Mag(V(Out)))

Almost all of the transcendental operators available in Micro-Cap perform complex mathematical operations so this is an issue to be aware of when using these operators in AC analysis.

 

 

 

 

Categories


AC Analysis
Analysis - General
DC Analysis
Dynamic DC
Incompatibilities
Initial Conditions
Miscellaneous
Models
Monte Carlo
Output
Probe
Schematic Editor
Stepping
Transient Analysis