Hi friends!
Originally I wrote about this idea for a Spanish electronics forum, but I think that this development may be considered here, then I translated the original to English and proudly share it with you. This is my first post, then I apologize for any idiomatic inconsistencies (I am not a grammar expert!), but I hope you can understand and enjoy it in some way.
In the analog world the common practice of rectifying and integrating an audio signal give us its average values, which related to music is not accurately representative of the real energy of the signal, especially in a musical material with a lot of dynamic range.
That is, in signals with a large Crest Factor, with little compression/limitation, or to comply with the audio leveling standards required by broadcast systems within the "Loudness control" regulations, the result is that the traditional and simple meters with average metering, are not very appropriate.
So, when you want to make an autonomous analog meter with LEDs bargraph, with discrete components, you would need to incorporate an RMS converter, expensive and not easy to get.
Another option would be to implement it with some microcontroller (MCU), this requires programming the algorithms by software and evaluate the calculus and processes that influences the response speed, you have to adjust many lines of code, and appreciate the bandwidth of the A/D converters, etc. Of course, a lot of interesting functions and features can be achieved, but ultimately it introduces you more into computer science than in the extraordinary analog electronics, in my way of seeing it.
I have the idea to develop a mixed device, using an MCU for the output and an analog processing for input. The best of both worlds.
So, at some point, some time ago when I did other studies, I wondered if some correction can be made over the average values to resemble (approximate) effective values, with some circuitry.
This may sound like a delirium, or nonsense. Of course, I would also think the same about it without having carried out analyses, calculations and measurements, but after a creative work I reached the conclusions that I present to you.
Well, let me to show what QuasiRMS is...
Difference between average and effective values from my point of view
What I want to show you is what I have discovered, that in audio the signals presented to a meter differ especially in their Crest Factor. Which is the difference between the effective value and the peak value. And because the average and effective values have different slopes, it makes a meter that evaluates the average value not performs as one that measures the effective value, when the Crest Factor varies.
Applying the method that I developed to generate signals with different Crest Factor (through pulsating sinusoidal signals), I obtained its slopes with the help of some calculations in Excel and of course the beloved Multisim.
Looking at Figure 1, that shows, in voltage, the slopes of the effective and average value, as function of the Crest Factor, and the Figure 2 that shows it in decibels. We can observe how the average value falls much faster than the effective one as the Crest Factor increases, which is when the music becomes "more percussive".

Figure 1: Peak, RMS and Average values as a function of Crest Factor

Figure 2: Comparison of Peak, RMS and Average values graphed in dB
This has been my starting point, thinking: can I somehow compensate a mean value meter shown in green in the graphs above, to approximate it to the effective value, shown in red, using the peak value? In a short way, the effective value is between the two.
So, not varying its amplitude (constant at 1V peak) but its duty cycle, the difference (in times of Duty Cycle) this tabulated is the following Table 1:
Table 1: Peak, RMS and Average values for different duty cycles.
Initially it occurred to me that I can add to the average value, a percentage of the peak value, in order to raise it to the effective value. But a direct sum does not give the correct curve.
Figure 3 shows what would result from adding part of the peak value to the average. It does not work well because the difference between average and RMS values decreases with the Crest Factor.
The orange curve shows that while it is resembling RMS value, it is not very accurate and needs to be improved.
So, what one could do is to adapt the peak value in a way for the necessary slope. Instead of the Peak value being a straight line, it should go down. It is what would be called a quasi-peak value, as a QPPM do. When the Crest Factor increases, its output decreases. As Figure 4 shows.
The calculations gave me that the Tau of the peak integrator should be about 8 times less than the average value. That is, for 100 ms on Average, it will be about 12 ms for the Qpeak.
Thus, adding to the Average a Qpeak voltage extracted from the peak value of the wave, would allow me to bring it more approximately to the real value, that is, to a quasi RMS or QRMS.
So much for the theory.
Practical development
The requirement could be drawn in a diagram with the blocks shown in Figure 5.
We start with the rectifier. This is a full-wave rectifier where I get the signal module. It can be implemented with different configurations, I chose one in particular but it is not critical, there are several topologies.
To obtain the average value, with the ballistics required for music, a final integration of 400 ms is used, giving a Tau of about 100 ms.
To extract the peak value an "ideal diode" is made, so that its output corresponds to the maximum excursion of the signal. As said, the integration will be 8 times less than the average value, giving about 12 ms of Tau.
The output adder is simply a buffer that adapts the impedances, so as not to load the adding node.
Now only remains to test it in the Multisim simulator and assemble a circuit that electronically represents what is proposed.
I note that I had to simulate an incremental pulse generator, as shown in Figure 6, necessary to generate the X axis of the graphs, so that the Crest Factor increases over time. I don't know if it's the best solution, but it gave me the signal I needed.
Implement it with this circuit:
Where XFG4 is the 2KHz sinusoidal oscillator for the pulse train. XFG3 is the ramp generator that sweeps from 0 to 5V, so that the comparator varies its output from zero to the maximum in PWM format, enabling or not the bidirectional key. So, each pulse corresponds to a sinusoidal burst, as see in the Figure 7.
For the average value integrator with a 100ms Tau, I used a 100k resistor and a 1uF capacitor. For the peak value with a Tau of 12ms, I used a resistance of 5k6 and a capacitor of .22uF.
The final values were obtained with some reciprocal influences that were not be contemplated in the theoretical development, so adjusting some components the final result confirmed the proposal, that you can approximate an RMS value from an average value!
Circuit developed for evaluation in the Multisim:
As a quick description of the circuit shown in Figure 8, you could note that additional components used for testing appear, such as the XFG1 oscillator and the XMM1 meter that are there to simulate the response to constant signals. As well as the potentiometer R11 to have a manual sweep replacing, in the input (+) of the comparator U3, the signal from the XFG3.
I also included an LTC1968, which is a real RMS converter, to have in the oscilloscope the RMS value that would be the objective to achieve.
XMM4 measures the value of the full-wave rectifier, composed of the U1A and U1B stages. The U1C stage forms the peak value detector. And U1D is the output buffer.
The components R4 and C2 (100k and 1uF) form the integrator of the Average value, repeated in R1 and C3 to have the Average value for the oscilloscope. R9 and C1 (5k6 and .22uF) form the integrator of the Peak value (Qpeak). R4 and R3 (100k and 220k) give the ratio of the Average to Peak values. Which as calculated, correspond to 2/3 and 1/3 respectively.
Viewing on the 4-channel oscilloscope XSC1 the different measured values, as shown in Figure 9. The top line in Yellow shows the "quasi-peak" or Qpeak value, which will be added to the mean value indicated in Blue. The Red line shows the RMS value obtained at the output of the LTC1968, and in Green the output of this circuit, which is the QRMS value.
It is undeniable the ripple that appears in the Yellow curve of the Qpeak, because the peak integrator has a very small Tau, but this is expected. However, it is minimized when is adding to the C2 integration capacitor, as shown in the resulting Green line.
It should be also noted that on the far right, the Red line falls below the Green one, this is because for values higher than a Crest Factor of 3, the manufacturer indicates that the LTC1968 increases its error. A limitation that this application obviously shows, and we see that this circuit does not have this behavior.
This is more noticeable in the graph obtained by measuring and tabulating the values in Excel, as shown in Figure 10.
The graph in Figure 10 clearly shows the performance of the proposed circuit. The blue line is the output of the LTC1968, which overlaps nicely with the dotted green line which corresponds to the true RMS value, but for Crest Factors more than 3 (time in sweep > 700 ms), it falls. The red line that corresponds to the QRMS output, although falls a little in the zone of Crest values of approximately 2 (500 ms), its output for values of more than 6 times (maximum analyzed at 950 ms) is better than the LTC. It may be good to clarify that in dB a Crest Factor of 2 times corresponds to 6 dB and 6 times is about 16 dB, a good range between the rms value and the peak value to simulate any type of music. And it follows that this circuit responds well even beyond these Crest Factors.
Conclusions
Based on the analysis of the signals and their behavior as a function of the Crest Factor, this circuit allow to implement an RMS weighting, using simple components to drive an indicator with LED bars, giving a very approximate response to the RMS value of a signal.
In the lab tests a little difference was found, but since the output of the bargraph display utilized in the tests uses discrete steps at 1 dB / LED, it could be said that the differences are acceptable.
Now, with 8 resistors, 2 capacitors, a TL074, and 3 diodes, we managed to simulate an RMS value coined as "QRMS". Simple, cheap and really effective!
I hope you will be encouraged to apply this solution to your meters and I am sure you will see a difference in dynamic performance, being much more representative for the loudness of the music with great dynamics than an average value metering.
I implemented this circuit in my "Proto 12", a Loudness meter of 30 LEDs, and I have evaluated it by a time showing that its performance is not far from those made with True RMS converters.
Until next madness folks!
Originally I wrote about this idea for a Spanish electronics forum, but I think that this development may be considered here, then I translated the original to English and proudly share it with you. This is my first post, then I apologize for any idiomatic inconsistencies (I am not a grammar expert!), but I hope you can understand and enjoy it in some way.
------------------------
In the analog world the common practice of rectifying and integrating an audio signal give us its average values, which related to music is not accurately representative of the real energy of the signal, especially in a musical material with a lot of dynamic range.
That is, in signals with a large Crest Factor, with little compression/limitation, or to comply with the audio leveling standards required by broadcast systems within the "Loudness control" regulations, the result is that the traditional and simple meters with average metering, are not very appropriate.
So, when you want to make an autonomous analog meter with LEDs bargraph, with discrete components, you would need to incorporate an RMS converter, expensive and not easy to get.
Another option would be to implement it with some microcontroller (MCU), this requires programming the algorithms by software and evaluate the calculus and processes that influences the response speed, you have to adjust many lines of code, and appreciate the bandwidth of the A/D converters, etc. Of course, a lot of interesting functions and features can be achieved, but ultimately it introduces you more into computer science than in the extraordinary analog electronics, in my way of seeing it.
I have the idea to develop a mixed device, using an MCU for the output and an analog processing for input. The best of both worlds.
So, at some point, some time ago when I did other studies, I wondered if some correction can be made over the average values to resemble (approximate) effective values, with some circuitry.
This may sound like a delirium, or nonsense. Of course, I would also think the same about it without having carried out analyses, calculations and measurements, but after a creative work I reached the conclusions that I present to you.
Well, let me to show what QuasiRMS is...
Difference between average and effective values from my point of view
What I want to show you is what I have discovered, that in audio the signals presented to a meter differ especially in their Crest Factor. Which is the difference between the effective value and the peak value. And because the average and effective values have different slopes, it makes a meter that evaluates the average value not performs as one that measures the effective value, when the Crest Factor varies.
Applying the method that I developed to generate signals with different Crest Factor (through pulsating sinusoidal signals), I obtained its slopes with the help of some calculations in Excel and of course the beloved Multisim.
Looking at Figure 1, that shows, in voltage, the slopes of the effective and average value, as function of the Crest Factor, and the Figure 2 that shows it in decibels. We can observe how the average value falls much faster than the effective one as the Crest Factor increases, which is when the music becomes "more percussive".

Figure 1: Peak, RMS and Average values as a function of Crest Factor

Figure 2: Comparison of Peak, RMS and Average values graphed in dB
This has been my starting point, thinking: can I somehow compensate a mean value meter shown in green in the graphs above, to approximate it to the effective value, shown in red, using the peak value? In a short way, the effective value is between the two.
So, not varying its amplitude (constant at 1V peak) but its duty cycle, the difference (in times of Duty Cycle) this tabulated is the following Table 1:
Duty cycle Relation | Crest Factor | Volts RMS | Volts average |
1 | 1.414 | 0.707 | 0.637 |
1/2 | 2.000 | 0.500 | 0.318 |
1/3 | 2.449 | 0.408 | 0.212 |
1/4 | 2.828 | 0.354 | 0.159 |
1/5 | 3.162 | 0.316 | 0.127 |
1/6 | 3.464 | 0.289 | 0.106 |
1/7 | 3.742 | 0.267 | 0.091 |
1/8 | 4.000 | 0.250 | 0.080 |
1/9 | 4.243 | 0.236 | 0.071 |
1/10 | 4.472 | 0.224 | 0.064 |
1/11 | 4.690 | 0.213 | 0.058 |
1/12 | 4.899 | 0.204 | 0.053 |
1/13 | 5.099 | 0.196 | 0.049 |
1/14 | 5.292 | 0.189 | 0.045 |
1/15 | 5.477 | 0.183 | 0.042 |
1/16 | 5.657 | 0.177 | 0.040 |
1/17 | 5.831 | 0.171 | 0.037 |
1/18 | 6.000 | 0.167 | 0.035 |
1/19 | 6.164 | 0.162 | 0.034 |
1/20 | 6.325 | 0.158 | 0.032 |
Table 1: Peak, RMS and Average values for different duty cycles.
Initially it occurred to me that I can add to the average value, a percentage of the peak value, in order to raise it to the effective value. But a direct sum does not give the correct curve.
Figure 3 shows what would result from adding part of the peak value to the average. It does not work well because the difference between average and RMS values decreases with the Crest Factor.
The orange curve shows that while it is resembling RMS value, it is not very accurate and needs to be improved.
So, what one could do is to adapt the peak value in a way for the necessary slope. Instead of the Peak value being a straight line, it should go down. It is what would be called a quasi-peak value, as a QPPM do. When the Crest Factor increases, its output decreases. As Figure 4 shows.
The calculations gave me that the Tau of the peak integrator should be about 8 times less than the average value. That is, for 100 ms on Average, it will be about 12 ms for the Qpeak.
Thus, adding to the Average a Qpeak voltage extracted from the peak value of the wave, would allow me to bring it more approximately to the real value, that is, to a quasi RMS or QRMS.
So much for the theory.
Practical development
The requirement could be drawn in a diagram with the blocks shown in Figure 5.
We start with the rectifier. This is a full-wave rectifier where I get the signal module. It can be implemented with different configurations, I chose one in particular but it is not critical, there are several topologies.
To obtain the average value, with the ballistics required for music, a final integration of 400 ms is used, giving a Tau of about 100 ms.
To extract the peak value an "ideal diode" is made, so that its output corresponds to the maximum excursion of the signal. As said, the integration will be 8 times less than the average value, giving about 12 ms of Tau.
The output adder is simply a buffer that adapts the impedances, so as not to load the adding node.
Now only remains to test it in the Multisim simulator and assemble a circuit that electronically represents what is proposed.
I note that I had to simulate an incremental pulse generator, as shown in Figure 6, necessary to generate the X axis of the graphs, so that the Crest Factor increases over time. I don't know if it's the best solution, but it gave me the signal I needed.
Implement it with this circuit:
Where XFG4 is the 2KHz sinusoidal oscillator for the pulse train. XFG3 is the ramp generator that sweeps from 0 to 5V, so that the comparator varies its output from zero to the maximum in PWM format, enabling or not the bidirectional key. So, each pulse corresponds to a sinusoidal burst, as see in the Figure 7.
For the average value integrator with a 100ms Tau, I used a 100k resistor and a 1uF capacitor. For the peak value with a Tau of 12ms, I used a resistance of 5k6 and a capacitor of .22uF.
The final values were obtained with some reciprocal influences that were not be contemplated in the theoretical development, so adjusting some components the final result confirmed the proposal, that you can approximate an RMS value from an average value!
Circuit developed for evaluation in the Multisim:
As a quick description of the circuit shown in Figure 8, you could note that additional components used for testing appear, such as the XFG1 oscillator and the XMM1 meter that are there to simulate the response to constant signals. As well as the potentiometer R11 to have a manual sweep replacing, in the input (+) of the comparator U3, the signal from the XFG3.
I also included an LTC1968, which is a real RMS converter, to have in the oscilloscope the RMS value that would be the objective to achieve.
XMM4 measures the value of the full-wave rectifier, composed of the U1A and U1B stages. The U1C stage forms the peak value detector. And U1D is the output buffer.
The components R4 and C2 (100k and 1uF) form the integrator of the Average value, repeated in R1 and C3 to have the Average value for the oscilloscope. R9 and C1 (5k6 and .22uF) form the integrator of the Peak value (Qpeak). R4 and R3 (100k and 220k) give the ratio of the Average to Peak values. Which as calculated, correspond to 2/3 and 1/3 respectively.
Viewing on the 4-channel oscilloscope XSC1 the different measured values, as shown in Figure 9. The top line in Yellow shows the "quasi-peak" or Qpeak value, which will be added to the mean value indicated in Blue. The Red line shows the RMS value obtained at the output of the LTC1968, and in Green the output of this circuit, which is the QRMS value.
It is undeniable the ripple that appears in the Yellow curve of the Qpeak, because the peak integrator has a very small Tau, but this is expected. However, it is minimized when is adding to the C2 integration capacitor, as shown in the resulting Green line.
It should be also noted that on the far right, the Red line falls below the Green one, this is because for values higher than a Crest Factor of 3, the manufacturer indicates that the LTC1968 increases its error. A limitation that this application obviously shows, and we see that this circuit does not have this behavior.
This is more noticeable in the graph obtained by measuring and tabulating the values in Excel, as shown in Figure 10.
The graph in Figure 10 clearly shows the performance of the proposed circuit. The blue line is the output of the LTC1968, which overlaps nicely with the dotted green line which corresponds to the true RMS value, but for Crest Factors more than 3 (time in sweep > 700 ms), it falls. The red line that corresponds to the QRMS output, although falls a little in the zone of Crest values of approximately 2 (500 ms), its output for values of more than 6 times (maximum analyzed at 950 ms) is better than the LTC. It may be good to clarify that in dB a Crest Factor of 2 times corresponds to 6 dB and 6 times is about 16 dB, a good range between the rms value and the peak value to simulate any type of music. And it follows that this circuit responds well even beyond these Crest Factors.
Conclusions
Based on the analysis of the signals and their behavior as a function of the Crest Factor, this circuit allow to implement an RMS weighting, using simple components to drive an indicator with LED bars, giving a very approximate response to the RMS value of a signal.
In the lab tests a little difference was found, but since the output of the bargraph display utilized in the tests uses discrete steps at 1 dB / LED, it could be said that the differences are acceptable.
Now, with 8 resistors, 2 capacitors, a TL074, and 3 diodes, we managed to simulate an RMS value coined as "QRMS". Simple, cheap and really effective!
I hope you will be encouraged to apply this solution to your meters and I am sure you will see a difference in dynamic performance, being much more representative for the loudness of the music with great dynamics than an average value metering.
I implemented this circuit in my "Proto 12", a Loudness meter of 30 LEDs, and I have evaluated it by a time showing that its performance is not far from those made with True RMS converters.
Until next madness folks!