LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Derivative to Instaneous Frequency

Solved!
Go to solution
I'm using Labview 8.0 and I want to add the derivative of a square wave to the instantaneous frequency of a sine wave at the same point in time. I've tried using the point by point vi's but they don't seem to work.

Does anyone have any suggestions?
0 Kudos
Message 1 of 21
(4,434 Views)

Can you post what you have tried so far?  Include some typical data saved as defaults.

 

The derivative of a square wave is infinite at the transitions and zero elsewhere, so it is not apparent what you will accomplish.  Perhaps you should explain why you want to do this also.

 

Lynn 

0 Kudos
Message 2 of 21
(4,433 Views)

Perhaps I should have clarified that it is an approximate squarewave obtained through a DAQ, not an ideal squarewave. I've been successful in using the derivative VI to obtain the derivative (a peak value of approximately .25 on the rising edge and -.4 on the trailing edge).

 

My issue is that I need to modulate the square wave with a sine wave whose instaneous frequency is biased by the derivative of the square wave at the same point. I am trying to model the response of an optical set up which behaves in this manner.  Using a point by point derivative vi the values returned are all approximately zero. By using the get value VI to sample the values of the derivative VI, at least I get correct data, but I am still unable to bias the instaneous frequency (it affects the overall frequency of the sine), and it is limited to only sampling on point at a time.

 

Give me a minute and I will post the waveforms which I am refering to.

0 Kudos
Message 3 of 21
(4,424 Views)

I've tried to post the LVM files, but I can't get them to work.

0 Kudos
Message 4 of 21
(4,416 Views)

If you are using Google Chrome or Safari you will have a hard time attaching.

Just to give you a heads up :smileywink:

Cory K
0 Kudos
Message 5 of 21
(4,408 Views)

Try changing the extension to .txt

 

Lynn 

0 Kudos
Message 6 of 21
(4,393 Views)

Attached you will find the Square wave unfiltere, filtered, and filter and modulated.

0 Kudos
Message 7 of 21
(4,382 Views)
Attached you will find the filtered and unfiltered derivative waveforms.
Download All
0 Kudos
Message 8 of 21
(4,381 Views)

Your waveforms came through.  Please post the VI you are using to do the modulations.

 

I still do not understand exactly what you are trying to do.  Are you frequency modulating the  sine wave?  I do not see a sine wave in the data files.  What frequency is the sine and what frequency is the square wave?

 

Lynn 

0 Kudos
Message 9 of 21
(4,373 Views)

Attached is the VI I have been using. I have tried both normal and point by point derivative VIs. The same goes for sine wave generating VIs.

 

Ideally I want a sine wave whose frequency increases when the derivative is positive and decreases when negative. Attached is a copy of a measurement of I made which is similar to the ideal I output I am looking to simulate.

Download All
0 Kudos
Message 10 of 21
(4,356 Views)