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

LiDAR initial

parent 1a73b48a
;DTU_10MW_RWT, version 9, 25-09-2017, mhha
;
begin simulation;
time_stop 600;
time_stop 50;
solvertype 1 ; (newmark)
on_no_convergence continue ;
convergence_limits 1E3 1.0 1E-7 ;
logfile ./log/DTU_10MW_RWT.log ;
begin newmark;
deltat 0.01;
deltat 0.05;
end newmark;
end simulation;
;
......@@ -289,7 +289,7 @@ end new_htc_structure;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
begin wind ;
density 1.225 ;
wsp 4.0 ;
wsp 12.0 ;
tint 0.0 ;
horizontal_input 1 ;
windfield_rotations 0.0 0.0 0.0 ; yaw, tilt, rotation
......@@ -298,7 +298,7 @@ begin wind ;
turb_format 0 ; 0=none, 1=mann,2=flex
tower_shadow_method 0 ; 0=none, 1=potential flow, 2=jet
scale_time_start 0.0 ;
wind_ramp_factor 0.0 40.0 0.6 1.0 ;
wind_ramp_factor 0.0 40.0 0.9 1.0 ;
; Steps ;
wind_ramp_abs 140.0 141.0 0.0 2.0 ; wsp. after the step: 6.0
wind_ramp_abs 180.0 181.0 0.0 2.0 ; wsp. after the step: 8.0
......@@ -477,13 +477,14 @@ begin type2_dll;
; where 'nnn' [s] is the period of the moving average and 'mmm' is threshold of the deviation [0.1 deg] (functionality is inactive if value $<$ 1,000,000)
; Gear ratio
constant 76 0; Gear ratio used for the calculation of the LSS rotational speeds and the HSS generator torque reference [-] (Default 1 if zero)
; Rotor speed notch filter for constant power operation above rated
; Rotor speed notch filter for constant power operation above rated
constant 77 3.55; Frequency of notch filter [Hz] applied on the rotor speed before computing torque above rated (constant power), if zero no notch filter used
constant 78 0.0; Damping of notch filter [-] applied on the rotor speed before computing torque above rated (constant power), (Default 0.01 used if zero)
; De-rating strategies
constant 79 1; Derate strategy. 0 = No Derating, 1 = constant rotation, 2 = max rotation 3 = min ct
constant 79 2; Derate strategy. 0 = No Derating, 1 = constant rotation, 2 = max rotation 3 = min ct
constant 80 70; Derate percentage (eg. 70 means 70% of nominal power
constant 81 0.0; Moment of inertia of the rotor
end init;
;
begin output;
......@@ -513,11 +514,19 @@ begin type2_dll;
; dll inpvec 1 3; Pitch angle reference of blade 2 from DTU Basic Controller [rad]
; dll inpvec 1 4; Pitch angle reference of blade 3 from DTU Basic Controller [rad]
dll inpvec 1 1; Generator torque reference from DTU Basic Controller [Nm]
; dll inpvec 3 2;# Pelec from Generator Servo [W] ;;
dll inpvec 1 45; power setpoint
; dll inpvec 3 2;# Pelec from Generator Servo[W]
mbdy momentvec blade1 2 2 blade1 only 1; # blade 1 root [kNm] ;
mbdy momentvec blade2 2 2 blade2 only 1; # blade 2 root [kNm];
mbdy momentvec blade3 2 2 blade3 only 1; # blade 3 root [kNm];
dll inpvec 1 45;
wind free_wind 1 0.0 0.0 -119 only 2; local wind at fixed position: coo (1=global,2=non-rotation rotor coo.), pos x, pos y, pos z
; constraint bearing2 pitch1 5; #angle and angle velocity
;constraint bearing2 pitch2 5; #angle and angle velocity
;constraint bearing2 pitch3 5; #angle and angle velocity
aero nacelle_lidar 0 0 0 15 45 100 18.67 2 100 1; 1 Beam WHPO 4 Beam Lidar (Integration -347 to -75 ; should be enough!)
aero nacelle_lidar 0 0 0 15 135 100 18.67 2 100 2; 1 Beam WHPO 4 Beam Lidar (Integration -347 to -75 ; should be enough!)
aero nacelle_lidar 0 0 0 15 225 100 18.67 2 100 3; 1 Beam WHPO 4 Beam Lidar (Integration -347 to -75 ; should be enough!)
aero nacelle_lidar 0 0 0 15 315 100 18.67 2 100 4; 1 Beam WHPO 4 Beam Lidar (Integration -347 to -75 ; should be enough!)
end output;
;
begin actions;
......@@ -638,7 +647,7 @@ end dll;
;
begin output;
filename ./res/DTU_10MW_RWT ;
data_format hawc_binary;
data_format hawc_ascii;
buffer 1 ;
;
general time;
......@@ -726,7 +735,11 @@ begin output;
dll inpvec 5 3 # pitch 3 [rad];
; Check tower clearence
dll inpvec 6 1 # Bltip tow min d [m];
aero spinner_lidar 2 1 150 30 1 10 0.028 25 1.55e-6 # circular scanning FD = 150m;
aero nacelle_lidar 0 0 0 15 45 100 18.67 2 100 7; 1 Beam WHPO 4 Beam Lidar (Integration -347 to -75 ; should be enough!)
aero nacelle_lidar 0 0 0 15 135 100 18.67 2 100 8; 1 Beam WHPO 4 Beam Lidar (Integration -347 to -75 ; should be enough!)
aero nacelle_lidar 0 0 0 15 225 100 18.67 2 100 9; 1 Beam WHPO 4 Beam Lidar (Integration -347 to -75 ; should be enough!)
aero nacelle_lidar 0 0 0 15 315 100 18.67 2 100 10; 1 Beam WHPO 4 Beam Lidar (Integration -347 to -75 ; should be enough!); aero spinner_lidar 2 1 100 30 1 10 0.028 25 1.55e-6;
end output;
;
exit;
......@@ -15,11 +15,16 @@ while time <= Tend
time = ArrayFromHawc(1); % 1: time [s]
omega = ArrayFromHawc(2); % 2: rotor speed [rad/s]
theta_bar = ArrayFromHawc(3); % 3: Pitch angle reference of blade 1 from DTU Basic Controller [rad]
Qe_bar = ArrayFromHawc(4); % 6: Generator torque reference from DTU Basic Controller [Nm]
Mb1 = ArrayFromHawc(5);% 8: blade1 root 1 Mx [kNm]
Mb2 = ArrayFromHawc(6);% 11: blade1 root 2 Mx [kNm]
Mb3 = ArrayFromHawc(7);% 14: blade1 root 3 Mx [kNm]
dr = ArrayFromHawc(8);
Qe_bar = ArrayFromHawc(4); % 4: Generator torque reference from DTU Basic Controller [Nm]
Mb1 = ArrayFromHawc(6);% 6: blade1 root 1 Mx [kNm]
Mb2 = ArrayFromHawc(7);% 7: blade1 root 2 Mx [kNm]
Mb3 = ArrayFromHawc(8);% 8: blade1 root 3 Mx [kNm]
v = ArrayFromHawc(9); % 9: wind speed vy [m/s]
LOS1 = ArrayFromHawc(10);
LOS2 = ArrayFromHawc(15);
LOS3 = ArrayFromHawc(20);
LOS4 = ArrayFromHawc(25);
% check simulation status
% clc;
% fprintf('----------------------------------'); fprintf('\n');
......@@ -28,11 +33,14 @@ while time <= Tend
% fprintf('Rotor speed: %3.2f',omega); fprintf('\n');
% fprintf('Col_Pitch: %3.2f',theta_bar*180/pi); fprintf('\n');
% fprintf('GenTorque: %3.2f',Qe_bar); fprintf('\n');
disp(LOS1);disp(LOS2);
disp(LOS3);
disp(LOS4);
%%%%%%%%%%%%%% Design your controller here ! %%%%%%%%%%%%%%
theta1 = 0; % additional pithc angle
theta2 = 0;
theta3 = 0;
dr_update = dr; % Derate percentage (e.g. 0.7 means 70% of nominal power)
%%%%%%%%%%%%%%%%%%% Signals to HAWC2 output %%%%%%%%%%%%%%%%%
ArrayToHawc = zeros(40,1);
......@@ -40,7 +48,6 @@ while time <= Tend
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]
ArrayToHawc(5) = dr_update ; % 5: derating sending to DTUWEC [-]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StringToHawc = [sprintf('%0.12f;',ArrayToHawc) '*'];
write(TCPOBJ,int8(StringToHawc));
......
......@@ -16,7 +16,7 @@ TCPportnumber = 1239;
tic
cd(['../hawc2_htc' ]);% Go to hawc2 and htc fodler
% call HAWC2
!hawc2MB.exe ./htc/DTU_10MW_RWT.htc &
!hawc2MB.exe ./htc/DTU_10MW_RWT_ldong.htc &
cd('../matlab');
......
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