Today I did some measurements on the PID servo controller LB1005, I re-measured the OLTF, correction and error signal of the loop with the actual configuration of the system.
I put 50Ohm to A and -B inputs on the LB1005 and I set to zero the input offset. I set to zero the PI corner and the LF gain limit and I set to the maximum the gain. I acquired the spectrum and compared it with the one of last week where I had a low gain and PI corner 3kHz and LF gain limit 60dB. Fig. 1 show the two spectra. I measured the TF of the PID in this configuration as well and it is shown in Fig. 2. The magnitude is flat and it is around 37dB and the LB1005 datasheet says that the gain goes between +40dB and -40dB, i.e. this makes sense. For the measurement of last week the TF was from -20dB and -50dB. I computed the PID noise dividing the PID spectrum by the PID TF. Fig. 3 show the comparison between the PID noise with max gain (blue) and low gain (orange): we notice that the curve in blue is 3 orders of magnitude lower than the curve in orange which corresponds to the actual status of the system. This means that the fact that we operate the system with very low gain makes the PID noise a dominant source of noise.
The DC power at the PD has been set to 160mV. The demodulated signal has a Vpkpk = 360mV (A= 0.18 V/rad). I closed the loop setting the PID servo with PI corner = 3kHz, LF gain limit = 90dB and low gain (checking that it was optimized, because increasing it I was unlocking the loop). Fig. 4 shows the OLTF is shown: we have an UGF of 26.4kHz. The error (in blue) and correction (in orange) signals measured closed loop are shown in Fig. 5. The suppression factor is 100 at 10Hz.
I measured the noise of the LB1005 again in order to have a good noise measurement to include in the Simulink model. The PID TF measured down to 1Hz is shown in Fig. 6 and it is compared with the PID TF derived from the OLTF as PID(s) = OLTF(s) / [ P(s) * S(s) * A(s) ] as shown in the orange curve in Fig. 7. This time the two curves are in agreement. I measured the spectrum of the PID which is shown in V/rtHz in Fig. 8 (since I need to include this noise in V/rtHz in the Simulink model considered where it is added). In Fig. 9 the PID noise spectrum in V/rtHz is shown.
I derived the PID TF, both magnitude and phase from the OLTF of the whole system as:
freq_223 = np.array(freq_223)
mag_223 = np.array(mag_223)
phase_224 = np.array(phase_224)
OLTF_complex = 10**(mag_223/20)*np.exp(1j*np.pi*phase_224/180)
c = 3e8
L = 199.8
n = 1.44
tau = n * L / c
P = np.exp(-1j*2*np.pi*freq_223*tau)
A = 4.028e6 / (-1j*freq_223)
S = 0.18
F = OLTF_complex / (P*A*S)
F = np.array(F)
magnitudes = np.abs(F)
phases = [cmath.phase(element) for element in F]
phases_degrees = [phase * 180 / cmath.pi for phase in phases]
where freq_223, mag_223 and phase_224 are the OLTF data relative to the magnitude and phase. As Eric suggested, I considered the Plant TF = exp(-1j*2*np.pi*freq_223*tau) and I took into account a difference in phase also in the VCO TF = 4.028e6 / (-1j*freq_223).
The comparison of the Mag and Phase TF derived in this way (orange) what I measured yesterday (blue) is shown in Fig. 1.