Skip to content

Commit

Permalink
Include wind disturbance input
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhar-abbas committed Sep 10, 2019
1 parent 65c1ae4 commit 14e9588
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions WTC_toolbox/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,37 +139,18 @@ def tune_controller(self, turbine):
B_tau = -Ng**2/J # Torque input gain
B_beta = dtau_dbeta/J # Blade pitch input gain


# Wind Disturbance Input
dlambda_dv = -TSR_op/v
dtau_dv = dtau_dlambda*dlambda_dv
B_v = dtau_dv/J

# Store some variables
self.v = v # Wind speed (m/s)
self.Cp_op = Cp_op
self.pitch_op = pitch_op
self.TSR_op = TSR_op
self.A = A
self.B_beta = B_beta
# % Linearized operation points
# [CpGrad_Beta,CpGrad_TSR] = gradient(Cpmat,1);

# Cp(toi) = interp2(Betavec,TSRvec,Cpmat,Beta_op(toi),tsr);
# dCpdB(toi) = interp2(Betavec,TSRvec,CpGrad_Beta,Beta_op(toi),tsr)./Beta_del;
# dCpdTSR(toi) = interp2(Betavec,TSRvec,CpGrad_TSR,Beta_op(toi),tsr)./TSR_del;

# %% Final derivatives and system "matrices"
# dtdb(toi) = Ng/2*rho*Ar*R*(1/tsr_sat(toi))*dCpdB(toi)*vv(toi)^2;
# dtdl = Ng/(2)*rho*Ar*R*vv(toi)^2*(1/tsr_sat(toi)^2)* (dCpdTSR(toi)*tsr_sat(toi) - Cp(toi)); % assume operating at optimal
# dldo = R/vv(toi)/Ng;
# dtdo = dtdl*dldo;

# A(toi) = dtdo/J; % Plant pole
# B_t = -Ng^2/J; % Torque input gain
# Bb(toi) = dtdb(toi)/J; % BldPitch input gain

# %% Wind Disturbance Input gain
# % dldv = -tsr/vv(toi);
# % dtdv = dtdl*dldv;
# % B_v = dtdv/J;

# end

# Beta_del = Betavec(2) - Betavec(1);
# TSR_del = TSRvec(2) - TSRvec(1);
Expand Down

0 comments on commit 14e9588

Please sign in to comment.