Simulate a vertical wind turbine.
This is a 3 bladed wind turbine using a simple torque model. We do not control blade pitch angles.
------------------------------------------------------------------------ See also Plot2D, TimeLabl, RK4, VAWTRHS ------------------------------------------------------------------------
Contents
%-------------------------------------------------------------------------- % Copyright (c) 2007 Princeton Satellite Systems, Inc. % All rights reserved. %--------------------------------------------------------------------------
Initialize the data
dT = 0.1; d.cD0 = 0.001; d.rho = 1.225; d.K = 0.1; d.cLAlpha = 0.1; d.inr = 1; d.angle = [0 120 240]*pi/180; % Wing spar angle d.r = [cos(d.angle);sin(d.angle);zeros(1,3)]; d.alpha0 = 0; nSim = 10; d.wind = [0;1;0]; d.pitchAngle = [0;0;0]; % Blade angles with respect to tangent xP = zeros(8,nSim); x = [0;0.1];
Run the simulation
for k = 1:nSim [xDot, torque] = VAWTRHS( x, 0, d ); xP(:,k) = [torque;x;d.pitchAngle;d.wind(1:2)]; x = RK4('VAWTRHS',x,dT,0,d); end
Plot results
[t, tL] = TimeLabl( (0:(nSim-1))*dT ); Plot2D( t, xP(1:3,:), 'Time (sec)', {'T (Nm)', '\theta', '\Omega'},'Wind Turbine'); %-------------------------------------- % PSS internal file version information %-------------------------------------- % $Date$ % $Id: 3a64a16dd2a29d2ecea3fc672cc0217ac1bdd4bc $