Skip to main content
added 240 characters in body
Source Link
Olin Lathrop
  • 315.1k
  • 36
  • 441
  • 928

What you seem to be asking about is to determine the AC component that is on top of the DC average. There are various ways algorithmically to do this.

The conceptually obvious way is to find the DC average, subtract that from every value, then find the RMS of the result. Algorithmically it may be simpler to compute the average and RMS together, then subtract the two to get some measure of the AC component.

For example, let's say we have samples 8, 9, 9, 10, 11, 11, 12. The average is obviously 10. The AC component is then -2, -1, -1, 0, 1, 1, 2. The RMS of that is 1.31.

To compute the RMS, square all the values:
4, 1, 1, 0, 1, 1, 4
Then find the average of these.86 That's the total divided by the number of values. 12 / 7 = 1.714. The square root of that is the RMS value. Sqrt(1.714) = 1.31.

Now taking the same samples and computing the RMS directly yields 10.09. The difference from that to the average is 0.09. This isn't the RMS (it's actually related to the standard deviation) of the AC component, but can still be useful measure of "how much the signal is bouncing around".

What you seem to be asking about is to determine the AC component that is on top of the DC average. There are various ways algorithmically to do this.

The conceptually obvious way is to find the DC average, subtract that from every value, then find the RMS of the result. Algorithmically it may be simpler to compute the average and RMS together, then subtract the two to get some measure of the AC component.

For example, let's say we have samples 8, 9, 9, 10, 11, 11, 12. The average is obviously 10. The AC component is then -2, -1, -1, 0, 1, 1, 2. The RMS of that is 0.86.

Now taking the same samples and computing the RMS directly yields 10.09. The difference from that to the average is 0.09. This isn't the RMS (it's actually the standard deviation) of the AC component, but can still be useful measure of "how much the signal is bouncing around".

What you seem to be asking about is to determine the AC component that is on top of the DC average. There are various ways algorithmically to do this.

The conceptually obvious way is to find the DC average, subtract that from every value, then find the RMS of the result. Algorithmically it may be simpler to compute the average and RMS together, then subtract the two to get some measure of the AC component.

For example, let's say we have samples 8, 9, 9, 10, 11, 11, 12. The average is obviously 10. The AC component is then -2, -1, -1, 0, 1, 1, 2. The RMS of that is 1.31.

To compute the RMS, square all the values:
4, 1, 1, 0, 1, 1, 4
Then find the average of these. That's the total divided by the number of values. 12 / 7 = 1.714. The square root of that is the RMS value. Sqrt(1.714) = 1.31.

Now taking the same samples and computing the RMS directly yields 10.09. The difference from that to the average is 0.09. This isn't the RMS (it's actually related to the standard deviation) of the AC component, but can still be useful measure of "how much the signal is bouncing around".

Source Link
Olin Lathrop
  • 315.1k
  • 36
  • 441
  • 928

What you seem to be asking about is to determine the AC component that is on top of the DC average. There are various ways algorithmically to do this.

The conceptually obvious way is to find the DC average, subtract that from every value, then find the RMS of the result. Algorithmically it may be simpler to compute the average and RMS together, then subtract the two to get some measure of the AC component.

For example, let's say we have samples 8, 9, 9, 10, 11, 11, 12. The average is obviously 10. The AC component is then -2, -1, -1, 0, 1, 1, 2. The RMS of that is 0.86.

Now taking the same samples and computing the RMS directly yields 10.09. The difference from that to the average is 0.09. This isn't the RMS (it's actually the standard deviation) of the AC component, but can still be useful measure of "how much the signal is bouncing around".