Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

calculating the average power of a signal?

Options
  • 02-09-2010 1:34pm
    #1
    Closed Accounts Posts: 7,134 ✭✭✭


    Guys,

    I have data from a signal extracted into excel from a scope and I am trying to get the average power/current of it over time.

    I am not sure if I am doing this right as the results are inconsistent. I got the average current over time x and used this for power.

    how is the best way to do this, do I need to use matlab/ discrete time signal formula.?


Comments

  • Registered Users Posts: 5,367 ✭✭✭DublinDilbert


    Guys,

    I have data from a signal extracted into excel from a scope and I am trying to get the average power/current of it over time.

    I am not sure if I am doing this right as the results are inconsistent. I got the average current over time x and used this for power.

    how is the best way to do this, do I need to use matlab/ discrete time signal formula.?

    When you say the results are in consistent, what do you mean?

    Can you post a graph of the current waveform?

    It's fairly common to measure the current going to a CPU with a scope, especially where the CPU goes to sleep for periods of time then wakes up.


  • Closed Accounts Posts: 7,134 ✭✭✭x in the city


    When you say the results are in consistent, what do you mean?

    Can you post a graph of the current waveform?

    It's fairly common to measure the current going to a CPU with a scope, especially where the CPU goes to sleep for periods of time then wakes up.

    I think its ok now, i must have used wrong measurements but they seem consistent now, as per graph.

    I am doing this for all the pre scaler frequencies btw


  • Moderators, Science, Health & Environment Moderators Posts: 1,846 Mod ✭✭✭✭Michael Collins


    In general for uniformly sampled discrete-time signals you can estimate the average power in the original signal by summing up the squares of the amplitudes of the current (or voltage) samples, then dividing by the total number of samples.

    e.g. take a unit amplitude sine wave, which we know has an average power of 0.5 W

    [latex] \displaystyle P = V_{\text{rms}}^2 [/latex] (assuming unit resistance as is usual)

    Now let's see what we get from the sampled version using the above method:

    [latex] \displaystyle f(t) = \sin(2 \pi t) [/latex]

    take eight uniform samples between 0 and 1 second
    i.e. samples spaced 0.125 seconds apart

    [latex] \displaystyle f(n) = \sin(2 \pi (0.125n)) [/latex]

    so these samples are

    [latex] \displaystyle f(0) = 0 [/latex]
    [latex] \displaystyle f(1) = 0.5\sqrt{2}[/latex]
    [latex] \displaystyle f(2) = 1 [/latex]
    [latex] \displaystyle f(3) = 0.5\sqrt{2}[/latex]
    [latex] \displaystyle f(4) = 0 [/latex]
    [latex] \displaystyle f(5) = -0.5\sqrt{2}[/latex]
    [latex] \displaystyle f(6) = -1 [/latex]
    [latex] \displaystyle f(7) = -0.5\sqrt{2}[/latex]

    squaring all these and then adding them all up we get 4
    dividing by the total number of samples 8, we get 4/8 = 0.5 W, as you'd expect.


  • Registered Users Posts: 12,961 ✭✭✭✭bnt


    One other little problem in that screenshot: when converting from mW to W, you should be dividing by 1000, not 100.

    Can I suggest that you clarify, for us, just which information is measured and which is calculated? You say you have data, but is that the voltage data? You "got" the current, but are you calculating it or measuring it?

    If you're calculating the current, then I assume you'll be using Ohm's law (I = V/R), which means that you have R, right? If so, is it a fixed resistance? (If this is a semiconductor circuit, that's not a valid assumption to make!)

    If you're measuring the current, then great, P = VI, and if you're taking the measurements when the circuit is in a steady state, you can multiply that power by the time period (in seconds) to get the energy usage over that time period, as discussed before. You say average current, meaning average over a time period: - it's up to you to ensure that that's over the correct time period, when the circuit is doing whatever it is you're trying to measure!

    I'm not trying to be difficult, it's just that we'll be better placed to help you if you are absolutely clear about what you want, what you're measuring, and what you're calculating. ;)

    From out there on the moon, international politics look so petty. You want to grab a politician by the scruff of the neck and drag him a quarter of a million miles out and say, ‘Look at that, you son of a bitch’.

    — Edgar Mitchell, Apollo 14 Astronaut



Advertisement