%% ScottishPower workshop on converter control December 2019 % Agusti Egea and Panagiotis Papadopoulos % This file loads the parameters to run the CC %% Clean the workspace and the command window close all; clear all; %% Grid Thevenin Equivalent Parameters SCR=5; % SCR Sbase1=3e6; % Base Power Vn=690; % Base Voltage Zb1=Vn^2/(Sbase1); % Base Impedance Ib=Sbase1/(sqrt(3)*Vn) Rcr1=0.1*Zb1/SCR; % Grid Thevenin equivalent resistance Lcr1=Zb1/(2*pi*50)/SCR; % Grid Thevenin equivalent inductance Rreac=0.1*Zb1*0.1; % Converter reactance resistance Lreac=Zb1/(2*pi*50)*0.1; % Converter reactance inductance Xcf=1/0.15; % Shunt capacitor capacitance Cf=abs(1/(Xcf*2*pi*50*Zb1)); %% Measurment Filter Tm=0.0003; % Filter mesurment delay %% Current controller gains factorM=1; gainPLL=1; omega=2*pi*50; % Electrical Frequency alphacc=0.003; % Current loop desired time constant KpCC=Lreac/alphacc; % Current loop proportional gain KiCC=Rreac/alphacc; % Current loop integral gain vgrid=Vn/sqrt(3)*sqrt(2); kppll=0.707*2*(2*pi*50)/vgrid ; taopll=(kppll* vgrid)/(2*pi*50)^2; kipll=kppll/taopll/100; omegapll=kipll/kppll; % kppll=0.0024*factorM*gainPLL; % PLL Proportional gain % kipll=0.5256*factorM*gainPLL; % PLL integral gain kpPCCC=1.0722e-0610; % CC power controller proportional gain kiPCCC=4.2104e-05*100*2; % CC power controller integral gain kpVCCC=0.0100*factorM*1000; % CC voltage controller proportional gain kiVCCC=0.3000*factorM*1000; % CC voltage controller integral gain %IR gains kpIR1 = -1.5e5/7.77; kpIR2 = -1.5e5/7.4; kpIR3 = -1.5e5/0.97; % kiPCCCIR = kiPCCC*2.5; kiPCCCIR2 = kiPCCC*25; kiPCCCIR13 = kiPCCC*1.1; %% This Number determines the number of samples to be recorded DecimationNumber=1000;