From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lock-in amplifier VI to sideband

Hi Lynn,

Thanks for clarifying the sampling issue, indeed that's what seemed to me to be a major issue performing all of these operation electronically. Basically, we can probably not filter them electrically and output only the one sideband to an external lock-in measurement device. The carrier should be suppressed, but it seems like it's possible it will leak through to complicate matters worse. I guess realistically both sidebands are going to output to the reference input of the external lock-in and I'm not sure which one the lock-in will see in the end, so that's what we are going to try out since all the electrical stuff is cheap enough to just "give it the old college try".

So, this has led me to another alternative: input both the 280 KHz and 260 Hz signal SEPARATELY into a DAQ/NI device of some sort, then perform all the mixing and subsequent operations programmatically in labVIEW. Is it not possible to resolve these two sidebands programmatically after mixing them in labview too? Sorry, I think my first post was a little confusing, especially we actually want the sideband of the 2nd harmonics of 280 KHz.

The 280 KHz signal is generated from frequency generator built into an AFM (drives the tip). It yields a very nice sine wave. The other signal is presently a square wave, but I think we can make it a sine wave (260 Hz). Thanks for your input! Really appreciate all the advice from you guys.
0 Kudos
Message 11 of 30
(1,323 Views)

I will have to think about that a while. My first impression is that it will not work, but I also think that there might be something you can do.

 

Lynn

0 Kudos
Message 12 of 30
(1,319 Views)

McDuff,

 

Thanks for your input, I think your ideas are really useful and I appreciate the discussion and tips for things to try out.  I will try out this mixing in labview and subsequent filtering in labview.

 

 However, the signal I want to mix orginates from other instruments, so they would have to be acquired with a DAQ device and THEN mixed within labview, so the function generator doesn't seem useful.  The tricky part is that there are MANY different names for what I want to do:  Quadrature Mixing, SSB (single side band) modulation, frequency mixing (which yields actually both sidebands), and more.  Another issue I am running into is that if I want to do this electronically outside of labview, most stuff is for the MHz and GHz range and it has been a real headache to find components for KHz and Hz that do the same  thing (they have different names often for these different frequences as implied above).  

 

I feel there must be someway to do this because Zurich Instruments makes a Lock-in amplifier that does this SSB (cost $30K and is way over our budget unfortunately).   Anyways, I really like the idea of trying to use a DAQ device to acquire these two frequencies and mix them (and fitler to the sideband) in labview, then somehow output the filtered product to our lock-in amplfier.  I will contact someone at NI directly to get some input, then report back here to post what I figured out.  This is really making my head spin!  Thank again McDuff!

 

-Eric 

0 Kudos
Message 13 of 30
(1,292 Views)

Eric,

 

Good luck with your set-up, it sounds interesting. Thanks for pointing out Zurich Instruments, did not know they existed, will need to save some money. 🙂

 

Anyway, if the signal you want to mix originates from other components, it will be hard/difficult to input those signals into a DAQ, digitize them, mix the digitized versions, then filter, and output the filtered reference signal. I have no idea what the lag would be between input and output, that is, your filtered output will always be lagging behind your two master frequencies. If your frequencies are ultra-stable, this should not be a problem, but if they drift on the order of the time lag, it's a problem.

 

My idea was use a set of NI function generators that are phased locked together to control everything. If your other instruments could take an external input then it may be feasible.

 

For example,

1.) Function generator 1 output Sin[ 2 pi f1 t + q1 ]

2.) Function generator 2 output Sin[ 2 pi f2 t + q2 ]

 

Since you generated these signals in LabVIEW, that is, you did the math, then take signal 1 and square it, you get

Sin[2 pi (2f1) t + 2 q1] + DC, Filter out DC signal - simple subtraction in LabVIEW

Then take that squared signal and multiply by signal 2, you get a side band of

Sin[2 pi (2f1 + f2) t + (2 q1+ q2)] + other harmonics (You would need to filter these out)

That is your Lock-in Reference, all of your other frequencies are phased synchronous with this reference. All your math would be done before your outputted these points to the function generator, thus you have no lag, and phase synchronous frequencies. Your third function generator would output the mixed signal to the lock-in. That is why I was wondering whether NI had devices with four outputs, that could be phased locked. (Outputs greater than 1 seem to come in powers of two.)

 

Have a good weekend.

 

Regards,

mcduff

0 Kudos
Message 14 of 30
(1,284 Views)

A completely different approach would be a very narrowband analog filter on the desired sideband. It is not so difficult to make very narrowband (<100 Hz, 6 dB) quartz filters. However, in case of frequency or temperature drift they introduce phase drift. You would have to order high-quality custom quartz resonators to make such a filter.

 

Cheers

Edgar

0 Kudos
Message 15 of 30
(1,250 Views)

Eric,

 

I am getting some smoke from my thinking cap.

 

The image shown in your original post and your responses indicate that the 280 kHz signal is sinusoidal and the 260 Hz signal is square. From the image it appears that the 260 Hz signal is generated by the chopper. If so, it is only approximately square due to the finite beam size and the time it takes a chopper blade to pass through the beam.  The image also shows a phi2 adjacent to the mirror in the chopper path.

 

1. Is phi2 the phase you want to measure? What causes the phase to change?

 

In message 4 you indicated that you need both phase and amplitude information. You also introduced a 192 Hz frequency into the discussion. However, you really did not answer my question about which original signal's phase and amplitude needs to be measured. It seems unlikely that the chopper signal amplitude will vary: It should be full strength or zero outside the transition regions.

 

The 280 kHz signal from the AFM seems more likely to me to contain the information you want, probably both in phase and amplitude.  I have not worked with an AFM but understand the basic concept. You refer to the 280 kHz signal as "a really nicde sine wave."

 

2. What non-linearity generates the harmonics of the 280 kHz signal? How strong is the 840 kHz signal (and sidebands) compared to the 280 kHz signal?

 

Several times in this thread you have commented that "someone else" has told you to do things this way.  I have been working with modulated signals of various kinds for over 40 years and some of the things suggested to you make little sense to me. For example, what is the basis for the claims that the signal to noise ratio is better on the sideband of a harmonic? Usually the additional non-linearities and extra processing stages introduce more noise, not less.  

 

3. Is someone else doing what you are trying to do and have they published their methods?

 

I have some ideas I want to investigate a little more, but I need a better understanding of what you ultimately are trying to measure - with respect to the AFM, not the various modulated signals we have been discussing.  I guess what I am saying is I would like to take a step back and look at the underlying goals rather than to focus on a particular technique. Maybe there is a better way.

 

Lynn

0 Kudos
Message 16 of 30
(1,232 Views)

ynn,

 

 

First, sorry for the confusion.  It may help to take a step back and just explain more what we are doing.

 

1. Is phi2 the phase you want to measure? What causes the phase to change?  

 

As you suggested later in your post, we want to measure the signal generated by the 280 KHz tapping of the AFM tip.  We using the reference path containing the chopper as an inteferometer to measure phase and amplitude of this signal.   This amplitude and phase generated at tip changes spatially while the sample is scanned (across the image that is generated), which is exactly what we want to measure.  During the measurement  Phi2 the reference mirror  in the reference path and it remains stationary while the tip scans a whole image (128x 128 data pixels for example in most cases) so it does not oscillate/move while this tip generated image signal is obtained.  Once the data is collected, we change this position by one step, then it remains stationary again for a whole other image.  This process is repeated to obtain a series of images.  In post processing this allows us to obtain BOTH phase and amplitude point-by-point across all the images because essentially an  interference pattern is generated from the reference path and the tip generated signal.  

 

In message 4 you indicated that you need both phase and amplitude information. You also introduced a 192 Hz frequency into the discussion. However, you really did not answer my question about which original signal's phase and amplitude needs to be measured. It seems unlikely that the chopper signal amplitude will vary: It should be full strength or zero outside the transition regions.

 

The 280 kHz signal from the AFM seems more likely to me to contain the information you want, probably both in phase and amplitude.  I have not worked with an AFM but understand the basic concept. You refer to the 280 kHz signal as "a really nicde sine wave."

 

As stated above, we are interested in the phase and amplitude of the signal generated from the tip, which you correctly guessed.  The chopper's only purpose is to modulate the reference beam to create the side band.  Sorry for not clarifying, indeed there are several "amplitude" and "phase" (oscillations) going on here.

 

2. What non-linearity generates the harmonics of the 280 kHz signal? How strong is the 840 kHz signal (and sidebands) compared to the 280 kHz signal?

 

The first part is a very good question.  The harmonics are generated I believe from the dampening of the tip as it approaches the surface (it is "tapping" and being dampened to a certain set point that is maintained during scanning.  The 840 KHz signal is much weaker than the 280KHz, but the signal to noise is much better in the 840 KHz signal, so that is why we measure the signal at this harmonic (usually 2nd or 3rd harmonic).  

 

Several times in this thread you have commented that "someone else" has told you to do things this way.  I have been working with modulated signals of various kinds for over 40 years and some of the things suggested to you make little sense to me. For example, what is the basis for the claims that the signal to noise ratio is better on the sideband of a harmonic? Usually the additional non-linearities and extra processing stages introduce more noise, not less.  

 

I have a good understanding of the benefits of this sideband measurement and perhaps have shown to much modesty:  No one told me do it this way exactly (that's not exactly what I was trying to say). I saw this in the literature and through discussions with collaborators agreed we need to upgrade our setup to this scheme.  This is the way that people in the field are starting to make these measurements, there are plenty of references in the literature for this technique.  In many cases people are modulating the reference beam by oscillating the reference mirror instead of chopping the beam.  We are leaning towards chopping the beam since it seems easier to start out with.  Either modulation of the reference path should create these sidebands and either should effectively give one better data for this measurement.   The signal to noise is better at higher harmonics because there is less background noise from stray reflections emanating from the top of the tip and other places away from the sample surface (which I think isn't as strong at higher harmonics probably because it doesn't experience this dampening as much as the signal from underneath the tip, thus maybe not generating as much nonlinearity and harmonic components).  Modulating the reference beam helps remove background noise from other stray reflections and light that is interfering with the signal.    This is my understanding from very thorough discussions and what I have seen in the literature.  Hillenbrand is a key pioneer of this technique for this type of measurement.  I see your point that it would not be advantageous is many other cases, but it is here.   



I have some ideas I want to investigate a little more, but I need a better understanding of what you ultimately are trying to measure - with respect to the AFM, not the various modulated signals we have been discussing.  I guess what I am saying is I would like to take a step back and look at the underlying goals rather than to focus on a particular technique. Maybe there is a better way.



There very well might be a better way, which is simpler as well, and someone with your experience is definitely capable to possibly find a better way.  I have experience with signal modulating/lock-in techiques, but would appreciate alternate suggestions and input as I don't have 40 years experience.  All we can say definitively is that this is better than not modulating the reference leg and doing everything else the same.  I would greatly appreciate other suggestions, but other peoples suggestions shouldn't be dismissed so quickly either and warrant being considered.

 

-Eric

 

0 Kudos
Message 17 of 30
(1,220 Views)

Eric,

 

Thank you for the thorough explanation.  I have seen many people asking (not only here on the Forums but in my work as well) about how to do something, when what they really want is something quite different. 

 

I am not sure I understand the physics of the tip harmonic generation, but it seems that it is well established. That was one of my concerns - that you had been misled or confused about the presence of the harmonics.

 

Now that I have a better overall understanding, I can investigate my other ideas a little more effectively. I will post back in a day or two.

 

Lynn

0 Kudos
Message 18 of 30
(1,216 Views)

Eric,

 

Quick update. I have made some progress in my thinking, but am not quite ready to post the results. I wrote down the assumptions I made. If any of these are incorrect, let me know so I can adjust.

 

1. The AFM amplitude and phase modulates the high frequency signal.

2. The amplitude and phase modulating signals are at least partly uncorrelated.

3. Phi2 from the mirror behind the chopper does not change during "meaningful" high frequency AFM measurements.

3.a. AFM modulation may occur and change while Phi2 is changing.

4. The chopper has intervals where the beam passes completely or is blocked completely and the transitions between those states are relatively short and continuous.

5. Harmonics of the high frequency signal are generated in the AFM, not in the chopper or detector.

5.a. Amplitude and phase of any harmonic contains the same information as the amplitude and phase of the fundamental. The information may be encoded differently in each harmonic. (For example: a1 <> a2 or theta1 <> theta2)

5.b. The relationships between encoding of information into the phase and amplitude of harmonics is known. (For example:a1/a2 = constant or theta2 = 2*theta1 + constant)

 

Lynn

0 Kudos
Message 19 of 30
(1,182 Views)

Hey Lynn

 

I can just clarify some of the assumptions you posted to make sure you are on the right track.  Most seem correct and I just thought it would be good to clarify a few points (see bolded text that I added):

 

1. The AFM tip amplitude and phase modulates the high frequency signal, then with interfere with this signal with a reference beam that is also modulated.

2. The spatially varying amplitude and phase modulating signals (modulated by the AFM tip) are at least partly uncorrelated (yes, and in the end it's a amplitude image and a seperate phase image that is the final data we want, they are mostly uncorrelated as well).

3. Phi2 from the mirror behind the chopper does not change during "meaningful" high frequency AFM measurements.  It does not change when one of the multiple images is collected, but it is changed incrementally for each image because it is part of the interferometer that helps us derive the amplitude and phase across the images (in a point-by-point fit).

3.a. AFM modulation may occur and change while Phi2 is changing.  AFM tip frequency does not change when each image is collected at each Phi2, but certainly the signal will change as you change phi2 because you are interfering the reference beam at a different phase with the signal.

4. The chopper has intervals where the beam passes completely or is blocked completely and the transitions between those states are relatively short and continuous.  Yes, effectively it is like a sqaure wave.

5. Harmonics of the high frequency signal are generated in the AFM, not in the chopper or detector.  Yes, at least I am almost 100% sure this is correct.

5.a. Amplitude and phase of any harmonic contains the same information as the amplitude and phase of the fundamental. Yes, this is correct and is a very good point.  The information may be encoded differently in each harmonic. (For example: a1 <> a2 or theta1 <> theta2)  I am not sure what you are trying to say here, but ulitimately it is true that the different harmonics have the same information and should theoretically give the same sort of contrast in the amplitude and phase images except practically there is different levels of signal to noise and background interference, so they will practically be different only for that reason.  

5.b. The relationships between encoding of information into the phase and amplitude of harmonics is known. (For example:a1/a2 = constant or theta2 = 2*theta1 + constant).  I think I see what you are saying here.  Basically, the amplitude at the fundamental vs. the harmonic are proportional for all pixels spatially across the final amplitude image.  I think in the end, it should give the same sort of spatially varying phase contrast/difference (I am not sure but  absolute phase may be different between the fundental and harmonics but the difference in phase from pixel 1 and pixel 2 should always be the same).  

 

Hope that helps clarify a few things.  It seems like you are mostly correct in your understanding of the experiment though.

 

-Eric

0 Kudos
Message 20 of 30
(1,159 Views)