How to calculate power in specific frequency band

Hi Everyone. I have been trolling on here for months but this is my first post so I hope I am putting this in the correct place.
What I am trying to do is simple in theory but I have tried over and over and am having no luck in getting this to work. I wish to calculate the power in specific frequency bands for heart rate variability analysis.
Referring to the article "Using LabVIEW for Heart Rate Variability Analysis"  http://zone.ni.com/devzone/cda/epd/p/id/5832 I am aware of the steps I need to follow.
I have plotted the RR intervals and resampled these with cubic spline interpolation to give a nice time dependent series. I then wire this to a PSD VI and this is where I am out of my depth.
I know from the above article that I am looking for power in these frequency bands
VLF  
ms2
Power from 0–0.04 Hz.
LF  
ms2
Power from 0.04–0.15 Hz.
HF
ms2
Power from 0.15–0.4 Hz.
The NI Biomedical Startup kit can do these, however I am unable to look into the source code as I do not have some required plugins in my installation. I have LabVIEW 8.6 full development system.
As this is not my area there is a steep learning curve and I have read many forum posts and pages but am still unsure of what I need to do here.
It is my understanding that the frequency resolution is simply the sample rate/number of samples. So if I require a resolution of 0.01Hz then theoretically 100Hz sample rate and 10,000samples would give me this.Furthermore I gather that the size of the output array from the PSD VI is equal to the # of data points (This i have just noticed from trial and error so I may be wrong).
Therefore if I am using the above values then is it correct that PSD would return an array and all I need to do is simply sum the contents of those array elements to get the power?
For example if frequency resolution is 0.01 , then to get power from 0-0.04Hz I must simply add the first 4 elements in the PSD output array?
I have made a test VI to show what I am talking about and attached it to this post.
Some feedback on the required approach would be a lifesaver here. I have purchased a couple of books and read through pages of forum posts but am still having trouble with this.
Many thanks!
Attachments:
labviewhelp.jpg ‏53 KB

Sorry about that, I didn't realize you wanted to run the code too The VI was doing a bunch of other stuff so I have tried to clean that out and just leave the relevant bit. As mentioned above, the case block executes when a peak is detected in the data and appends this value to an array.
I am using the technique of resampling the data because this is what was mentioned in this http://zone.ni.com/devzone/cda/epd/p/id/5832 and also in another reference that I have been following titled "Heart Rate Variability Standards of Measurement, Physiological Interpretation, and Clinical Use" http://circ.ahajournals.org/cgi/content/full/93/5/1043 which states
"The spectrum of the HRV signal is generally calculated eitherfrom the RR interval tachogram (RR durations versus number ofprogressive beats; see Fig 5a,b) or by interpolating the DES,thus obtaining a continuous signal as a function of time, orby calculating the spectrum of the counts–unitary pulsesas a function of time corresponding to each recognized QRS complex.35Such a choice may have implications on the morphology, themeasurement units of the spectra, and the measurement of therelevant spectral parameters. To standardize the methods used,the use of RR interval tachogram with the parametric method,or the use of the regularly sampled interpolation of DES withthe nonparametric method may be suggested; nevertheless, regularlysampled interpolation of DES is also suitable for parametricmethods. The sampling frequency of interpolation of DES mustbe sufficiently high that the Nyquist frequency of the spectrumis not within the frequency range of interest."
Attachments:
Exp-PulseOximeter.vi ‏205 KB

Similar Messages

  • How to calculate power of 10 on a FPGA vi??

    Hi everyone, I have a question about the FPGA functions.  One can use scale by power of 2. But there is no possibility to use power of ten. I also installed the Fixed-Point Math library where one can choose the natural logarithmic but not logarithmic of 10. Has someone an idea how to do this very fast??
    Regards, Irina

    Hi Irina,
    The Scale by Power of 2 just multiplies x by 2n, but I think what you are asking for here is something analogous to the Square function (x2), where you need x10?
    There are a number of possible approaches, but there is a fundamental limitation with fixed-point types that they aren't good at representing large dynamic ranges (ie, it takes a lot of bits to be able to represent very large and very small numbers in the same wire). With a power of 10, any inputs that are significantly different than 1 will give you very large or small numbers, so you'll need to have a very restricted input range to make this work, or use an alternate representation such as a logarithmic number system (LNS).
    That said, one idea is to take the equation y = x10 and apply a natural log and exponential to both sides, giving y = e10 ln(x). This can be accomplished with the Fixed-Point Math library functions, but there are restrictions on the range of x that you'll have to deal with.
    Other approaches include using a look-up table, computing directly via multiplication, doing the operation in floating-point or LNS (via 3rd party IP), or moving that portion of the computation to the host. There are often ways of re-posing the problem for an FPGA implementation, so if you can provide more details of what your application needs to do, we might be able to come up with a more efficient way to get this part done.
    Jim

  • How to calculate HASH_VALUE for Specific SQL

    I have an auditing trigger and want to filter out known statements.
    I can, from within the trigger, obtain the SQL that fired the trigger (dbms_standard.sql_txt function).
    I want to be able to calculate the HASH_VALUE for this SQL to use in a decision tree.
    If I have auditing enabled (I do) I can use the audsid {sys_context('USERENV','SESSIONID')} to lookup my SID and from there peruse several V$ views. This seems rather cumbersome.
    Does anyone know of a built-in function to either calculate the HASH_VALUE, when given SQL_TEXT or to return the HASH_VALUE for the firing SQL statement?
    Thanks

    Hi,
    SQL> select count(1) from user_tables;
      COUNT(1)
         21805
    SQL> select hash_value,sql_text
      2  from v$sqlarea
      3  WHERE sql_text LIKE 'select count(1) from user_tables%';
    HASH_VALUE
    SQL_TEXT
    2802460921
    select count(1) from user_tables
    SQL> Nicolas.

  • How to calculate IO on SQL Query.

    Hi all,
    Could u please tell me how to calculate IO for specific SQL Query.
    Regards,
    Santosh.

    In what context you are looking the IO consumed for the query? One option you have got is Autotrace,another can be tracing the query and formatting the results using Tkprof.
    Aman....

  • How to calculate the frequency of the search string in a row

    Hi,
    I would like to find the frequency of the number of the occurences of a search string in a row which is of type of xmltype content.
    For ex: I would like to find the frequency of the word "oracle" in a row which is of type xmltype content.
    Is there any fuction called frequency or freq...
    Thanks in advance....

    Oh!
    Then How to calculate the frequency of occurences in a row ?
    I hope the Score formula is S=3f(1+log(N/n))
    I want to calculate the f value alone, how is it possible.
    Thanks in advance.....

  • How to calculate no.of records for a specific company Code and Transaction

    Hi All,
    Could you please help me how to calculate or count no.of records, in a table which are having a specific Company Code and Transaction Code and populate  in an output table displaying that these many records are present for this company code and Transaction code.
    The table is having the data like this:
    LOB   TRAN CODE    COUNT
    X1                             1   
    X1                              2   
    X1                              3   
    X1                              4   
    F1   NB                      5   
    F1   NB                     6   
    F1   NB                     7   
    F1   NB                    8   
    F1   NB                    9   
    F1   NB                    10  
    F1   NB                    11  
    F1   NB                    12  
    F1   NB                     13  
    F1   NB                     14  
    F1   NB                     15  
    F1   NB                     16  
    F1   NB                     17  
    F1   NB                     18
    F1   NB                    19  
    F1   NB                    20  
    F1   NB                   21  
    F1   NB                   22  
    F1   NB                   23  
    F1                          24  
    F1                         25  
    F1                         26  
    F1                         27  
        In the above table there are totally 27 records,where as the no.of records with F1 as company code and NB as transaction code are 18..so i have to display like F1 NB and 18 as one record as output.
    Thanks and Regards,
    Johny

    You can go for Control Breaks for your requirement.
    First sort the internal table by company code and transaction. Declare a counter variable.
    Now loop the internal table and increment the counter variable. within the loop use AT END OF tcode.......ENDAT. Within the control break append the counter variable as well as the company code and tcode to some other ITAB and clear the counter.
    This will give you the total number of records for a combination of co code and tcodes.
    This will be a good reference for your requirement. What I am doing here is, for each Vendor i am calculating total number of deliveries and amounts for that vendor. For every new vendor i am writing the ouput on to a list and clearing the counter variables.
      LOOP AT t_vend_prod_grp INTO fs_vend_prod_grp.
        w_total_delv = w_total_delv + 1.
        w_total_amt = w_total_amt + fs_vend_prod_grp-dmbtr.
        AT NEW matkl.
          w_mat_grp = fs_vend_prod_grp-matkl.
    * To display the material group and the header texts for the data
    * grouped by material group and vendor.
          SKIP 1.
          WRITE:  text-mtk  COLOR COL_HEADING
                                  INTENSIFIED,
                / w_mat_grp COLOR COL_NORMAL
                                  INTENSIFIED OFF.
          SKIP 1.
          FORMAT COLOR COL_HEADING ON INTENSIFIED.
          ULINE  1(54).
          WRITE:/ sy-vline,
                2 text-ven,
               12 sy-vline,
                  text-dlv,
               26 sy-vline,
               38 text-amt,
                  sy-vline,
               46 text-cur,
               54 sy-vline.
          ULINE /1(54).
          FORMAT COLOR COL_HEADING OFF INTENSIFIED.
        ENDAT.                             " AT NEW MATKL
        AT END OF lifnr.
    * To display the actual data for the grouping based on Material group
    * and Vendor.
          FORMAT COLOR COL_NORMAL ON INTENSIFIED OFF.
          WRITE: / sy-vline,
                 2 fs_vend_prod_grp-lifnr COLOR COL_KEY,
                12 sy-vline,
                   w_total_delv,
                26 sy-vline,
                   w_total_amt CURRENCY text-usd,
                   sy-vline,
                46 text-usd,
                54 sy-vline.
          FORMAT COLOR COL_NORMAL OFF INTENSIFIED OFF.
          CLEAR: w_total_amt,
                 w_total_delv.
        ENDAT.                             " AT END OF LIFNR
      ENDLOOP.                             " LOOP AT T_VEND_PROD_GRP

  • How do you calculate the instantane​ous frequency of a signal in LabView?

    I'm working with neural signals that can be described as a nonlinear series of action potentials.  I've already calculated the spike density function (spikes per second against time) and was wondering if this is the instantaneous frequency?  If not, could someone please describe how to calculate instantaneous frequency in LabView without the advanced signal processing toolkit.

    Instantaneous frequency is a term which seems to be context-sensitive.  In other words the definition can vary depending upon the application.
    Spikes per second would be more of an average frequency (averaged over one second).
    For your neural signals I would think that an instantaneous frequency would be defined as the reciprocal of the time between successive spikes.  Since you can count spikes, you should be able to determine the time of each spike.
    Lynn 

  • How to perform power spectra analysis in DIAdem

    Dear all:
    I am a beginner in DIAdem but I have to complete my PhD thesis that is about the
    analysis of rat EEG in DIAdem. I have acquired 10G data of rat EEG. I prefer the
    power spectra method. Would someone please tell me:
    1. How to perform power spectra analysis of multichannel EEG(8 channels) in
    DIAdem? I hope the unit of the vertical axis is microV^2, but not dB ,nor
    10*log10(microV^2/Hz).
    2. How to calculate the absolute power and the relative power of EEG at a certain
    frequency band in DIAdem? Is it possible to do it in DIAdem?
    Thank you very much
    Jing
    [email protected]

    Hello,
    It looks like you posted this question on a different thread. Please refer to this thread Duplicate Post for information about your question.
    Regards,
    Kevin L.
    Applications Engineer
    National Instruments

  • OK, what is the best way to lower specific frequencies in edit view

    Listen guys, yes I do happen to know about "frequencies" and that you can't fully remove an instrument without effecting another in that same file that plays at the same time, this is pretty basic stuff.
    However, partially removing frequencies is one of the main things AA3 is intended for: "editing" the sound is it's main function.
    There must be some better answers out there about the best way of going about this in AA3.
    Do people use the spectral analysis with the different colors representing different frequencies? I have no idea how to use this.
    Do most people not get into this type of stuff?  I don't get it, seems like this is what the program was designed for (partially) so there must be more techniques out there.

    As mentioned, using the Graphic EQ or Parametric EQs, are the most common tools to adjust the energy around specific frequencies.
    The Graphic EQ provides between 10-30 bands and uses fixed values and widths.  (A slider for 1000 Hz will adjust the sound around 1000 Hz +/- a few hundred Hz in both directions.)
    The Parametric EQ offers fewer bands, but allows for greater control over the frequencies being adjusted and the affect on surrounding frequencies.
    The Notch Filter allows very tight, specific adjustments and is best used for removing artifacts like a 50/60Hz hum or high-pitched buzz.
    Spectral Frequency View makes it easy to see the frequency patterns and find precise frequencies of problem audio.  The editing tools allow you to perform many of the same functions mentioned, but visually in a paint-style application.  The frequency range of the file is displayed vertically, with 1Hz at the bottom and 22KHz (for a 44.1K file) at the top.  Each column represents a particular slice of time and displays the energy level of each frequency band via brightness and color.  The brighter a particular blob is, the louder that frequency range is at that particular point in time.
    There are other spectral views that give different viewpoints of your audio.  For example, the Spectral Pan Display shows a sort of birds-eye view of the audio's stereo-field.  Instruments that are panned further to the left, for example, will display brighter blobs on the left.  Using the selection tools, you can isolate these sounds from the rest of the stereo field and remove, copy, or add effects to the selection without affecting the rest of the audio.

  • SCB68 how to calculate the correct resistor

    Hi,
    sorry I am a new NI user.
    I didn't understand how to calculate the correct resistor to apply in scb68 in order to obtain a differential signal.
    My application requires an acquisition of a differential voltage channel of 0-5V.
    Can I use the ach+ and ach- channels without change anything on scb68?
    if no, how can I find correct settings?
    I read on scb68 manual page 5-2 "Conditioning Analog Input Channels" but I didn't understand wot to do.
    thank you
    Sarah

    Hi,
    Last question first; the cable impedance is at higher frequencies. So with you (almost) DC application don't worry about this cable impedance.
    I would choose resistors of 100k as the lowest value as bias resistors.
    You mentioned the power consumption of your sensor (transmitter ?) Does this mean that the sensor is powered through the same lines ?
    I don't know how you want to 'cascade' your sensors depends on your sensors. Normally you measure each sensor with a different input.
    Can you post (or link to) the datasheet of the sensor ?
    Message Edited by K C on 12-12-2007 10:44 AM

  • How to calculate the quota base quantity in quota arrangement?

    Hi all,
    As we all know, when a new supplier is added in the quota arrangment, we take the help of quota base qunatity so that the new supplier does not get any unfair advantage over the existing suppliers. Would you please help me on how to calculate the quota base quantity or on what basis the quota base quantity is calculated?*
    Regards,
    Ranjan

    Dear,
    Quota arrangement divides the total requirements generated over a period of time among the sources of supplied by assigning a quota.
    Quota u2013 quota is equal to a number and its represents the proportionate of requirements. Total quota of all the vendors is equal to 100% of requirements.
    This quota arrangement is also specific to material and plant level.
    Quota rating = quota allocate quantity + quota base quantity / quota.
    Quota based quantity used only when a new vendor introduced.
    In the as on date situation, the minimum quota ratings will considered as preferred vendor.
    The 2 vendors has 2 same quota rating, the vendor who is having the highest quota will considered first.
    In the running quota, a new source of supply is included. (In situation of short supply) including a new source not means to reduce the quota for existing.
    Regards,
    Syed Hussain.

  • How to calculate overwrighting commission to the third party

    hi,
    sap gurus,
    here is the scenario:
    my sold to party is different
    and
    ship to, bill to and pyr is different.
    but
    the order will be on sold to - ie on third party.
    and
    the rest are the same ie - delivery, billing, payment is from the party to whom we have delivered, billed, and paid.
    and
    after the party paying the full amount then we have to
    calculate over writing commission to the party ie sold to.
    how to calculate that commission.
    hint: we hav to think from Partner Determination Procedure perspective and requesting to find a solution for that.
    this is specifically only TRANSACTION SPECIFIC.
    BUT NOT PERIOD SPECIFIC.
    help me on this.
    regrds,
    balaji.t
    09990019711
    and

    Hi
    yopu can make use of existing query in APD and update a Direct Update DSO and then a cube , then u can define your new query on the new Cube with required Keyfigure values .
    Rajesh

  • How do I removing a specific item from an Array?

    Hi there.
    I am having an array of movieclips and when my circle(controlled with the keyboard) hitTests true with one of the movieclips inside that array i want to remove that movieclip from the array so when i hitTest it again it returns false (I hitTest using a "for in" with that array).
    How do i remove a specific item from within an array?
    Can someone help me? Thanks a lot.

    i haven't noticed anyone showing deference because of the points.  in fact, i've seen some people (a minority, to be sure) be just obnoxious about it.  i never encountered that before:  some people feel they have power because they can dole out points.
    but overall i agree with you:  the loss of the list of threads i am participating in, along with the most recent posters name, is a significant drawback of the new forums.  and there's nothing new in these forums that offsets that drawback.
    in addition, i think we've lost way more than 1/2 the older threads.  that's a lot of information that's no longer available.

  • In labview,how to calculate the parameters of the bilinear model that simulates the generation electroencephalogram?

    Dear Sir or madam:
    I have collected a lot of electroencephalogram data, which looks like a continuous sine wave plus a noise signal. what i want to do now is to fit the data with the bilinear model as the attached jpg file. the problem is the parameters of the model are changing with the evolution of the signal. would someone like to tell me how to calculate the parameters in the bilinear model?
    thank you very much
    Attachments:
    Bilinear_Model.jpg ‏33 KB

    I can point you in the right direction, but probably not answer your question really well. If you have the pro or full distribution of LabVIEW, you can use the curve fitting VIs to match any set of data to a theoretical curve. The curve fitting Express VI may do all you need to do (use the nonlinear option). To get the signal evolution, break your data into pieces and process each. If you need to average a bit, you can use a sliding window of your data for each analysis, moving the window less than the window width for each analysis.
    There are a plethora of curve fitting techniques built into LabVIEW - matrix operations, linear and log linear fits, Levenberg-Marquardt methods, downhill simplex, etc. You will probably need to experiment a bit to get a stable
    algorithm for your case. Check your literature for ways other people have done this. There may be an easy, stable method out there.
    If you are unfamiliar with curve fitting techniques, or you do not have the pro or full versions of LabVIEW, I would recommend "Numercial Recipes in C" by Press et. al., published by Cambridge University Press. The chapter on Modeling of Data will get you going. The rest of the book will provide any background you need.
    This was a very general answer. If you need something more specific, let me know. Be aware that this type of problem usually requires some trial and error to get right. The answers should be tightly scrutinized before being believed.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • [svn:fx-trunk] 10545: Make DataGrid smarter about when and how to calculate the modulefactory for its renderers when using embedded fonts

    Revision: 10545
    Author:   [email protected]
    Date:     2009-09-23 13:33:21 -0700 (Wed, 23 Sep 2009)
    Log Message:
    Make DataGrid smarter about when and how to calculate the modulefactory for its renderers when using embedded fonts
    QE Notes: 2 Mustella tests fail:
    components/DataGrid/DataGrid_HaloSkin/Properties/datagrid_properties_columns_halo datagrid_properties_columns_increase0to1_halo
    components/DataGrid/DataGrid_SparkSkin/Properties/datagrid_properties_columns datagrid_properties_columns_increase0to1
    These fixes get us to measure the embedded fonts correctly when going from 0 columns to a set of columns so rowHeight will be different (and better) in those scenarios
    Doc Notes: None
    Bugs: SDK-15241
    Reviewer: Darrell
    API Change: No
    Is noteworthy for integration: No
    tests: checkintests mustella/browser/DataGrid
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-15241
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase .as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColu mn.as

    Hi Matthias,
    Sorry, if this reply seems like a products plug (which it is), but this is really how we solve this software engineering challenge at JKI...
    At JKI, we create VI Packages (which are basically installers for LabVIEW instrument drivers and toolkits) of our reusable code (using the package building capabilities of VIPM Professional).  We keep a VI Package Configuration file (that includes a copy of the actual packages) in each of our project folders (and check it into source code control just as we do for all our project files).  We also use VIPM Enterprise to distribute new VI Packages over the network.
    Also, as others have mentioned, we use the JKI TortoiseSVN Tool to make it easy to use TortoiseSVN directly from LabVIEW.
    Please feel free to contact JKI if you have any specific questions about these products.
    Thanks,
    -Jim 

Maybe you are looking for

  • Cinema display 24" burned and died

    I wonder if anyone can give me any advice. I bought the £650 24" Apple Cinema Display 18 months ago from the Apple Store. On Friday I got a burning smell and it died. Took it into the Apple store on Monday. They said it is out of warranty and that th

  • Lookups

    What is LookUp's in XI

  • Is there any issue in using postChanges()?

    Is there any issue in using postChanges()?

  • Function which determines the selection period dropdown on MSS Reporting

    Hi I need the function which detemines the dropdown of the selection period on the MSS reporting screen on the Portal. I know that function: HRWPC_GENERAL_KEYDATE_GET determines the default keydate. Can anybody please assist? Regards Margariet

  • Add/ remove field on "Convert Lead"

    Hi All, Is it possible to edit/ remove field present on "Convert Lead" page. When we try to convert a lead to opportunity on the "Convert Lead" page we can view below fields under "Opportunity" section Do Not Convert to Opportunity // Auto-Create New