I need MATLAB code that plots the aerodynamic power generated by a wind turbine vs the generator rotation speed for different wind speeds

6 次查看(过去 30 天)
I need a new MATLAB code or patch for the following code that draws the aerodynamic power generated by the wind turbine versus the generator's rotation speed for different wind speeds:
clear; clc; close all;
% Define constants
rho = 1.225; % Air density [kg/m^3]
R = 35.25; % Radius of wind turbine [m]
% Define wind speeds
wind_speeds = [5 10 15 20]; % Wind speeds [m/s]
% Define generator rotation speeds
rotation_speeds = 0:1000:2000; % Rotation speeds [rpm]
% Calculate aerodynamic power for each wind speed and rotation speed
power = zeros(length(rotation_speeds), length(wind_speeds));
for i = 1:length(wind_speeds)
for j = 1:length(rotation_speeds)
wind_speed = wind_speeds(i);
rotation_speed = rotation_speeds(j) * (2*pi/60); % Convert rpm to rad/s
% Calculate aerodynamic power
power(j, i) = 0.5 * rho * pi * R^2 * (wind_speed^3) * rotation_speed;
end
end
% Plot the aerodynamic power
figure;
hold on;
colors = {'b', 'g', 'r', 'm'};
for i = 1:length(wind_speeds)
plot(rotation_speeds, power(:, i), colors{i});
end
hold off;
% Set plot properties
title('Aerodynamic Power vs. Generator Rotation Speed');
xlabel('Generator Rotation Speed [rpm]');
ylabel('Aerodynamic Power [W]');
legend(cellstr(num2str(wind_speeds', 'Wind Speed = %d m/s')));
% Adjust plot limits, if needed
% xlim([0 max(rotation_speeds)]);
% ylim([0 max(power(:))]);
% Save the plot as an image, if desired
% saveas(gcf, 'aerodynamic_power_plot.png');
  4 个评论
Alan Stevens
Alan Stevens 2023-7-6
Your expression for power is linearly proportional to rotation speed, so you are only ever going to get straight line outputs from it!

请先登录,再进行评论。

回答(2 个)

Image Analyst
Image Analyst 2023-7-6
Looks like you're not plotting out far enough on the x axis to see the parabolic shape. You're only going out on the relatively flat upward sloping side of the parabola. Try increasing the range of the rotation speeds so that you can see the full parabola shape.
  4 个评论
Image Analyst
Image Analyst 2023-7-7
Yes we know he's getting straight lines but what he wants is curvy lines like
so that's why I suggested he may have the wrong equation. It looks like Sam did some research and perhaps has found the proper equation to use.

请先登录,再进行评论。


Sam Chak
Sam Chak 2023-7-6
You can clearly identify the relationship here:
If the aerodynamic power is y, the rotation speed is x, and this term is a constant, then mathematically, you are plotting , which is a straigh line.
After checking the facts in the Variable speed wind turbine, the correct formula should be
where the coefficient of power, is a nonlinear function of lambda (λ), given by
with ω is the tip rotational speed.

类别

Help CenterFile Exchange 中查找有关 Wind Power 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by