Record data at one sample rate and calculate velocity

I need to record position data at a sample rate of 10 hz but I would like to calculate velocity every half a second.  What is the best way to do this so the velocity display does not jump?  I want to capture quick responses but I would also like to calculate the velocity over a longer period of time like 1 minute. 

I am trying to calculate vertical speed based on pressure altitude data.  I am using serial communication to measure pressure at 10 Hz.  I am using Labview 8.2 for all of the calculations and measurements. 
I am looking for some way to average the data over some time interval that I have yet to determine.  I want to be able to see any major pressure changes whithin about .5 seconds but I also need to see trends over a longer time period say 2 to 10 seconds. 
I have thought about using an array and then averaging the array or implimenting a rolling digital filter. 

Similar Messages

  • Conflict between the saved data and the sampling rate and samples to read using PXI 6070e

    Hello, I am using PXI 6070e to read an analog voltage. I was sampling at 6.6 MHz and the samples to read were 10. So, that means it should sample 10 points every 1.5 um. The x-axis of the graph on the control panel was showing ns and us scale, which I think because of the fast sampling and acquiring data. I use "write to measurement file" block to save the data. However, the data was saved every 0.4 second and as 35 points data at the beginning of each cycle (e.g. 35 points at 0.4 sec and 35 at 0.8 sec, and so on) and there was no data in between. Can anyone help me how there are 35 reading points every cycle? I could not find the relation between the sampling rate and samples to read, to 35 points every 0.4 second!
    Another thing, do I need to add a filter after acquiring the data (after the DAQ assistant block)? Is there anti-aliasing filter is built in PXI 6070e?
    Thanks for the help in advance,
    Alaeddin

    I'm not seeing anything that points to this issue.  Your DAQ is set to continuous acquire.  I'm not sure if this is really what you want because your DAQ buffer will keep overwriting.  You probably just want to set to Read N Samples.
    I'm not a fan of using the express VIs.  And since you are writing to a TDMS file, I would use the Stream to TDMS option in DAQmx.  If you use the LabVIEW Example Finder, search for "TDMS Log" for a list of some good examples.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • DASYLAB QUERIES on Sampling Rate and Block Size

    HELP!!!! I have been dwelling on DASYLAB for a few weeks regarding certain problems faced, yet hasn't come to any conclusion. Hope that someone would be able to help.Lots of thanks!
    1. I need to have more data points, thus I increase the sampling rate(SR). When sampling rate is increased, Block size(BS) will increase correspondingly.
    For low sampling rate (SR<100Hz) and Block size of 1, the recorded time in dasy and the real experimental time is the same. But problem starts when SR>100Hz for BS=1. I realized that the recorded time in dasylab differs from the real time. To solve the time difference problem, I've decided to use "AUTO" block size.
    Qn1: Is there any way to solve the time difference problem for high SR?
    Qn2: For Auto Block Size, Is the recorded result in dasylab at one time moment the actual value or has it been overwritten by the value from the previous block when AUTO BS is chosen.
    2. I've tried getting the result for both BS=1 and when BS is auto. Regardless of the sampling rate, the values gotten when BS=1 is always larger than that of Auto Block size. Qn1: Which is the actual result of the test?
    Qn2: Is there any best combination of the block size and sampling rate that can be used?
    Hope someone is able to help me with the above problem.
    Thanks-a-million!!!!!
    Message Edited by JasTan on 03-24-2008 05:37 AM

    Generally, the DASYLab sampling rate to block size ratio should be between 2:1 and 10:1.
    If your sample rate is 1000, the block size should be 500 to no smaller than 100.
    Very large block sizes that encompass more than 1 second worth of data often cause display delays that frustrate users.
    Very small block sizes that have less than 10 ms of data cause DASYLab to bog down.
    Sample rate of 100 samples / second and a block size of 1 is going to cause DASYLab to bog down.
    There are many factors that contribute to performance, or lack there of - the speed and on-board buffers of the data acquisition device, the speed, memory, and video capabilities of the computer, and the complexity of the worksheet. As a result, we cannot be more specific, other than to provide you with the rule of thumb above, and suggest that you experiment with various settings, as you have done.
    Usually the only reason that you want a small block size is for closed loop control applications. My usual advice is that DASYLab control is around 1 to 10 samples/second. Much faster, and delays start to set in. If you need fast, tight control loops, there are better solutions that don't involve Microsoft Windows and DASYLab.
    Q1 - without knowing more about your hardware, I cannot answer the question, but, see above. Keep the block size ratio between 2:1 and 10:1.
    Q2 - without knowing more about your hardware, and the driver, I'm not sure that I can fully answer the question. In general, the DASYLab driver instructs the DAQ device driver to program the DAQ device to a certain sampling rate and buffer size. The DASYLab driver then retrieves the data from the intermediate buffers, and feeds it to the DASYLab A/D Input module. If the intermediate buffers are too small, or the sample rate exceeds the capability of the built-in buffers on the hardwar, then data might be overwritten. You should have receive warning or error messages from the driver.
    Q3 - See above.
    It may be that your hardware driver is not configured correctly. What DAQ device, driver, DASYLab version, and operating system are you using? How much memory do you have? How complex is your worksheet? Are you doing control?
    Have you contacted your DASYLab reseller for more help? They should know your hardware better than I do.
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • Maximum audio sample rate and bit depth question

    Anyone worked out what the maximum sample rates and bit depths AppleTV can output are?
    I'm digitising some old LPs and while I suspect I can get away with 48kHz sample rate and 16 bit depth, I'm not sure about 96kHz sample rate or 24bit resolution.
    If I import recordings as AIFFs or WAVs to iTunes it shows the recording parameters in iTunes, but my old Yamaha processor which accepts PCM doesn't show the source data values, though I know it can handle 96kHz 24bit from DVD audio.
    It takes no more time recording at any available sample rates or bit depths, so I might as well maximise an album's recording quality for archiving to DVD/posterity as I only want to do each LP once!
    If AppleTV downsamples however there wouldn't be much point streaming higher rates.
    I wonder how many people out there stream uncompressed audio to AppleTV? With external drives which will hold several hundred uncompressed CD albums is there any good reason not to these days when you are playing back via your hi-fi? (I confess most of my music is in MP3 format just because i haven't got round to ripping again uncompressed for AppleTV).
    No doubt there'll be a deluge of comments saying that recording LPs at high quality settings is a waste of time, but some of us still prefer the sound of vinyl over CD...
    AC

    I guess the answer to this question relies on someone having an external digital amp/decoder/processor that can display the source sample rate and bit depth during playback, together with some suitable 'demo' files.
    AC

  • Recording LP records as source material- Sample Rate

    Using recorded tracks from LP records to make DVDs, Blu-Ray DVDs or simple CD's. Am not sure what maximum sample rate to use. I understand the end product limits of the various digital media, but LPs are analog. Do I gain any sound quality by recording the original LP at a sample rate higher than 48000/32bit, say 96000 sample rate) and then resampling (downsizing) the audio file if the end product cannot produce the higher sample rate?

    Conversion de LP -Archivos Digitales
    Se recomienda Grabalos  con estas velocidad de Muestreo
    Blue-Ray 96000Hrz. / 32 bits
    DVD & 48000 Hrz. /32 Bits
    CD DE AUDIO A 44100Hrz /32 Bits ó 24Bits
    Te recomendaria Cambiarte a Adobe Audition
    Saludos
    http://soundcloud.com/creativoxpro/restaurando-audio-de-un-vinil
    Para audio
    8000 muestras/s
    Teléfonos, adecuado para la voz humana pero no para la reproducción musical. En la práctica permite reproducir señales con componentes de hasta 3,5 kHz.
    22050 muestras/s
    Radio En la práctica permite reproducir señales con componentes de hasta 10 kHz.
    32000 muestras/s
    Vídeo digital en formato miniDV.
    44100 muestras/s
    CD, En la práctica permite reproducir señales con componentes de hasta 20 kHz. También común en audio en formatos MPEG-1 (VCD,SVCD, MP3).
    47250 muestras/s
    Formato PCM de Nippon Columbia (Denon). En la práctica permite reproducir señales con componentes de hasta 22 kHz.
    48000 muestras/s
    Sonido digital utilizado en la televisión digital, DVD, formato de películas, audio profesional y sistemas DAT.
    50000 muestras/s
    Primeros sistemas de grabación de audio digital de finales de los 70de las empresas 3M y Soundstream.
    96000 ó 192400 muestras/s
    HD DVD, audio de alta definición para DVD y BD-ROM (Blu-ray Disc).
    2 822 400 muestras/s
    SACD, Direct Stream Digital, desarrollado por Sony y Philips.
    Para vídeo
    50 Hz
    Vídeo PAL.
    60 Hz
    Vídeo NTSC.
    *informacion extraida para apoyo de la pregunta en el foro // http://es.wikipedia.org/wiki/Frecuencia_de_muestreo
    > http://en.wikipedia.org/wiki/Sampling_rate

  • PXI-4462 actual sample rate and delay...

    Hi All!
    Is the DAQmx properties, which give me actual sample rate and filter delay? Or I must manualy calculate this values, as described in DSA manual?
    Jury

    Hi Jury,
    I am not sure if I fully understand your question, but there are DAQmx properties that do return the actual sample rate, but there is not one for filter delay. If you place a DAQmx Timing property node down, the actual sample rate will be returned by selecting Sample Clock » Rate.
    Regards,
    Jason D
    Applications Engineer
    National Instruments

  • Sample rate and / or Bit depth probl

    I am in the middle of mastering a tune, but when I come to play the tune in Soundforge 8 I get the error message: One or more playback devices do not support the current Sample rate and / or Bit depth. I am using a Audigy2 Platinum with the ASIO A400 driver and I'm sure it should be A9000, I can't find the driver update for this, does anyone have a link to this, or is it something else I should be looking at?

    A400 doesn't have anything to do with a version number. It's related to the ressource allocated to your card.
    What kind of source are you trying to play ?

  • HT5848 What is the sampling rate and codec for iTunes Radio. Is it lossless encoded?

    What is the sample rate and codec for iTunes Radio? Is it lossless encoded?

    I have to agree with you.  There are several forum discussions on bit rate being as high as 256 kbps but I don't see how it could be more than 96 kbps based on the poor sound quality I'm hearing.  I'm comparing it to an internet radio station that is 128 kbps and sounds much better.
    Am I missing something?

  • Changing sampling rate and bitrate

    If I drop in an .aiff audio file into Garage Band 2 (or iTunes), is there a function that allows me to adjust the audio sampling rate and bitrate?
    When I created this podcast in Adobe Auditions, the were about 10MB for a 22 min show.
    When I do it through GB, it's about 26MB for the same time;
    I just want to tune it down slightly.
    Thanks!

    GB exports uncompressed 44.1K 16-Bit AIFF files. You need to convert them to Mp3s or AAC files
    http://thehangtime.com/gb/gbfaq2.html#converttomp3

  • Multi Track settings (Sample Rate and Bit Rate)

    I'm setting up my multi-track in 5.5 as 44100 16 bit, but when I create it...it's saying its 44100 32 bit (at the bottom of the multi-track).  Is there a way I can change this setting?  I've explored the preferences all day long and still can't find any answers.
    Thanks

    I guess the answer to this question relies on someone having an external digital amp/decoder/processor that can display the source sample rate and bit depth during playback, together with some suitable 'demo' files.
    AC

  • Restore Old LP'S AT 96000 Hz Sample Rate and 24 bit Resolution?

    I restore LP vinyl albums using the above Sample Rate and Resolution.
    Do I have to convert to 44100 Hz, and 14-bit before adding to my iTunes Library?

    Ringmaster wrote:
    Thanks for your help!
    I guess I had better keep all of them in this format. It might make a difference if I decide to burn CD's; also, all of my back ups will be of the same format.
    Do what works for you, but neither of those two things is an advantage. If you burn audio CDs, they will be downsampled to 44.1 kHz anyway. And as far as backups, iTunes does not care if different songs are in different formats, nor does any other music player that I know of.
    Unless you plan on further mastering or remixing, or you really just like the higher fidelity, there is no obvious reason not to use 44/16.

  • Sample rate and data recording rate on NI Elvis

    I am currently working on a project that requires me to record my data at 1ms intervals or less. Currently the lowest timing interval I can record is at 10ms. If I change my wait timer to anything below 10 the recorded data in excel will skip time. For example instead of it starting at 1 ms and counting 2,3,4,5,6...,etc. It is skipping from 2,5,12,19,....,etc. So my question is if it is a limitation that I have reached on the NI Elvis or if it is possibly a problem with how I've created my LabVIEW code. My program from an operational stand point is working great, but it is my data recording that is causing me to not be able to move to my testing phase. Any help on this matter would be greatly appreciated.
    Other information that might be relevant:
    Operating System: Windows 7
    Processor: Intel(R) Xeon(R) CPU E31245 @ 3.00 GHz
    Memory: 12GB
    DirectX Version: 11
    Attachments:
    Count Digital(mod12).vi ‏76 KB

    Hi crashdx,
    So my immediate thought on this issue is that the code inside your primary while loop might be taking too long to process to achieve such a high sample rate. Especially when making calls into external applications (such as Excel) which can take a large amount of itme. 
    There is a very useful debugging tool called the Performance and Memory tool. If you aren't familiar with this tool, it will allow you to see how much memory the various chunks of your code are using and, more importantly here, how much time each subVI is taking to execute. Does the code inside your while loop take longer than 1ms to run? If so, then you will definitely see unwanted logging behavior and will need to change your approach. Would it be possible to collect more than a single sample at a time and perform calculations on a large number of samples at once before writing them to Excel in bigger chunks?
    I've included a link to the LabVIEW helpful detailing the Profile Performance and Memory tool.
    http://zone.ni.com/reference/en-XX/help/371361H-01/lvdialog/profile/
    I would first try and figure out how long it's taking your loop code to execute and go from there.
    I hope this helps!
    Andy C.
    Applications Engineer
    National Instruments

  • How to properly read data from one DAQ-assistant and write simultaneously with another DAQ-assistant (which is inside a loop)

    Hello.
    I'm a newbie working on my Master's thesis conserning a project that is based on old G-code made by another newbie so bear with me.
    I need to create a sequance of output controls. For this I'm using a for loop that eventually creates two triangular ramps during a period of 90 seconds. I've confirmed that this function works properly by measuring the actual output of the DAQ-decice (NI USB 6353).
    The problem is the following: During this controll-cycle I need to simultanously collect data from the same DAQ-device. At this point there is only one DAQ-assistant output-block in the main loop of the program and all the signals are derived from it to where they are needed.There is a case-structure (the bottom case structure in the picture) that contains the functions needed to collect the data during the test cycle. However these two actions, outputting data and inputting data, are not synchronized in any way which may be the reason why I get the 200279 error or alternatively the 200284 error during the test cycle. I've tried changing the sample rate, buffer size and the timeout time as adviced but nothing seems to help.
    What would be the simplest way to solve this problem?
    Help is greatly appreciated!
    Attachments:
    problem.jpg ‏206 KB

    Thanks for quick reply.
    However, I did try it (see the picture) but I still have a problem: I only get 100 samples / channel during the test sequence (all from the first seconds of the sequence) in total even though I've set the data aqcuiring DAQ-assistant as "continous" and "samples to read = 95k" and rate is 1000Hz.
    Edit.
    And lastly, I have trouble adding this "extra" DAQ-assistant to the vi. because I get an error about a resource (The 6353) being reserved, even though I connected a false constant to the "STOP" -input of the main DAQ-assistant.
    Attachments:
    is_this_what_you_meant.jpg ‏212 KB

  • Converting a song from one sample rate to another

    i recently had to convert a song that had been done in 44.1 to 48. that is, all the audio i had recorded or imported and chopped up was at 44.1. what i wanted was to change them all to 48, so that the new recordings that had to be done would be at the new sample rate. obviously i can select copy and convert in the audio editor but it doesn't change the region file referneces in the arrange.
    short of actually physically making sure that logic can't the old audio files and thus forcing it to change file reference, i had to change each audio file with sample rate converter maually.
    surely there must be a better way. anyone know what it is?

    o.k. yes, It's all coming back to me now...
    The work around is a little odd, but the way I did this before, was after batch converting the audio files to the new sample rate, I had to literally throw the original audio files into the trash, and then empty the trash. ( Yes, I backed up first, just in case... )
    I then opened the Logic song, and a prompt says "X(amount) invalid regions changed." Then Logic begins to create overviews for all the new audio files, and then it's done. The song is playing all the new sample rate converted audio files, where the old ones used to be.
    You need to empty the trash though, or Logic goes and finds the original audio file in the trash, and uses them.

  • Sample Rate and "Smart Encoding Adjustments"

    Wondering if someone could help me out with this...
    Is there a reason to choose a higher sample rate over a lower one when importing? Does it improve the audio quality? Or should I just put it in the auto setting?
    Also, what does the "smart encoding adjustments" option mean? (In the "custom" settings for mp3 format)
    I'm basically trying to get my music onto my HDD at the top quality possible, so I'm trying to figure all this out.
    Thanks.

    The info below should give you a start on the concepts. Google can find many more facts, opinions, and misconceptions about Lossy vs. Lossless music formats. Way too much information to be listed here. Do several searches with various keywords.
    Song file size is a factor of bit rate and song length. Audio quality is a factor of bit rate and encoding format. AAC and MP3 formats are considered Lossy, as they sample the target music file and reduce the total size with some reduction of audio quality. Lossless files are considered CD replicants as they contain all the digital data on the original audio CD. They can be fairly large in comparison to the traditional Lossy file.
    Encoding a music file into a Lossy compression format will strip details from the file. Transcoding from one Lossy compression format to another Lossy format will compound the loss of details from the file. (eg: transcoding a sound file from: AAC to MP3; or MP3 to AAC). The audio degradation becomes more apparent when transcoding files ripped at lower bit rates (less than 192kbps).
    When you burn an AAC file to CD and then re-rip the CD as AAC or MP3, the sound you end up listening to will have gone through a lossy compression process twice. Those losses can add up, taking what were only mild or even unnoticeable deviations from the original sound after the first phase of compression and making those deviations much more noticeable and objectionable. This is especially true if you try to take music at a low bit rate like 128 kbps (what Apple uses for iTMS) and try to compress back down to the same low bit rate.
    The preferred method is to save all audio "masters" in a Lossless audio format such as Apple Lossless, WAV, AIFF or FLAC (or the original CD), and then transcode directly from the Lossless source file to your preferred Lossy format such as MP3 or AAC. This procedure preserves as much of the original audio signal as possible and prevents the compound loss of audio details from the file.
    The generally accepted theory is that AAC/128 sounds as good as, or better than MP3/160 (and possibly even MP3/192). Transcoding your AACs/MP3s will most likely result in noticeable audio quality degradation. But -- test it out for yourself. If you cannot hear the difference, then it may be acceptable. Bear in mind that any improvements &/or upgrades in equipment (iPods, headphones, your ears, etc.) may uncover the additional audio limitations you created at a later date.
    See: Choosing an Audio Format

Maybe you are looking for