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.
Measuring Crest Factor
The crest factor measurement, also known as the peak-to-RMS-ratio or peak factor, provides a method to measure the quality of a signal. It is a ratio
of the peak value of a waveform to the RMS value of the same waveform. It is used in a variety of engineering areas such as determining the quality of an
AC power waveform, determining the headroom in an audio system, and measuring how much impacting is occurring in a mechanical system.
The crest factor can be calculated easily in Micro-Cap by using the performance functions. While there is not a single performance function that will measure
the crest factor directly, an expression that consists of the High_Y and RMS performance functions can make the calculation. The following performance function
expression returns the crest factor:
where Expr is the waveform that the measurement is being made on. The High_Y performance function returns the maximum value of the specified waveform which
provides the peak value. The RMS performance function returns the RMS value of the specified waveform over the requested interval. In this case, the RMS is
operating over the entire transient simulation due to the use of the keywords TSTART and TMAX for the range.
This crest factor expression can be used within performance tags, analysis text, performance plots, and 3D plots. Performance plots and 3D plots are only
available if stepping is used. For a single waveform, either the performance tag or the analysis text needs to be used.
To test this expression, a simple circuit has been created. Two voltage source components are in the schematic. One creates an ideal triangle waveform at a
node called Triangle. The other voltage source component produces an ideal sine waveform at a node called Sine.
For this example, the crest factor measurement will be calculated within analysis text. The analysis text provides the capability to include the output of an
expression within a text string. To include an expression when placing text into an analysis plot, enable the Formula option that is in the Text page of the
Analysis Text dialog box. The delimiter field specifies the delimiters that will be used in order to declare the portion of the text string that is to be used
as a formula. The default delimiters are the square brackets, [ ]. For example, the following string would be entered to calculate the crest factor for the
The text displayed in the plot would combine the text string outside of the delimiters with the value calculated from the expression such as:
Crest Factor = 1.732
Each time an analysis is run, the formula within the analysis text will be recalculated and the text display will be updated.
The analysis in the figure below shows the transient simulation results with the triangle and sine waveforms being run over a single period. Each
waveform has two crest factor measurements in its plot. The crest factor is displayed in both its standard ratio value and its value in decibels. The
analysis text used in the triangle waveform plot is:
As can be seen in the figure, the crest factor calculations in the plot match exactly with the theoretical values for the types of waveforms
simulated. The triangle waveform has a crest factor of 1.732 (4.771dB), and the sine waveform has a crest factor of 1.414 (3.01dB).