File Exchange

image thumbnail

Animate a Wind Farm with MATLAB

version 1.2.0.1 (313 KB) by

A VRML model of a wind turbine, animated with MATLAB and Simulink 3D Animation.

17 Downloads

Updated

View License

In this demo, we show how you can create the 3D visualization of a wind farm consisting of identical wind turbines in the ocean. Using the extrusion node in VRML, we model the complex 3D geometry of a blade. We use a NACA 0015 Thickness Form as the wing section of the blade, vary its size and orientation along its spine. By using other simple geometrical constructs in VRML, we model the hub and the tower. Grouping and replication of nodes enables the assembly of the wind turbine and then the wind farm. By using the Simulink 3D Animation API, we do a simple animation of the turbines from MATLAB.
The modeling of the blade geometry in VRML may also be of interest to aerospace engineers.

Please note that Simulink 3D Animation is required to run the demo.

The videos on how this was built from scratch is available under
"Green Energy Application Examples" section here:

Enhancements to the demo:
1. Adding realism to the 3D scene in this submission here:

http://www.mathworks.com/matlabcentral/fileexchange/28089

2. Fog effect for this demo is added in this submission here:

http://www.mathworks.com/matlabcentral/fileexchange/28091-animate-a-wind-farm-with-matlab-add-the-fog-effect

Comments and Ratings (8)

German

German (view profile)

Raghu

Raghu (view profile)

Mr Smart

Simulink Dude

Simulink Dude (view profile)

You can now follow me on Twitter:

http://twitter.com/simulinkdude

Simulink Dude

Simulink Dude (view profile)

Design Talk: Enhancing Simulation Studies with 3D Animation Article

http://www.ecnmag.com/Articles/2010/09/Design-Talk/Enhancing-Simulation-Studies-with-3D-Animation/

Simulink Dude

Simulink Dude (view profile)

A fellow reader asked a question about how to record the animation to AVI file since the buttons were inaccessible:

The code would simply be the addition of the following:
set(fig,'Record2D','on');
set(fig,'NavPanel','none');
set(world,'Recording','on');

just after the vrfigure command. See below:

world=vrworld('Wind_Turbine_Realism.wrl', 'new'); % change this
open(world);
fig=vrfigure(world);
set(fig, 'Headlight', 'off');
set(fig,'Record2D','on');
set(fig,'NavPanel','none');
set(world,'Recording','on');
blades_1=vrnode(world, 'Blades_1');
blades_2=vrnode(world, 'Blades_2');
blades_3=vrnode(world, 'Blades_3');

phase_1=0;
phase_2=pi/3;
phase_3=pi/6;

for theta=0:0.25:12*3*pi
    pause(0.001)
    blades_1.rotation=[0 0 1 phase_1-theta];
    blades_2.rotation=[0 0 1 phase_2-theta];
    blades_3.rotation=[0 0 1 phase_3-theta];
    vrdrawnow;
end

Also, use:

get(fig)

to access additional properties such as:

Record2D = 'off'
Record2DCompressMethod = 'auto'
Record2DCompressQuality = 75
Record2DFPS = 15
Record2DFileName = '%f_anim_%n.avi'

Documentation is here:

http://www.mathworks.de/access/helpdesk/help/toolbox/sl3d/f4-33836.html

Simulink Dude

Simulink Dude (view profile)

Enhacments to the demo:
1. Adding realism to the 3D scene in this submission here:

http://www.mathworks.com/matlabcentral/fileexchange/28089

2. Fog effect for this demo is added in this submission here:

http://www.mathworks.com/matlabcentral/fileexchange/28091-animate-a-wind-farm-with-matlab-add-the-fog-effect

Updates

1.2.0.1

Updated license

1.2

Updated description to include enhancements made to the demo.

MATLAB Release
MATLAB 7.9 (R2009b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video