Commit cd5e9e1b authored by Alan Wai Hou Lio's avatar Alan Wai Hou Lio

Fixed minor bugs

parent c219c621
;DTU_10MW_RWT, version 9, 25-09-2017, mhha
;
begin simulation;
time_stop 80.0;
time_stop 200.0;
solvertype 1 ; (newmark)
on_no_convergence continue ;
convergence_limits 1E3 1.0 1E-7 ;
logfile ./log/DTU_10MW_RWT_test01.log ;
logfile ./log/DTU_10MW_RWT_IPC.log ;
begin newmark;
deltat 0.1;
deltat 0.01;
end newmark;
end simulation;
;
......@@ -628,7 +628,7 @@ end dll;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
;
begin output;
filename ./res/DTU_10MW_RWT_test01 ;
filename ./res/DTU_10MW_RWT_IPC ;
data_format hawc_binary;
buffer 1 ;
;
......
......@@ -11,7 +11,7 @@ x2 = zeros(length(A),1);
x3 = zeros(length(A),1);
% Main simulation loop
while time <= Tend
while time <= Tend -Ts
% keyboard;
% THE VARIABLE �mssg� WILL CONTAIN THE OUTPUT VALUES FROM HAWC2
......@@ -31,7 +31,7 @@ while time <= Tend
%%%%%%%%%%%%%%%%%%%%% Measurement %%%%%%%%%%%%%%
time = ArrayFromHawc(1); % 1: time [s]
omega = ArrayFromHawc(2); % 2: rotor speed [rad/s]
theta_bar1 = ArrayFromHawc(3); % 3: Pitch angle reference of blade 1 from DTU Basic Controller [rad]
theta_bar = ArrayFromHawc(3); % 3: Pitch angle reference of blade 1 from DTU Basic Controller [rad]
%theta_bar2 = ArrayFromHawc(4); % 4: Pitch angle reference of blade 2 from DTU Basic Controller [rad]
%theta_bar3 = ArrayFromHawc(5); % 5: Pitch angle reference of blade 3 from DTU Basic Controller [rad]
Qe_bar = ArrayFromHawc(4); % 6: Generator torque reference from DTU Basic Controller [Nm]
......@@ -42,13 +42,13 @@ while time <= Tend
% check simulation status
%clc;
fprintf('----------------------------------'); fprintf('\n');
fprintf('Simulation time: %3.2f',time); fprintf('\n');
fprintf('Power: %3.2f',power); fprintf('\n');
fprintf('Rotor speed: %3.2f',omega); fprintf('\n');
fprintf('Col_Pitch: %3.2f',theta_bar1*180/pi); fprintf('\n');
fprintf('GenTorque: %3.2f',Qe_bar); fprintf('\n');
% fprintf('----------------------------------'); fprintf('\n');
% fprintf('Simulation time: %3.2f',time); fprintf('\n');
% fprintf('Power: %3.2f',power); fprintf('\n');
% fprintf('Rotor speed: %3.2f',omega); fprintf('\n');
% fprintf('Col_Pitch: %3.2f',theta_bar1*180/pi); fprintf('\n');
% fprintf('GenTorque: %3.2f',Qe_bar); fprintf('\n');
%
%%%%%%%%%%%%%% Design your controller here ! %%%%%%%%%%%%%%
if time > 65
......@@ -75,9 +75,9 @@ end
%%%%% DON'T CHANGE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ArrayToHawc = zeros(40,1);
ArrayToHawc(1) = theta_bar1+theta1;% 2: Pitch angle reference of blade 1 [rad]
ArrayToHawc(2) = theta_bar2+theta2;% 3: Pitch angle reference of blade 2 [rad]
ArrayToHawc(3) = theta_bar3+theta3;% 4: Pitch angle reference of blade 3 [rad]
ArrayToHawc(1) = theta_bar+theta1;% 2: Pitch angle reference of blade 1 [rad]
ArrayToHawc(2) = theta_bar+theta2;% 3: Pitch angle reference of blade 2 [rad]
ArrayToHawc(3) = theta_bar+theta3;% 4: Pitch angle reference of blade 3 [rad]
ArrayToHawc(4) = Qe_bar;% 1: Generator torque reference [Nm]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THE VARIABLE BACK TO HAWC2 SHOULD BE PLACED IN THE SAME ORDER AS IN THE HTC FILE
......
......@@ -52,7 +52,7 @@ system('c:\Windows\System32\taskkill.exe /f /im cmd.exe');
% % Simulation time options
Tstart = 0; % From what time results should be saved
Tend = 200; % Simulation length
Ts = 0.1; % Sample time
Ts = 0.01; % Sample time
SimParams.Ts = Ts;
%%
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment