# Tuning a PID with extraneous noise on the error signal

• Twigg
In summary, the conversation discusses the issue of measurement noise in a servo loop to stabilize a parameter. The main question is whether there are tricks or limits to compensate for this type of noise, and the conversation delves into the use of PID control and considerations for laser power measurements. There is also a discussion on the importance of accurately measuring the parameter and minimizing noise in the measurement process.
Twigg
Gold Member
TL;DR Summary
Are there sneaky tricks for compensating for measurement noise in a PID servo?
Hi all! Forgive the sloppiness of this post, I'm on the road.

Suppose you have a servo loop to stabilize parameter X. The issue is, when you measure X, you introduce some measurement error (let's say its white noise for the sake of argument). The noise causes a potential problem: since the error signal now contains some noise signal that is uncorrelated with X, the servo will end up adding this noise to X. I feel like this is a situation which must have been studied extensively. Is there a standard limit on servo performance in the presence of this kind of measurement noise? Are there fancy tricks to get past this limit?

For a simple example, X might be laser power as measured on a photodiode. The servo controller reads the photodiode voltage and adjusts some laser settings to correct the optical power. Suppose the photodiode voltage is DC + white noise (the white noise being shot noise from the diode, thus uncorrelated with the optical power).

My specific case is stabilizing residual amplitude modulation (aka RAM) for an electro-optic modulator (EOM). I can get into the nuts and bolts if you like, just let me know in a reply. Alternatively, here's a paper: https://arxiv.org/abs/1710.08575

How much D have you set in your PID? The integral action I is intrinsically a low pass filter. Therefore it attenuates all high frequency components of noise.

Derivative action D on the other hand amplifies high frequency signal. If D is high, then you may need something to remove the noise first.

But better still, set the D gain to zero. In almost all control loops, PI control is adequate. The D portion is needed only in exceptional cases.

You should also find that PI is must easier to tune than PID.

DaveE, Bystander and Twigg
Twigg said:
Summary:: Are there sneaky tricks for compensating for measurement noise in a PID servo?
Is there a standard limit on servo performance in the presence of this kind of measurement noise? Are there fancy tricks to get past this limit?
The low-pass loop filter, after the difference detector, needs to be long enough in time to reduce the effects of the noise.

DaveE and Twigg
I have a bad habit of saying PID when I mean to say PI. No derivative gain in my case. That was insightful though, thanks anorlunda.

Based on these replies, am I right to think that uncorrelated 1/f noise would pose a more significant problem than uncorrelated white noise?

Edit: after a little thought, I realized my question could be answered by adding D gain. However, am I right to think that the worst case scenario is when your uncorrelated noise (the photodiode noise in the example above) has the same spectral density as fluctuations in the parameter to be stabilized (laser power fluctuations in the example above)?

Not sure about 'worst,' but that is a classic 'how do I pick the pepper out of this fly-dang?'

I'm not familiar with the specifics of your situation, but I have found that a useful first step is to ask myself:

How tight does my control of the process variable need to be?
How fast can it reach that limit?
What is the nature of the real PV error (drift / random...).

These answers will inform the rate at which your loop needs to run and the required tuning parameters. Faster isn't necessarily 'better.' Depending on the answer, it may afford time to filter your process variable or improve the measurement accuracy - you can make a few precise corrections instead of adding to the mayhem by continuously jerking the control variable around.

I am a little confused as to how adding D gain will help anything. In my experience the typical method out of long term noise is chopping and synchronous detection.

Twigg, berkeman, Baluncore and 1 other person
The problem you describe is fundamental and ever-present. A servo can only control the measurement of the parameter(s) of interest, not the actual parameter(s). As others have said, you will want to make sure that the servo is effective only over the frequency ranges you need. Be clear about what you need the servo to actually do, don't have a 10KHz bandwidth if you only need 10Hz stabilization. Once you have a good sensor, you need to process that signal carefully (shielding, filtering, etc.), amplification as close to the sensor as possible is always a good idea (if you can't make downstream noise injection smaller, make the signal bigger). Sophisticated systems can use the statistics of predictable noise to help eliminate them with Kalman Filtering. But this is light-years beyond PID systems.

So basically, you are left with engineering the measurement and processing of what you want with the least amount of noise. Things like synchronous detectors can help if you only need very narrow bandwidth. In my experience, mostly designing feedback to control very low noise high power lasers, where the noise spec is a key marketing parameter, nearly all of our effort was in three areas: Make an intrinsically low noise machine; design the best sensors that faithfully measure the parameters you need; and don't introduce noise once you have the sample. Once you've add noise into the measurement within the frequency ranges you care about, it is very difficult to fix it. We also put a lot of effort into measurement setups to evaluate the beam noise for verification outside of the controllers.

In practice it's not really as much a servo question as a measurement question, IMO.

Twigg and Dullard
Mods: Please create a 'mic-drop' Icon, and append it to post #7.

Twigg
Also, a couple of very laser specific tips:

1) Think about what you really mean by laser power. The distribution of power within the laser beam isn't constant in space, both the transverse profile of the beam and the lab (or sensor space). A change in the laser TEM is noise to some users (for sensitive applications TEM00 is the only acceptable beam), others don't care. A change in beam pointing (i.e. moving on the target) is another sort of noise. The common definition in industry is the beam power in the entire beam, what ever it does or wherever it goes, otherwise the definitions get complicated and application specific.

2) Detectors, especially semiconductors, don't have a uniform sensitivity across the detector surface. No one talks about this, but it's real for sensitive systems. I designed a laser alignment servo to maximize beam power, and for our first attempt with a beam projected onto a photodiode, we found that it worked great at maximizing the measured power, but that also included steering the beam to the most locally sensitive spot on the detector.

3) Pay attention to other influences on the detector and electronics. All of our lasers that used photodiodes (except a few green lasers) had an oven to control the detector temperature, for example. Although this is mostly about DC power measurement, because, you know, temperature...

4) Beam profiles don't have a definite edge. If your detector clips off the wings of the beam, you will create coupling between beam pointing and detected power. You will also create noise in a multi-mode beam as power shifts between modes.

5) Don't discount thermopile detectors if you can tolerate low bandwidth, they are really good at integrating power over both space and time. This is what many lab power meters use. They are also cheap.

6) So, while everyone thinks about this as an electronic problem, it also requires good geometrical optics design to get a good beam sample. I think the best method is to use a diffuser (diffuse reflection is my favorite), just as a way of mixing up all of these spatial to power coupling issues. More distance from the diffuser to the detector is good, but hard to achieve in a small machine. This is one reason our lab/production detectors were always a bit better than the onboard detectors. You can't fix a pointing or mode change by changing the PS output; you'll just create another problem. Your sensor will be happy, but your customer won't.

7) Integrating spheres are great for academic lab work, but they need to be big to work well. At my company (one of the biggest, highest tech, laser manufacturers back then) we maybe had 2 or 3 in the whole building. For scale, I would guess that if you asked how many lasers were in that building, I'd say maybe 1000, although I'm 100% sure no one would actually know. They are too big and too expensive to put in instruments for sale. When they were used it was more like a calibration standard, rarely used by engineers to test their other detectors. BTW, they are also diffuse reflectors used to eliminate spatial factors.

Last edited:
I was taught by my mentor "for noise, go to the source."

Twigg and DaveE
dlgoff said:
I was taught by my mentor "for noise, go to the source."
Yes! And problems avoided are always better than problems solved, when that's possible.

@hutchphd you're right about D gain, I think I mixed myself up. Synchronous detection is a good idea. The specific measurement I'm working with is a heterodyne, measurement so it's already synchronous. (Sorry, I know its a pain when everything isn't laid out off the bat. Just didn't want the first post to be long and have no one read it.)

@Dullard that makes sense. I set the servo bandwidth to the minimum it needs to be to deal with the expected fluctuations. Just wasn't sure but feeling more confident now

@DaveE Thanks for all the info! I hear you about it being a measurement problem at heart. That was my gut reaction too, but hearing your side of things I'm convinced. I was a little surprised because one of the papers I read had a 200kHz bandwidth servo working on noise that cut off at 1kHz. I'm going to ask the authors directly about that.
Also, I hear you about pointing and transverse mode issues. I'll spend some time investigating those when I get back into lab. The spatial mode should be pretty clean because it came out of a fiber, but I've never actually measured the beam diameter or compared it to the photodiode sensor area (I just joined the project and inherited someone else's work.)
And I hear you about detectors having sensitive spots, but for me the control variable is DC bias voltage to the fiber EOM, so beam pointing is a constant.
Its a long story, but I don't have a photodiode outside the control loop yet. All I can see is the noise floor on the monitor signal with the servo on drops below the photodiode's base noise floor (as seen on the monitor signal), and that tells me the servo is adding noise to the control variable.

@dlgoff thanks for the quote! I can see where its coming from.

hutchphd and dlgoff
Twigg said:
I was a little surprised because one of the papers I read had a 200kHz bandwidth servo working on noise that cut off at 1kHz.
There is a huge difference between noise in the sensor or reference input path and noise added after the error amp function. Feedback is great at reducing noise injected "downstream". Once you have a clean error signal, you want a powerful servo to modulate that "cleanness" onto the output. For good performance you want high loop gain at the frequencies of the injected noise, and that nearly always means high bandwidth too.

I think I might've spoken mistakenly. What I meant to say is the noise injected downstream of the servo was bandlimited up to 1kHz. The input path noise (upstream noise) was shot noise. In this configuration, they chose 200kHz of servo bandwidth.

## 1. What is a PID controller?

A PID (Proportional-Integral-Derivative) controller is a type of feedback control system that is commonly used in engineering and science. It continuously calculates an error signal based on the difference between a desired setpoint and the actual output of a system, and uses this signal to adjust the control inputs in order to minimize the error and bring the system closer to the setpoint.

## 2. How does extraneous noise affect PID tuning?

Extraneous noise, or any unwanted disturbances, can significantly impact the performance of a PID controller. It can cause fluctuations in the error signal, which can lead to unstable or oscillatory behavior in the system. This can make it difficult to accurately tune the PID parameters and achieve the desired control response.

## 3. What are the challenges of tuning a PID with extraneous noise on the error signal?

One of the main challenges of tuning a PID with extraneous noise is finding the right balance between stability and responsiveness. Too much noise filtering can lead to a sluggish response, while too little can result in instability. Additionally, the noise characteristics may change over time, making it necessary to regularly retune the controller.

## 4. How can PID parameters be adjusted to compensate for extraneous noise?

There are several methods that can be used to adjust the PID parameters and compensate for extraneous noise. One approach is to increase the integral and derivative gains, which can help to reduce the impact of noise on the error signal. Another method is to use a low-pass filter to smooth out the noise before it reaches the controller.

## 5. Are there any alternative control strategies that can be used instead of PID in the presence of extraneous noise?

Yes, there are alternative control strategies that may be more suitable for systems with high levels of extraneous noise. These include adaptive control, which can adjust the control parameters in real-time to adapt to changing noise levels, and model predictive control, which uses a mathematical model of the system to predict and compensate for disturbances.

• Atomic and Condensed Matter
Replies
2
Views
205
• Electrical Engineering
Replies
1
Views
1K
• Electrical Engineering
Replies
7
Views
841
• Atomic and Condensed Matter
Replies
7
Views
2K
• Electrical Engineering
Replies
9
Views
2K
• Atomic and Condensed Matter
Replies
6
Views
979
• Electrical Engineering
Replies
11
Views
2K
• Classical Physics
Replies
8
Views
2K
• Electromagnetism
Replies
3
Views
2K
• Introductory Physics Homework Help
Replies
2
Views
1K