-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronous Machine model and bug fixes
- Added a synchronous machine block which can be initialized with its output transformer - Some bug fixes
- Loading branch information
1 parent
aa5f5c4
commit 4e75697
Showing
69 changed files
with
172 additions
and
8 deletions.
There are no files selected for viewing
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file renamed
BIN
+138 KB
...2-Level/GFM/LCL-filter/GFM_LCL_Filter.slx → ...2-Level/GFM/LCL-filter/GFM_LCL_Filter.slx
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
%% Compute Base values | ||
% Can be used for all models | ||
% Index 1 = VSC side | ||
% Index 2 = grid side | ||
fb = fn; | ||
Pb = Pn; | ||
cos_phi_n = Pn/Sn; | ||
Sb = Pb/cos_phi_n; | ||
Vn1 = Un1/sqrt(3); | ||
Vb1 = Vn1; | ||
Vn2 = Un2/sqrt(3); | ||
Vb2 = Vn2; | ||
Ib1 = Sb / (3*Vb1); | ||
Ib2 = Sb / (3*Vb2); | ||
Zb = (3*Vb1^2)/Sb; | ||
wb = 2*pi*fb; wb_pu=1; | ||
Lb = Zb/wb; | ||
Cb = 1/(Zb*wb); | ||
% Vdcb = Udcn; | ||
% Idcb = Pb / Vdcb; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
%% Initialization file for model with an output L-filter | ||
% Compute initial state of power and control component | ||
% Can be used for 2-level or MMC VSCs | ||
|
||
% Compute the delay compensation between control and power parts | ||
%if (Time_Step == -1) | ||
% Solver_Time_Step = 0; | ||
%else | ||
% Solver_Time_Step = Time_Step; | ||
%end | ||
|
||
% Compute Initial Voltage of VSC | ||
% from steady-state output transformer model and Loadflow result | ||
|
||
R1_pu = Rt_pu/2; | ||
L1_pu = Lt_pu/2; | ||
R2_pu = Rt_pu/2; | ||
L2_pu = Lt_pu/2; | ||
X1_pu = L1_pu; | ||
X2_pu = L2_pu; | ||
Xm_pu = Lm_pu; | ||
|
||
Zm_pu = 1/(1/Rm_pu+1/(1i*Xm_pu)); | ||
|
||
Vpcc = V0*exp(1i*Theta0/180*pi); | ||
|
||
S0=P0+1i*Q0; | ||
I2 = conj(S0/Vpcc); | ||
% I2 = conj(S0)/V0; | ||
|
||
Vm = (R2_pu+1i*X2_pu)*I2 + Vpcc; | ||
Im = Vm/Zm_pu; | ||
|
||
I1 = I2 + Im; | ||
V1 = (R1_pu+1i*X1_pu) * I1 + Vm; | ||
|
||
Vm0 = abs(V1); | ||
Theta_Vm0 = angle(V1) * 180/pi+Theta0; | ||
|
||
Vvsc0 = Vm0; | ||
Theta_Vvsc0 = Theta_Vm0; | ||
|
||
|
||
% Generate string to display LF results on Mask | ||
mo = get_param(gcb,'MaskObject'); | ||
mo.getDialogControl('LF_vsc_str').Prompt = ['V0 = ', num2str(Vvsc0),' pu, Angle = ', num2str(Theta_Vvsc0),'°']; | ||
mo.getDialogControl('LF_pcc_str').Prompt = ['V0 = ', num2str(V0),' pu, Angle = ', num2str(Theta0),'°']; | ||
mo.getDialogControl('LF_pcc_Power_str').Prompt = ['P0 = ', num2str(P0),' pu, Q0 = ', num2str(Q0),' pu']; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
% | ||
Ism = I1 + conj(Paux/V1); | ||
|
||
Ssm = V1*conj(Ism); | ||
Psm = real(Ssm); | ||
Qsm = imag(Ssm); | ||
cos_phi = Psm/abs(Ssm); | ||
sin_phi = Qsm/abs(Ssm); | ||
phi = atan(Qsm/Psm); | ||
|
||
Vsum = abs(V1); | ||
Vangle = angle(V1); | ||
Isum = abs(Ism); | ||
Iangle = angle(Ism); | ||
% current init | ||
ia0 = Isum ; | ||
ib0 = Isum ; | ||
ic0 = Isum ; | ||
|
||
pha0 = Iangle*180/pi; | ||
phb0 = Iangle*180/pi -120; | ||
phc0 = Iangle*180/pi + 120; | ||
|
||
Xaaqu = SM_Ll + SM_Lmq; | ||
Xaadu = SM_Ll + SM_Lmd; | ||
Rau = SM_Rs; | ||
|
||
deltai = atan((Xaaqu*Isum*cos_phi-Rau*Isum*sin_phi)/... | ||
(Vsum+Xaaqu*Isum*sin_phi+Rau*Isum*cos_phi));... | ||
|
||
delta0 = (deltai + Vangle)*180/pi-90; | ||
|
||
Isqu = Isum*cos(phi+deltai); | ||
Isdu = Isum*sin(phi+deltai); | ||
Vsqu = Vsum*cos(deltai); | ||
|
||
Ifdu = 1/SM_Lmd*(Vsqu + Rau*Isqu + Xaadu*Isdu); | ||
Efdu = SM_Rf * Ifdu; | ||
N = SM_Rf/SM_Lmd; | ||
Vfu0 = Efdu/N; | ||
|
||
Cmu0 = Psm + Rau*Isum*Isum; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.