How to desaturate integrator of a fast loop with a slow loop?

Hi Groups,
I am trying to stabilize a laser which has one slow input with a huge control range and a second input which is really fast, but has a
limited range only. I have an error signal which I feed with an analog PID-type controller directly to the fast input. The problem is that the integrator of the PID saturates after some time.
To desaturate the integrator (and to keep the fast input as close to zero for another reason) I can use the slow input. This is controlled by a DSP, so I do have some flexibility in how I handle that. Right now I use the output of the fast analog PID as the input to the DSP, and configured the DSP to be a pure integrator with a certain time constant.
/---\ /----------\ /-->|DSP|-->|slow | /---\ | \---/ | Laser|-----*----> optical frequency /-->|PID|---*---------->|fast | | | \---/ \----------/ | | /-----\ | \---------------------|error|<-----------/ \-----/
My question is if this is allowed by control theory. If I integrate the output of the PID with the DSP I have roughtly a double integrator in the slow branch. According to my (limited) understanding this gives a delay of 180 degrees, which would mean trouble. Would this lead to instabilities at low frequencies? And are there better solutions to desaturate the PID?
Thanks in advance, Bas
Experimental details: The process is an external cavity laser diode, which has both a fast (~1MHz) input to the laser diode current and a slow (~2kHz) input to a piezo that drives a grating. I obtain an error signal from a resonance of a Fabry-Perot cavity by using a fast modulation scheme (Pound Drever). The error signal has a zero crossing with a really steep slope at the point where we want to stabilize. The DSP is a DSpace 1104 which runs at a sample rate of 40 kHz. It can be programmed via Simulink.
I do have a background in physics with only one introductory course in control theory and some practical experience, so please be gentle...
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Bas, A bit of clarification would help us control types to understand your system better and maybe help you more effectively. For someone that understands optics, these questions may seem dumb.
Are you only attempting to control one variable, and is the error (roughly) linearly proportional to the weighted sum of the two handles, ie. error responds as (A * delta fast input + B * delta slow input)? I guess that the thing you're trying to control is wavelength.
The frequencies that you quote, are they roughly representative of the response times of the device to changes in that input? Are sinewaves actually involved, or are you just using frequency to indicate typical rates of change?
Based on the limited understanding I've gleaned from the OP, yes, the double integration could well cause problems, but the limited range of one of your inputs could also be troublesome, causing limit cycling. It looks like at least a Proportional + integral action in the slow path could give you a better response.
There are standard techniques for handling this sort of thing, the industrial analog would be the big valve/small valve situation for trimming reagent addition. If you can post a bit more info, happy to take a closer look, and I suspect a few others will as well. Regards
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

your
(roughly)
the
rates
double
your
trimming
Put your diagram into the correct font, most questions now answered. Still like to know about the sinewaves..... Later
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Sorry, forgot to tell that you have to view the diagram in a monospaced font.
Yes, I am indeed trying to control the wavelength, which is directly related to the optical frequency by wavelength = (speed of light)/(optical frequency), so these two are equivalent.
I also assume that the output is proportional to the weighted sum of the two inputs, so the optical frequency nu = k_fast*V_fast+ k_slow*V_slow+nu_0.
I did measure the transfer function of both inputs, and both have roughly a flat response up till the given frequencies (~2kHz and ~1 MHz), after which the response drops of as some higher order filter. There are no sinewaves involved, I just indicated the bandwidth of the two inputs.
The error signal is linear to the deviation from the optical frequency of the resonance we want to lock to: e = K*(nu-nu_resonance), and has a first order low-pass character of some 100 kHz.
Cheers, Bas
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@gmail.com wrote:

What kind of accuracy are you after? And what do you mean by the integral is saturating? Do you mean the PID has an integral limit which is being hit, or do you mean that the integral term is saturating the output excessively?
It might be best to totally remove the analog PID and replace it with a DSP implementation. That way you will have full control over it for the task you wish to use it for. PID loops are very easy to code, it's just the tuning that is the difficult part. And it sounds like you'll have just as many problems trying to tune the double loop situation.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Why not filter the high frequency control signal from the low frequency by putting a high pass/low pass filter pair with a cutoff frequency of say 50 Hz. You would need to be careful about the phase response of the the filters which would make the digital processor mentioned in an earlier post a great idea.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Bas wrote:

You could do as Bruce suggests and use PD control from the fast controller output. Assuming a good error signal you could avoid some stability problems by using PID control from the error signal from both outputs -- is your error wide-ranging enough to do this, or does it level out fairly quickly?
--

Tim Wescott
Wescott Design Services
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Bas wrote:

I don't believe that a PID in the secondary loop offers any advantage over a simple PI or even P. Since you want to control the inner loop's integrator, monitor it, rather than than the whole PID's output.
Jerry
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Yes, you would need a phase-advance to compensate - fairly easy to do so.
(1+sT1)/(1+sT2) where T1>T2 it's in all the control books. You will need a Bode Plot of what's going on.
McC
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.