Peak and frequency
Hey Guys,
I'm trying to solve a probleme of frequency (see the file: this is just an example!).
I would like to find out the corresponding frequency to each peak.
I dont know weather I have the right VI ( see the png pic).
the output "location" seems not to be the right. Instead of location I need to have here the corresponding frequencies
to my peaks.
Can somebody helps?
Lauvia
LV7.1 ; 8.5
Solved!
Go to Solution.
Attachments:
Test[2].vi 156 KB
Test[2].PNG 36 KB
Lauvia wrote:
Hello Coq Rouge (french?)
thx for the answer.
Im waiting for the LV7.1 or 8.5
Patience, my blue friend. You'll have your winnings before the suns set, ... (Star wars episode 1)
Well here it is. It is an old piece of code dating back to Labview 6. But it is still needed. As people get confused by the Express VI concept time after time
Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Attachments:
Spectrum Analyzer Folder.zip 38 KB
Similar Messages
-
How can I get the peak and valley of a MZI signal
I am using MZI signal which is similar to sine wave with frequency of 10MHz to calibrate an interference signal. I want to get the peak and valley of the MZI signal and get the corresponding value of interference signal at the same location. The problem is that the MZI signal aquired by DAQ is not smooth, Please see attached filter.PNG, the top left is the MZI, top right is the MZI Zoomed in, you can see that there may be two values that are approximately same to each other. I used a peak detector to detect both the peak and valley and a build array to concatenate them. I am worried that the peak detector may find two peaks or two valleys in a fringe. So I used the filter function in express to bandpass the MZI signal (cutoff frequency is 8MHZ~12MHZ) to smooth the signal, the result zoomed in is the bottom graph in filter.PNG. But I found that it did not solve the problem but cause phase shift. Is there somebody can give some help?
Attachments:
filter.PNG 143 KB
peak detector.PNG 69 KBI don't know anything about MZI signals, but I do know sine waves. If this is a sine wave, it is relatively easy to measure its amplitude as long as you know the frequency. Since you say it is 10 MHz, you appear to know the frequency. You can use Fourier analysis to determine the magnitude and phase of your signal, as long is it is a steady signal that doesn't change frequency or amplitude.
Generate a sine and cosine wave using the same frequency. Divide each wave by the sum of its points. Multiply each one by your incoming signal and sum all the values, one sum for sine and one sum for cosine. The sums should be the coefficients of the sine and cosine components of your unknown signal. The ratio tells you the phase of the signal. If you multiply the sine and cosine waves by their coefficients and add them together, you should be very close to your incoming signal. The amplitude of your signal is equal to square root of A*A+B*B, where A and B are your coefficients.
I may be off by a constant factor here somewhere (probably pi), since I didn't write down the equations and verify them. These equations are the basis of the Fourier series, though, so they would be fairly easy to find.
Another option would be resampling. If you upsampled the data and increased the data resolution by a factor of 10 or so and filtered the results using an FIR filter, you would have a much cleaner signal with a lot more detail. You wouldn't have any problem locating and measuring peaks and valleys. This would probably work better with your data, since it looks like it doesn't have a constant magnitude. To upsample the data, just add 9 zeroes between each data point. Create a lowpass FIR filter that is based on 10 times the original sampling frequency and has an amplitude of 10. The cutoff frequency should be half the original sampling rate. Filter your new data and you should get the same waveform with 10 times the resolution.
Bruce
Message Edited by Bruce Ammons on 10-02-2008 09:10 PM
Bruce Ammons
Ammons Engineering -
How to calculate rms voltage, rms current and frequency from real time data?
Hello,
I need to calculate the real time rms voltage, rms current and frequency of the received voltage and current graphs using visa read. Actually am trying to monitor the voltage and current parameters of AC load, in this case, am using a set of 4 light bulbs at the moment. Expected frequency is 50 Hz, and rms voltage close to 240v AC, current about 1A.
Attached is the vi picture of what I have been able to achieve so far, courtesy of labview forums. But I need to finally finish this vi by calculating the Vrms, Irms and frequecy. The front panel shows the voltage (Chart V) and current (Chart I) after scaling. Chart VI represents ADC value 0 ~ 1023 of received data. Aray V & I show the binary bits received up to 10 bits of useful data from ADC. Each sine wave from ADC is sampled at 25 samples for the ADC conversion, and sampling frequency of 1.28kH.
I have tried using the RMS vi, but seems I don't know how to configure it correctly to get desired results. Also when I make changes like switching of one of the bulbs so that their is current change, I need to refresh the SERIAL port first before changes show up on the VI. Any ideas on how to improve on this are highly appreciated.
Otherwise, I would appreciate if somebody helps me MODIFY my VI to read the rms values and frequency from received data. This is the last piece of my project, I do appreciate all the help rendered. Am currently using labview labview 2014, student version!
Gavin.
Attachments:
Test_revised1.vi 39 KB
Test_frontpanel.png 196 KB
Test_blockdiagram.png 187 KBhello,
note that peak voltage (Vpeak) is (240 * 1.414) = 399 V and peak current about 1.414 if intended rms current is 1A.
Gavin. -
Resonance peaks in frequency vs. amplitude spectrum
Hello all,
I am struggling to find a way to analyze some data. My data is frequency vs. amplitude spectrum plot. There are resonance peaks in the spectrum. When the data is clean I use peak detection to measure the frequency spacing of the peaks (the FSR). When the peaks either have very low contrast, or are noisy, the peak detection doesn't work well. I am thinking that I should be able to use one of the math functions like an FFT, but I haven't a clue as to which function to use or how. Any help is greatly appreciated.
Jim
Jim
LV 2013Noisy data is always difficult to deal with, even for experts, but don't let that stop you. Your analysis technique will vary depending upon how much information you have at the beginning. However, trying to remove noise before analysis is somewhat dangerous. The noise removal can often distort or remove data you want. Instead, analyse the basic data with techniques which tend to "ignore" the noise. Some examples are in order.
If you know the approximate locations of your peaks, some sort of non-linear fit to a subset of the data for each peak would probably work. This assumes you know the peak shape and can model it. The noisier your data, the more robust your fit will need to be. A Levenberg-Marquardt is fast and easy, but a downhill simplex is more reliable.
If you know exactly what the peaks will look like, and their exact location when they are there, a singular-value decomposition is fast and efficient and fairly noise immune.
If you have no clue where the peaks are, but have some idea of their width, try a Savitzky-Golay first derivative filter with a convolution width set by the known width of the peaks. This will screen out the high frequency noise and give you a zero crossing for every peak and valley in your data. You can tell which is which by the direction they cross zero.
Without some data, we can't help you much more. Since you are new to this, I would highly recommend Numerical Recipes in C by Press et. al. You will want the second edition (the first does not have Savitzky-Golay algorithms in it). It gives a very clear explanation of most of the common numerical algorithms and why you would want to use them. Most of the algorithms are already implemented in LabVIEW. The building blocks are there for the rest (e.g. matrix multiply and invert, downhill simplex optimization). Check your local university library. Most have it. I have even found it in municipal libraries.
Good luck. Let us know if you have further questions.
This account is no longer active. Contact ShadesOfGray for current posts and information. -
Building Peak and Hold output counters: HW and SW required?
Hello,
I am using the 2 counter outputs of USB-6211 and PCI-6602 to drive injectors with PWM commands at rather slow frequencies (up to 10Hz) --- see top picture in the attached file. What I would like to do now is to drive Peak-and-Hold injectors (as shown in the below picture). I wonder if such profiles can be programmed or set in the hardware at the beginning of a test then reset everytime the users want to change the current settings (this latter does not need to be in real-time).
Can I achieve this with my hardware, do I need specific hardware? Is the only solution to build the train of impulsions and send it in a sort of time-based way? I do not really see the SW related that I must use.
Thanks for any insight.
Christophe
Attachments:
P&H command.doc 34 KBHello,
If you really need the exact pattern to be completely accurate up to 0.1%, then your pulse parameters should be able to change with maximally a 0.1% error.
This means that your pulse parameters should be updatable with an error smaller than 1 ms.
Therefore you cannot use Non-Buffered Pulse Train Generation (Implicit timing), because in that case changing your pulse parameters would be done software-timed. This type of Pulse Train Generation can be performed on STC 2 - and STC 3 - chipsets.
Because a computer only has an accurate 1kHz clock available, this would probably not fulfill your needs.
Two other options that could do what you are asking are Buffered Pulse Train Generation (with Implicit Timing) and Buffered Pulse Train Generation (with Sample Clock Timing).These options are only available on STC 3 - chipsets. These chipsets allow you to change your pulse parameters in a hardware-timed manner.
The 6211 card you mentioned is an M-series device and these devices use a STC 2 - chipset. Therefore it will not be possible to do a hardware-timed buffered pulse train generation.
As far as I know it will not be possible to do the hardware-timed buffered pulse train generation with the 6602-card.
I don't have one available over here to test it, but of course you can always test it at your side.
The examples to test this can be found the following way:
- Open LabVIEW and go to Help > Find Examples
- Select Browse and go to Hardware Input and Output > DAQmx > Generating Digital Pulses
- Here there should be two examples of the buffered Pulse Train Generation. (starting with "Gen Dig Pulse Train - Buff-... ")
- In the Requirements section they also mention the cards that do support this functionality.
Can you let me know if your test allows you to produce the wanted results?
Kind Regards,
Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
CLD, CTA
If someone helped you, let them know. Mark as solved and/or give a kudo. -
I’ve trying to determine the Peak and Amplitude of a signal when peak exceeds a certain threshold value that we choice. Now I can read the frequencies but I can’t have the correct values for its respective amplitudes. These are my two questions: 1. How a can read both frequency and amplitude correctly with this VI? and 2. How can send the obtained information to a spreadsheet?
Any input will be appreciated. Thanks.
Attachments:
Peak.jpg 45 KB
performance.vi 197 KBThank you very much for your suggestions. I used Extract Multiple Tone Information how you said, but I still have some problems to know the correct amplitudes values. If you can look over my code and give me any tips I would be very grateful.
You can see in my code that I was been using the Write to Spreadsheet File VI to writing some others levels and amplitudes, but my question about how to send the frequency and amplitude to spreadsheet is because I don’t know how to send 1-D array of Cluster (The format at the output of Waveform Peak Detector VI) to spreadsheet.
Thank you and best regards
Attachments:
performance.vi 205 KB -
Find out the peaks and check them against a value
Hi
I am currently aquiring a bunch of signals (4 to be exact) through a 6120 card. This works as expected.
Now I'd like to check all 4 signals if any value (up to 80 000 samples / waveform) has it's lowest level above -0,8 V and it's highest level below 0,8 V.
I tried this with the Express VI (Level and Amplitude Measurements). I check both for the peaks and if one of them (OR) is above/below that value, a Boolean value should change.
So I have my 1D - Waveform Array as Input to the Express VI. I then get the Positive/Negative Peak. I wire those to smaller/grater sign. and when I try to wire the two outputs of the smaller/greater signs to an "OR", LabView won't let me
It says: Source is Dynamic Data, Sink is Boolean.
What am I doing wrong ?It would have worked, if you had converted the dynamic-data to a double before you pass it to the > / < operators.
If you pass two different data types to a function, the "lower" is converted to the higher (e.g.: sgl -> dbl) which is why the dynamic data is passed on to the or-operator.
Just see this example.
Thomas
Using LV8.0
Don't be afraid to rate a good answer...
Attachments:
CompareMaxMin.vi 169 KB -
I am trying to configure my SCXI-1540 w/1315 card for excitation voltage and frequency using MAX - but it is not giving me that option when I click on the card and then properties, am I looking in the wrong place?
I have LabVIEW Express 7.0 Professional - SCXI-1000 Chassiss - along with SCXI-1112, and SCXI 1520/1314 - cable to the PCI-6052E is attached to the 1520 card.
MAX says it recognizes all the cards in the chassiss.Jeremy, Thanks for the reply.
I tried to set up the system as DAQmx.
I had MAX auto-detect the set-up - and it recognized all the cards - but did not select the 1315 accessory on the 1540 card - I had to do that manually - but in the configuration section I would select the accessory and it would deselect itself. I had to get out of the set-up and then right click on the 1540 card and click on the "Accessories" tab and select the 1315 terminal block that way.
It didn't seem right that the system should behave that way, but I pressed onward.
I then tried to create a new DAQmx Task
When I create new DAQmx task and then click on Analog Input no "Position" Tab appears for me to select, all I get are:
Analog>>Voltage
Analog>>Temperature
Ana
log>>Strain
Analog>>Current
Analog>>Resistance
Analog>>Frequency
Analog>>Custom Voltage with Excitation
Do you think there might be something wrong with either my hardware or perhaps my configuration that is not allowing it to recognize the 1540/1315 in DAQmx?
I had included the system report of what programs I am using, etc. as attached file nireport.txt
After the DAQmx did not work I tried installing everything as Traditional DAQ and it did let me set-up the 1540 Card with Excitation Voltage and Frequency and gain - I then went in to the VI that I had built and tried to use the Express DAQ Assisant to read the channel that I am connected to on the 1315/1540 - when I try to use DAQ Assistant it gives me an error saying that "Device not available in NI-DAQmx. It is possible that the device is being use by traditional NI-DAQ"
Which I guess it is since both configurations are now set-up in MAX.
I would PREFER to use the DAQmx set-up, but I am confused as to WHY it won
't come up with
Analog input>>POSITION>>LVDT
When I try to create a new DAQmx task.
Thanks for the help so far! As you can probably tell I am new at this.
Ryan
Attachments:
nireport.txt 2 KB -
hi,
In my system multiple monitors are connected (VGA and HDMI). In need to know the
monitor instance name , device name , resolution and frequency of each monitor.. any solution?
i used wm class 'WmiMonitorConnectionParams' to determine Video output technology connection type and InstanceName.
But i didn't get the device name , resolution and frequency of each monitor.??
There are other wmi class like :
WmiMonitorBrightnessEvent
WmiMonitorConnectionParams
WmiMonitorRawEEdidV1Block
WmiMonitorListedFrequencyRanges
WmiMonitorDigitalVideoInputParams
WmiMonitorAnalogVideoInputParams
WmiMonitorID
WmiMonitorBrightnessMethods
WmiMonitorBasicDisplayParams
WmiMonitorColorCharacteristics
WmiMonitorDescriptorMethods
WmiMonitorListedSupportedSourceM…
WmiMonitorBrightness
WmiMonitorColorXYZinCIE
WmiMonitorSupportedDisplayFeatures
WmiMonitorBasicDisplayParams
Win32_VideoController
Win32_VideoConfiguration
Win32_VideoSettings Win32_DisplayControllerConfiguration
Win32_DisplayConfiguration
But unable to determine monitor having its corresponding values? please help me to find a solution .
is there any other method to get multi monitor details?
thank youHi sumith,
I read some documents about WmiMonitorConnectionParams class, it should be able to get the video putput technology by the D3DKMDT_VIDEO_OUTPUT_TECHNOLOGY enumeration.
D3DKMDT_VIDEO_OUTPUT_TECHNOLOGY enumeration
So what happens when you are using WmiMonitorConnectionParams class? What prevent you? Anyway, please see a example of using WmiMonitorConnectionParams class, maybe you could get some hints on it.
http://stackoverflow.com/questions/10085900/querying-wmi-for-d3dkmdt-video-output-technology
Best regards,
Shu Hu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hello
I am designing a website for a health company and plan to
make a hart monitor line with a 3D bar. Now I know how to make the
3D bar but how do I manipulate the 'peaks and troughs' (points) to
make it look like one long line? instead of many 3D bars positioned
to make points.
I hope this makes sence?
Thanks in advanceBlunda wrote:
> Hello
>
> I am designing a website for a health company and plan
to make a hart monitor
> line with a 3D bar. Now I know how to make the 3D bar
but how do I manipulate
> the 'peaks and troughs' (points) to make it look like
one long line? instead of
> many 3D bars positioned to make points.
>
> I hope this makes sence?
>
> Thanks in advance
If you are looking for a single line with peaks and troughs,
use the Pen
tool. Click down on the canvas to create a start point, and
then move up
and down, dropping a point at a time as you click across the
canvass.
Linda Rathgeber - Adobe Community Expert
http://www.adobe.com/communities/experts/members/8.html -
Locating peaks and valleys on a map using java.
This is the assignment for my excerice,if someone knows the code,please give it to me.
I'm still beginner in java,and i have to submit that project by monday.
Topographical maps are easily represented with two-dimensional
arrays of integer or real valued
heights. However, the bird's eye view they provide is sometimes
difficult to appreciate after a day of
lugging a 70-pound backpack.
Consider a two-dimensional array variable storing real numbers and
representing heights of a
topographical map.
Write a program that locates peaks. We define a peak as any point that
is higher than its eight
neighbors.
Write a program that locates valleys. A valley is any series of three
points along a row or column that
are lower than their twelve neighbors. (Can you deal with longer
valleys as well?)
1. Define a two-dimensional array type for holding real numbers and
having a size of maxrow times
maxcol;
2. Declare a Boolean method that tests if a point of this map
represents a peak;
3. From the main program locate all peaks and output their positions
and heights;
The header should be like this:
peak number Row position Column position weight
and for valleys it will the same heading
valley number Row position Column positionThis is the assignment for my excerice,if someone
knows the code,please give it to me.
I'm still beginner in java,and i have to submit that
project by monday.Tthis really isn't a beginners problem. Or if it's a beginners problem it's a beginners problem at a school with high standards. Above all it's clever. The problem is formulated in a way that you're unlikely to find code on the internet that exactly fits the bill and can be directly copied.
So if you stay off the booze tonight and skip church tomorrow you have a whole day on your hands. Use it well. The problem is clearly formulated and should pose no problem for a rasonably smart student -:) -
Looking to calculate the peaks and bpm of an ecg signal
Hello,
i was hoping some one could tell me what i am doing wrong. i have an ecg in the form of a text file. i am trying to display that ecg signal, show the peaks and then calculate the bpm. as you can see the program aint working. the messages on the forum all use continuouslly acquired signals. cant seem to find anything with a signal from a file.
thanks
barry
Attachments:
ECG Signal.vi 42 KBLet us asume that your peak detection is correct. Then the first beats pr second will be ->1/(( peak postion(1)-peak postion(0) )*dt),
and the next 1/(( peak postion(2)-peak postion(1) )*dt). This should be a job for a for loop . Multiply by 60 to get bpm
Message Edited by t06afre on 03-02-2009 11:13 AM
Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far) -
Peaks and valleys detection of a zig-zag shape waveform
Hi,
I have 2 waveforms coming in and I would like to detect the peaks and valleys(with the location, or ) and write them to a spreadsheet file.
In a pattern like this
peak #1(waveform 1) peak #1(waveform 2) Location of peak#1(waveform 1) Location of peak #1(waveform 2)
valley #1(waveform 1) valley #1(waveform 2) Location of valley#1(waveform 1) Locationo of valley#1(waveform 2)
peak #2(waveform 1) peak #2(waveform 2) Location of peak#2(waveform 1) Location of peak #2(waveform 2)
valley #2(waveform 1) valley#2(waveform 2) Location of valley#2(waveform 1) Location of valley #2(waveform 2)
The waveforms come in with varing heights, kind of like a wiggling zig zag shape. Sometimes the peaks/valleys are very smooth and kind of hard to differentiate from the others.
Thanks.If you search the forums for peak detect, you will find a number of hits. Also, here is a recent thread discussin peak detection without setting a pulse width.
Basically, you want to use the peak detection.vi located in Signal Processing > Signal Operation. That will find your peaks and valleys.
In order to put all of this into Excel/Spreadsheet (do you have / want to use the Excel Toolkit or just the Write to Spreadsheet.vi?), you will need to feed all of your points into a build array and a shift register and then when you are done aquiring data, feed that into the Write to spreadsheet.vi or to a vi for excel.
The formating will depend on how you feed the data into your array, ie wave 1, location 1 or wave 1 , wave 2, etc
Kenny
Kenny -
Need to make # of periods and frequency required for certain prod category
We have a requirement to make the # of periods and frequency fields required for a certain product category. I know I need to use a field validation for this but my issue is that the product category and product name fields are non-editable. I tried putting the validation on the product ID field but it is not working properly. It still throws the error even when values are entered and regardless of the category. Here is the expression I am trying to use:
IIf(FieldValue('<ProductCategory>')="XYZ", [<NumberOfPeriods>] is not NULL, FALSE)
Any ideas?You can add the read-only token ($RO$) after any of the segments in the list. For example, the ($RO$) designator below sets Segment1 in structure code 1 to be read-only:
Structure code1|Segment1($RO$)|Segment2...
P.S: After I posted this message, I realized this was not what you are looking for. After all, this may help somebody.
Edited by: dbhat1 on Dec 8, 2008 3:55 PM
Edited by: dbhat1 on Dec 8, 2008 3:56 PM -
Converting to real and imaginary from amplitude and frequency
basically there is a control of the amplitude and frequncy, so as to changes with resoect of real and imaginary
See the attachment, if this is what you require.
I ve enabled the Unit Label for the Freq control on the FP. Just rt-click & select to enable the Unit Label feature to dorectly key in the Deg [angle] value for the frequency parameter. Normally it takes frequency [or phase angle] in radians in LV.
- Partha
LabVIEW - Wires that catch bugs!
Attachments:
converting to real and imaginary from amplitude and frequency.vi 8 KB
Maybe you are looking for
-
Since downloading iOS on my new iPad, I cannot downlaod more than one pdf from mail into iBooks. I have to shut down my iPad and restart it to save a second pdf. Wasn't a problem with the old operating system. Any suggestions?
-
Please help! In our house we have all move around with PC's and laptops now my husband and kids have to go back to they original one to get all the stuff in ITunes how do I move there I Pod Touch stuff to a 2nd hand (sister's/mum's) computer that alr
-
Can't open NEF file (Nikon Raw)
I don't have a problem opening NEF files in CS3 on my desktop Vista PC (32bit), but my new laptop with Windows 7 (64bit) won't open them, do I need to install a plugin or an update? If so, what? I searched the forum and I think that's what I need t
-
How to secure the web resources in tomcat server
Hi, Iam developing a web application using java, frame work struts and tomcat server. I have to redirect the user, when he used to access site through folder names. EX :- www.mysite.com/jsp/registration/... Now, it is showing 404 error page. Now, i h
-
2 table questions - resizing table & repositioning images
Tables are challenging in ID5 but have managed to get through the hard stuff. Now for the fine points: 1) Is there a way to resize a table inputing hard measurements? The only way I see is by manually dragging the right end of the table in or out and