Author Topic: Root Mean Square Circuit Design Advice  (Read 1541 times)

0 Members and 1 Guest are viewing this topic.

Offline instengTopic starter

  • Newbie
  • Posts: 3
  • Country: gb
Root Mean Square Circuit Design Advice
« on: December 14, 2019, 09:58:23 pm »
I have an assignment to design a root mean square circuit based on the design I have attached. This is my first attempt and it is more complicated than the basic circuits I have designed in the past. I am just looking for some advice on the design, things to consider, things to test and what types of operational amplifiers would be best suited to this circuit. The input signal is in the range 10 to 20 kHz, 1V p-p.

The first two stages form a precision rectifier circuit followed by the RMS circuit. U2A is a log squaring amplifier, U2B is an anti-log averaging circuit, U3B is an anti-log feedback amplifier.

I have created a PSPICE simulation to test my circuit using 1V p-p sine waves to keep things simple. I have included simulation results for 10 Hz and 20 kHz signals. I am expecting the output to be 0.707V which is the case for the 20 kHz signal but the 10 Hz signal oscillates with a frequency of about 20 Hz which I am struggling to explain. I have noticed there is some high frequency noise with the 20 kHz signal as well, I think this might be from Op-Amps. The 20 kHz output also drops below 0V for some reason I can't explain. I selected TL08x because the bias currents and offset voltages are low which I suppose is suited for this kind of circuit. +/-9V power supplies are within the assignment specification.

The transfer function of the RMS ciruit is Vout = SQRT(AVG(Vin^2) * R7*R8/R6^2). I assumed matched resistors would be necessary so the resistances cancel unless there is a more practical way to reduce the error introduced by resistance mismatches?
 

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: gb
Re: Root Mean Square Circuit Design Advice
« Reply #1 on: December 14, 2019, 10:24:18 pm »
The 20Hz is not an oscillation, it is ripple caused by an  insufficient time constant in your averaging stage.
10Hz full wave rectified  gives 20 Hz ripple, time constant of averaging stage (C1 R7) is 62mS so not very long compared with 20Hz (50mS).
To prove a point up C1 by a factor of 10 and see the effect on the ripple.

Jim
 
The following users thanked this post: insteng

Offline instengTopic starter

  • Newbie
  • Posts: 3
  • Country: gb
Re: Root Mean Square Circuit Design Advice
« Reply #2 on: December 14, 2019, 10:41:38 pm »
Thanks for the comment Jim. I ran the simulation as you suggested and the ripple magnitude was a lot smaller although the time constant increased as expected. It sounds like there is a trade off between ripple magnitude and time constant in this circuit?
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12299
  • Country: au
Re: Root Mean Square Circuit Design Advice
« Reply #3 on: December 14, 2019, 11:28:54 pm »
It sounds like there is a trade off between ripple magnitude and time constant in this circuit?
There is indeed.

To put it simply, ripple is the visible result of voltage fluctuations that are allowed according to the frequency and magnitude of the input waveform and the time constant of the smoothing circuit.  For simple passive smoothing, this translates into more capacitance = less ripple because of the longer time constant.

In other words, fast response is the exact characteristic which delivers more ripple.  I mean, how is a system able to distinguish between a fast changing waveform that you want to track and variations within a short time period that you want to average?

The answer is, as you have surmised: it is a trade-off ... unless you want to get a lot more exotic in your circuit.
 
The following users thanked this post: insteng

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2225
  • Country: mx
Re: Root Mean Square Circuit Design Advice
« Reply #4 on: December 14, 2019, 11:53:37 pm »
According to the book "Handbook of Operational Amplifier Circuit Design", Stout and Kaufmann, the transistors should be preferably be matched devices on a single chip, as opposed to employing discrete devices as you show in your circuit.

Fortunately several companies manufacture such devices. Nexperia is one of them. From their webpage:

https://www.nexperia.com/products/bipolar-transistors/general-purpose-bipolar-transistors/matched-pair-transistors/#/p=1,s=0,f=,c=,rpp=,fs=0,sc=,so=,es=
 
The following users thanked this post: insteng

Offline instengTopic starter

  • Newbie
  • Posts: 3
  • Country: gb
Re: Root Mean Square Circuit Design Advice
« Reply #5 on: December 15, 2019, 12:16:27 am »
Thanks for the comments. I have adjusted the time constant of the averaging op-amp to be more appropriate for the signals involved. This has also eliminated the issue with the output dropping below 0V but I'm still not sure what was causing that.

I will search for matched transistors in this case also instead of the generic BC548B's that I used. I guess this will make the circuit less sensitive to temperature changes as well. Is there anything else that can be done to improve temperature stability?
 

Offline harrimansat

  • Regular Contributor
  • *
  • Posts: 219
Re: Root Mean Square Circuit Design Advice
« Reply #6 on: August 16, 2022, 05:53:57 pm »
try with a CA3046 or equivalent
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1448
Re: Root Mean Square Circuit Design Advice
« Reply #7 on: August 17, 2022, 05:47:58 am »
Thanks for the comment Jim. I ran the simulation as you suggested and the ripple magnitude was a lot smaller although the time constant increased as expected. It sounds like there is a trade off between ripple magnitude and time constant in this circuit?

If you have a problem with the time constant and ripple you might get it better with a 2nd order filter.  That would have sharper cutoff and a somewhat lower time constant.  Could be as simple as adding an RC filter somewhere or may require another op amp.
« Last Edit: August 17, 2022, 07:57:30 pm by MrAl »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf