LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to produce a Logarithmic Sweep (Chirp) over a Frequency Band

Daniel,

 

Yes. Look at the example near the bottom of my previous post. The correct normalization is f_normalized = f_real/f-S_s.

 

It appears that the VI works the same way in all the versions, but some documentation errors are present in each version.

 

Lynn

0 Kudos
Message 21 of 44
(1,795 Views)

My f1 and f2 were 0.0001 and 0.1 respectively but LV won't allow me to input the 0.0001 (it seems to be rounded to 0.00)

 

Thanks a lot for the visual aid on the loading the zero array. Nonetheless, I am not able to get the zero array to start at the end of the non-zero array of the chirp. What I have is a graph with a combination of both of them simultaneously (starting at the same time); I imagine that I need to append the Build Array but I am not sure how to.

 

One last thing. I wonder if you have any tips on performing some calculations. Basically, when I get the H(f), I want to use it to calculate the Impedance Z(f). My equation for Impedance right now is Z (f) = [ R * H(f) ] / [ 1 - H(f) ] where R is a constant Resistance. I have done this in MATLAB and it makes sense. R (contant, real) will muliplty H(f) {complex, array} by a real constant. In MATLAB, my H(f) was a matrix, so I just multiplied by R to get another matrix.

 

Thanks a lot,

 

Daniel

0 Kudos
Message 22 of 44
(1,789 Views)

Daniel,

 

Without seeing what you have tried, I am just guessing.

 

1. When you enter 0.0001, that is probably what is actually entered.  The display rounds it to 0.00.  You can pop up on the controls and select Display Format or Properties to change the way it presents data to the user.

2. You need to change the Build Array to Concatenate Inputs to get a 1D array out.  If you look closely at the two Build Array nodes in the imaage I posted in message 17 of this thread, you will see that the one on the left ouputs a 1D array and has an array-like input glyph. This is concatenate inputs mode. The one on the right has single boxes for the input glyphs and produces an produces an output 2D array for 1D array inputs.

3. The math functions in LV are mostly polymorphic, meaning that they will accept diffeent data types as inputs.  Multiply and Divide will accept arrays of real or complex numbers as well as scalars.  Just wire your data to implement the formula you want.  It should work fine.

 

Lynn

0 Kudos
Message 23 of 44
(1,785 Views)

Thank you very much. It seems like I have graduated to other problems. The graphs don't make sense yet. I wonder if you have any tips on the clock settings for the DAQ.

 

Presently, my sampling_frequency is 32k, number_of_samples is 2^13 (for the non-zero part of chirp). My f1 and f2 are 50Hz and 2kHz giving 0.0015625 and 0.0625 (after dividing by sampling_frequency).

 

I have attached what I have so far, just in case.

 

Here, I hope to get the Transfer Function and use it to get the Impedance with the equation Z(f) = { R * H(f) } / { 1 - H(f) }; my R = 10 K, C = 0.1 uF

 

Thanks a lot,

 

Daniel

0 Kudos
Message 24 of 44
(1,776 Views)

Hello,

 

As a follow up to my last post, I wish to say that I changed the Clock settings (for the two DAQs I'm using). I left it on 'Continuous' sampling but changed the 'Number of Samples' to exactly my number of samples for the chirp and also changed the clock 'frequency' to my Sampling Frequency (for chirp) in Hertz.

 

After this,the output voltage for the DUT had the same duration as the chirp. Notwithstanding, I have a lot of aliasing and the transfer function, impedance, etc. don't look right.

 

Thank you very much,

 

Daniel

0 Kudos
Message 25 of 44
(1,758 Views)

Can you post your current version along with some data.  Point out where you are seeing aliasing.

 

Lynn

0 Kudos
Message 26 of 44
(1,754 Views)

Thanks again. Please, give me a tip on how to get the data to you. I have attached input (chirp) and output voltages. Also, I have a picture taken of some of the plots (the top 2 are Chrip and H(f) from L to R, and the bottom 2 are Load Voltage and FFT Load Voltage from L to R).

 

Not shown here are the plots for the Impulse Response and Impedance. I worry about the fact that all the plots are against frequency and a lot of the ranges (x-axis) don't make sense to me.

 

Thank you,

 

Daniel

Download All
0 Kudos
Message 27 of 44
(1,737 Views)

Daniel,

 

Run the VI until you get it to a state comparable to what you posted in IMG0001...  Edit >> Make Current Values Default.  Save or Save As... with a new name (if you do not want to save your original VI with all the data). Then post the VI with the new default values.

 

What I will do then is remove the DAQ stuff and convert the graphs to controls.  They then become the sources of the data for any analysis.

 

The text files work also, but they do not give me any clue about what you have tried to do with the data.

 

Lynn

0 Kudos
Message 28 of 44
(1,733 Views)

Thank you. I am not exactly sure if I understand everything but I'll go to the lab and see what I can come up with and then ask questions.

 

I used the same VI I posted few days ago (also stating the frequencies in the write-up).

 

Thank you,

 

Daniel

0 Kudos
Message 29 of 44
(1,726 Views)

Daniel,

 

The key point is Edit >> Make Current Values Default...  after running the VI to get data into the indicators and controls.  Because no on one the Forum besides you has your hardware.

 

Lynn

0 Kudos
Message 30 of 44
(1,720 Views)