Consider a series of clocks. Perhaps, one or more of the clocks has some delay with respect to the others. There is no absolute reference. The objective is to know the relative phasing of the clocks, given a finite number of observations. There could be noise in the observations, though the noise would be small compared to the phase differences.
Question: How can you find out the 'most likely' phase differences of the clocks? Below, I have some dummy data that uses the complex plane to represent the clocks, and one solution, which works perfectly for what I want. I'm not really sure why it works, however. I'd love a good explanation of the SVD method, as well as any other methods that can do this.
Some data: here is a MATLAB script that will make some mock observations:
t = [0 1 2 4 8 9 10 12 13 18 19]/10; % time instances (observations)
lags = zeros(9,1);
lags(4) = pi/6; % give one clock a lag
lags(1) = -pi/3; % give another clock a lag
lags = cos(lags) + i * sin(lags);
% Initialise clock:
clock = zeros(9,length(t));
for t_iter = 1:length(t) %for each observation
for j = 1:9
startpt = cos(t(t_iter)) + i * sin(t(t_iter)); % essentially the observation time
noise_tmp = (rand(1)-0.5)/10; % generate some noise
noise = cos(noise_tmp) + i * sin(noise_tmp); % turn the noise complex
clock(j,t_iter) = startpt * lags(j) * noise; % add lags and noise to each clock
end
% Plot the results:
ax = subplot(3,4,t_iter);
polarplot(transpose([zeros(9,1) clock(:,t_iter)]),'s-')
set(gca,'ThetaDir','clockwise')
title(sprintf('Instance %g',t_iter))
end
A solution:
[l,s,r] = svd(clock);
phi = clock*r;
mode = phi/norm(phi,inf);
subplot(3,4,12)
polarplot(transpose([zeros(9,1) mode]),'s-')
set(gca,'ThetaDir','clockwise')
title('Solution')
