if true
data = xlsread('RapportLijn1Waswater1.xlsx','blad1','B2000:D5000');
Ts = 1;
Fs = 1/Ts;
Input = data(:,2);
Output =data(:,1);
LMN = data(:,3);
Fmax = Fs/2;
[TF_tfe, F_tfe]=tfestimate(LMN,Output,[],[],[],1/Ts);
A_tfe=abs(TF_tfe);
Ph_tfe=unwrap(angle(TF_tfe));
W_tfe=2*pi*F_tfe;
A_tfe_dB=20*log10(A_tfe);
Ph_tfe_deg=180/pi*Ph_tfe;
figure('units','normalized','outerposition',[0 0 1 1]);
subplot(2,1,1)
set(semilogx(W_tfe,A_tfe_dB,'k'),'linewidth',1.5);
line([Fs/2 Fs/2],[-100 100])
grid on
subplot(2,1,2)
set(semilogx(W_tfe, Ph_tfe_deg, 'k'),'linewidth',1.5);
line([Fmax Fmax],[-500 500])
set(gca, 'YTick',[-180 -90 0 90 180])
grid on
Wpm = 0.02454;
PM = 100;
Apm = 38.19;
Wz = Wpm/2;
Kp = (10^(-Apm/20))/1.25
Td = 1/(2*Wz)
Ti = 4*Td
end