Page 1 of 1

Advice Needed -- RedPitaya for Laser Stabilization

Posted: Wed Feb 10, 2016 9:53 am
by Ubix2014
Hi guys,

We are going to use RP for experiments in quantum optics, in particular, we want to stabilize lasers and interferometers with RP. However, after a couple of weeks of playing with RP and compiling PS and PL codes, I realized that I need an advice from those having experience with RP or Zynq in general.

The idea of the stabilization system is to sample an input error signal, do some processing inside RP and output the control signal. As for the first step, I want to continuously sample a test signal, do some small math manipulation (scale, inverse) and output the resulting signal. The sampling frequency varies between kHz and MHz ranges
So, the main question is how to start doing this? What should be done on the PS and PL sides?

Re: Advice Needed -- RedPitaya for Laser Stabilization

Posted: Thu Feb 11, 2016 1:38 pm
by Nils Roos
Have you taken a look at the PID controllers in the Red Pitaya ?

They do basically what you are describing. Even if for some reason they are not usable for your purposes, they will show you how to approach the problem.

Re: Advice Needed -- RedPitaya for Laser Stabilization

Posted: Thu Feb 11, 2016 2:58 pm
by Ubix2014
Thank you, Nils! I completely forgot about the PID source code ...

Re: Advice Needed -- RedPitaya for Laser Stabilization

Posted: Wed Feb 24, 2016 4:00 pm
by Hawkes
Hi,

I also want to use the RP for pulsed laser stabilization (repetition rate & offset repetition rate to a second laser) and tried this today with the PID app which comes with the RP. I was quite amazed by the performance. We usually use an analog PI filter and doing the lock with the RP is much more convenient.
I think I will also try to set up custom code to do the PID is a customized app/remote control application so I would be interested how you solve this in your application.

Re: Advice Needed -- RedPitaya for Laser Stabilization

Posted: Sun Feb 28, 2016 9:15 pm
by tvdb
Hi,

The PID block in the PL is definitely a good starting point. However the actual controller architecture depends a lot on the kind of lock you're trying to design and on the actuators of your setup (laser current, piezo, external modulator, ...). An important point to consider is the capture range of your lock: if it is infinite such as for a noise eater or a temperature stabilization then using the PID block in the PL is straightforward, however if the capture range is more limited (for example when locking on a spectroscopic line or on a cavity using a Pound-Drever-Hall) then you might need some adjustments on the controller. Also adding a feedforward might prove useful if you require fast changes of the setpoint.

Overall, I think the controller itself should be implemented in the PL to benefit from the hard real-time of the FPGA. The PS might however prove very useful to tune the gains and the setpoints. For example you might use it to perform some auto-tuning by characterizing the dynamical behaviour of your system in combination of a criteria (for example Ziegler–Nichols). It might also be used to automatically bring the laser into the capture range of the lock.

Re: Advice Needed -- RedPitaya for Laser Stabilization

Posted: Sun Feb 28, 2016 10:00 pm
by jeanminet
Hi Ubix,

If you're not comfortable with Verilog, you can try to build your PID module graphically using Xilinx building blocks :

Image

Re: Advice Needed -- RedPitaya for Laser Stabilization

Posted: Wed Mar 02, 2016 8:51 am
by Ubix2014
HI jeanminet,

Thank you for the advice. However, I am planning to use Verilog as it will make all the things easier.