LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

laser frequency stabilization using pid controller

Does anyone know of an example where the PID controller in LabVIEW has been used to stabilize the output frequency (wavelength) of a diode laser? A PID module for our laser can be purchased, but I'm hoping to try a LabVIEW-based system. Ideally, we'd like the long-term (minutes) variation of frequency to be a few MHz.
Message 1 of 20
(5,499 Views)

Hello, 

 

Did you solve your problem? because I have almost the same now, I have to stabilize a laser with a PID on labview but it doesn't seem to work very much.

Actually I've already done my PID and I'm using a lock-in amplifier as well but I'm not sure about the assembly.

I think it may be the problem.

I need some help 😕 Has anyone ever worked on such a project?

0 Kudos
Message 2 of 20
(4,923 Views)

suethechmist has not logged into the Forums since 2007 so you will probably not get a reply.

 

To get good answers you need to ask good questions.  "...but it doesn't seem to work very much." is not very infromative.

 

1. What signal are you using as the input to the PID VI?

2. What are you doing with the output of the PID?

3. How are you measuring the laser frequency/wavelength?

4. How are you controlling the laser frequency/wavelength?

5. What role does the lock-in play? Are you using  a hardware lock-in or are you implementing it in LV?

6. Tell us about the interfaces between the LV program and the laser equipment: What DAQ devices do you use? How do you communicate with external instruments - GPIB, RS-232, TCP/IP, other? 

7. What quantitative indications do you have for the evaluation of how ell it works?

 

Lynn

0 Kudos
Message 3 of 20
(4,916 Views)

First of all, the communication between the instruments and LV is done via GPIB.

I have the hardwares as well as their drivers on LV.

The lock-in amplifier is necessary to have the error signal and to remove the noise.

Appearently, the easiest way to stablize a laser is to fix the output of the lock-in amplifier to 0.

The processed variable and the setpoint of my pid are the output of the lock-in and 0 respectively.

The output of the lock-in is a DC signal.

The output of the PID is directly conneced to the laser controller as a feedback.

That's the circuit we set. I'm not sure of its efficiency, that's why I'm asking for your help and since it's the first time that I use these kind of instruments I'm not familiar with them.

I don't even know if this is possible, I mean, to put as inputs to the PID, other ouputs than the ones of the device we want to correct.

I used to work with PIDs but I'm not used to put an intermediate device between the PID and the instrument I want to stabilize.

I'm not sure if I'm clear enough, excuse me if not, I will try to attach a schematic of this setup, maybe it will help you understand me better. 

 

0 Kudos
Message 4 of 20
(4,901 Views)

here is a setup which lookslike mine. I hope it's gonna clarify things.

 

0 Kudos
Message 5 of 20
(4,900 Views)

OK. I have worked with similar systems.

 

From the block diagram of the setup it is not clear which parts are instruments and which are custom parts.  The lock-in is apparently a separate instrument. The PID gets a voltage signal from the lock-in and its output goes to the laser controller.

 

What about the PID? is it implemented in LV or is it some kind of hardware? If LV, how does the signal voltage get into the software and how does the PID output get converted to a signal for the laser controller? If it is hardware, what does the LV program do?

 

The biggest concern I would have is if any of the signal path has to be handled over GPIB. Often GPIB communication cna be quite slow - not the raw data rate - but the response time of the instruments.

 

Lynn

0 Kudos
Message 6 of 20
(4,887 Views)

The PID is implemented in LV. I've done a simple PID by myself, I will attach the VI.

Yes, the output of the PID goes directly to the laser controller as shown in the VI below.

I didn't convert anything, I thought that the laser driver does everything internally. Otherwise, how can I convert it?

All the communications are handled via GPIB, I don't have a choice, that's what they have. Do you suggest something else?

 

 

0 Kudos
Message 7 of 20
(4,876 Views)

I had assumed a different hardware configuration.

 

With the laser controller communicating via GPIB the feedback will be much slower than I was expecting. How long does it take for the SR5210 to take one reading and for the laser controller to update the current when a new value is written?  GPIB instruments can be quite slow. Tens to hundreds of milliseconds are not uncommon to respond to a command. That time constrains the maximum possible loop rate and limits how fast the feedback can change the laser. Long delays in a feedback loop can make it very difficult to stabilize.

 

Some things I spotted in your VIs:

1. You should probably move the 3 Configure VIs for the lock-in outside the loop.  None of the values ever change so there is no need to reconfigure on every iteration (and waste the time it takes for the instrument to do so).

2. When you write data to the file, you add a 1 second delay in updating the feedback (in addition to the lock-in read delay). Can that cause a problem for your system? If it does, move the file write to a parallel loop. Look at the Producer/Consumer template for a way to do that.

3. In last PID.vi you probably want uninitialized shift registers so the VI "remembers" the values from the previous call.  If you need to set the values to zero when the main program starts use the First Call? primitive to detect that situation.

4. Try to keep the data flowing from left to right. The reversed wires make it hard to read the block diagrams.

 

Lynn

0 Kudos
Message 8 of 20
(4,865 Views)

thank you for your accurate response, I will make these changes. 🙂

Do I need a conversion ratio V/I between the output voltage of the PID and the input of the laser driver?

My problem now is the accuracy of the current sent to the laser controller in the feedback.

My system is very oscillating when I increase the sensitivity of the lock-in amplifier, it's maybe because the precision of the lock-in amplifier is not enough I mean that the laser controller needs a more precise oscillator, I don't know,  how can I adjust this?

You told me that you worked with this kind of system, was your stabilization successful? How did you handle it?

 

0 Kudos
Message 9 of 20
(4,859 Views)

The input to the PID is the process variable which is the output of the lock-in. The lock-in is processing a signal which is related to the frequency of the laser. Is the set point in frequency units or something else?

 

The output of the PID goes to the current input of the laser controller.  The only scaling in the PID is based on the values for Kp, Kd, and Ki. 

 

So it seems likely that some conversion will be appropriate. Do you know enough about your optical process to have a value for the frequency change per volt of output of the lock-in? Do you know the frequency change per amp of laser controller input? You should be able to combine those values to determine an appropriate scaling factor.

 

You used "accuracy" and "precision" in successive sentences and I wonder if you have them confused. Accuracy refers to how close to the actual value a measured or commanded value is. Precision essentially refers to the number of significant digits in a value.

 

You have set the precision of the value written to the laser controller to 2 digits after the decimal point. If you want more precision (an if the instrument supports it), you need to change the format string.

 

Increasing the sensitivity of the lock-in is the same as increasing Kp in the PID. At high enough values most systems oscillate.

 

My first concern with oscillation would be the time delay. What are the time constant settings on the lock-in? How long does the laser controller take to respond to a command over the GPIB?  Time delays in a feedback system make the system very difficult to stabilize.

 

The system I worked on never worked completely to my satisfaction. It always required a significant amount of manual tuning.

 

Lynn

 

0 Kudos
Message 10 of 20
(4,838 Views)