08-11-2009 04:08 AM - edited 08-11-2009 04:14 AM
Hi guys, I need some help here. I´m using a NI 9215 to do a frequency sweep from 30 to 90 Hz.
So far so good. Now I need a resulting resonance frequency at highest voltage.
I tried a max peak frequency VI but couldn´t get it to work.
Any idea what to do?
mfg, Andi
ok, here is my sweep.vi for better understanding
08-12-2009 09:11 AM - edited 08-12-2009 09:12 AM
08-17-2009 03:47 AM
Thanks Sebastian, I just came back and read your reply.
Ok thanks for your advice, I´ll try it out and post my results the next days.
mfg,Andi
08-18-2009 07:05 AM
So, I studied your VI some time, but I have a few questions.
Im using a for-loop to create my sweep signal, is it possible to create my output signal like this (output.vi) ?
http://forums.ni.com/ni/board/message?board.id=170&message.id=430352&requireLogin=False
Your idea to use a for loop to read my input is nice. but where should I put my start and stop task VIs? Do I need to put em inside a loop or is it ok to run em just once outside my for-loop?
Last question is, I put a method together to search for my resonance frequency, but I couldnt figure out the parameters for my Index Array.
Is this method ok,or do you know a better way to do it? SchleifeLesen.vi
If you like to talk deutsch, please tell me
cya,andi
08-18-2009 08:30 AM
Hi Andi,
you can use a FOR LOOP and build a waveform bit by bit all right - you might want to use the [i] output instead of the[N] output though. Also, please observe that without a manual phase correction in each step, you will get ugly glithes in the waveform, as depicted in the following screenshot:
The placement of the "Start Task" and "Stop Task" VIs is quite okay, no need to place them into a loop if you only need one run of your VI.
To your last question: your peak amplitude search still needs improvement: as you currently have discrete frequency steps, simply multiplying the maximum amplitude index with the sample count will not do the trick. Depending on the stimulus signal (is the sample count per frequency constant, or do you output a constant number of periods per frequency), you would firstly have to generate a list with all frequency<->sample number pairs, and then match the found sample index with that list...
Btw: the "index array" function does not necessarily require index parameters - by default, it indexes the rows of a 2D array - which is exactly what you need. If you want to make sure, you can wire the constants "0" and "1" like this:
Best regards,
Sebastian
08-19-2009 02:40 AM
haha, youre right, wiring the N output wasnt the smartest idea.
Hmm, do I need "reset signal" in my signal generation? If I leave it out, there are no phase hops in my final signal.
Couldnt I just use your transformation from data to waveform and use the "Extract single tone information.vi" like in the picture?
I must admit, I have no idea, how to build a list,or do you mean another array?
Ah, ok now I get it with arrays,thanks.
cya,andi
08-23-2009 10:18 AM
Hallo Andi,
wenn Du die "Extract Single Tone"-Funktion auf das gesamte aufgenommene Sweep-Band anwendest, kann alles mögliche herauskommen - sinnvoller ist es deshalb, das Antwortsignal Schritt für Schritt zu analysieren.
Du erzeugst doch ein Stimulus-Signal mit bekannter Form: n Samples lang Frequenz 1, dann weitere m Samples die Frequenz 2, und so weiter...
Wenn Du ai und ao miteinander synchronisiert hast, weißt Du doch auch, welche erfassten Samples zu welchem Frequenz-Stimulus gehören - dementsprechend kannst Du doch mit der "Array SubSet"-Funktion immer einen Teil aus dem Waveform-Y-Array ausschneiden und separat auf eine "Extract Single Tone"-Funktion geben. Die detektierte Amplitude speicherst Du in einem neuen Array, und suchst daraus dann später das Maximum - dann hast Du den Index der erzeugen Frequenz, die an deiner Resonanzfrequenz am nächsten dran war...
Gruß,
Sebastian
08-28-2009 04:10 AM
Danke für die Tips, aber jetzt hab ich entnervt aufgegeben.
Habe alles in einer Sequenz einzeln zusammengestellt und ohne Array realisiert.
Das einzige Problem ist noch bei der Phasendifferenz, daß ich seltene Sprünge habe, aber sonst klappt alles ganz gut.
Wenn einer Interesse an dem Programm hat, Bitte schön:
Für Verbesserungen hab ich jederzeit ein offenes Ohr 🙂
08-28-2009 04:11 AM
Ups, i forgot the main program