% Author: Omar A. Beg
% Loads parameters for PLL SLSF Model
% Afterwards go to slsf and simulate the model
clc
clear all
%initial conditions
vi0 = 0.35; 
vp10 = 0;
vp0 = 0;
phiv0 = -0.4*2*pi;
phiref0 = 0;

%paprameter values
fref = 27e6;
f0 = 26.93e9;
N = 1000;
Ki = 200e6;
Kp = 25e6;
Ci = 25e-12;
Cp1 = 6.3e-12;
Cp3 = 2e-12;
Rp2 = 50e3;
Rp3 = 8e3;
td = 50e-12;
tmax = 1e-4;
% input from the charge pump
Iiup = 10.1e-6;
Iidn = -10.1e-6;
Ipup = 505e-6;
Ipdn = -505e-6;
%bounds for voltages in terms of omega
omegail = 0;%lower bound for v_i
omegaiu = 0.7;%upper bound for v_i
omegapl = -4;%lower bound for v_p
omegapu = 12;%upper bound for v_p

%simulate the model
%[tout,yout]=sim('pll');
