%Vsense using the amc1200
R = 5e3;
fc = 2e3;
fsf = 2*pi*R*fc;

C1 = 3.546/fsf
C2 = 1.392/fsf
C3 = 0.2024/fsf


%% for 2pole filter
clear;
fc = 2e3;

C1 = 0.01e-6
C2 = 2*C1
R1 = 1/(2*sqrt(2)*pi*C1*fc)
Cin = 100*C1




% %% Vsense using the Avago ACPL-C87A
% clear; close all;
% 
% Rin = 1000e6; %ohms
% Vsense = 2; %V at full range
% Vinput = 400; %VDC
% 
% Rratio = Vinput/Vsense -1;
% 
% R2 = 1e3:1:100e3;
% R1 = R2.*Rratio;
% 
% Merror = R2./Rin*100;
% 
% Power = Vinput.*Vinput./(R1+R2);
% Current = Power./Vinput;
% 
% plot (Power, Merror);
% xlabel('Power Dissapation (W)');
% ylabel('Measurement Error (%)');
% grid on;
% 
% figure()
% plot (Current, Merror);
% xlabel('Current Dissapation (A)');
% ylabel('Measurement Error (%)');
% grid on;