Question: Write a script YourLastName _ HW 6 . m , which will simulate and analyze the electrical power produced by a wind turbine. The turbine

Write a script YourLastName_HW6.m, which will simulate and analyze the electrical power produced by a wind turbine. The turbine generates power according to the following formula:
Pwr=0.5*A***(vwind)3
Pwr - turbine power (in W),vwind- wind velocity (ms),=1.225kgm3- air density; =0.25- turbine efficiency (dimensionless); A=*r2- area swept by turbine blades, r=30m- length of turbine blades.
The turbine is turned on when the wind velocity exceeds the "cut-in" value velCutln =5.4ms. The turbine
Complete the following steps:
Create variables with values of all turbine parameters. Using a random number generator, create a row array velWind containing simulated daily wind velocity values. The values have to be normally distributed random numbers with a desired average of 15ms and a standard deviation of 6cms. The number of elements in velWind has to be a random integer number between 60 and 80. Use rng(1) function to ensue repeatability of random numbers.
Create an array days with day numbers from 1 to the last index of velWind. Using logical array indexing (no loops), create arrays velLow, velHigh, and velGood with velocity values from the array velWind within in the following ranges:Create an array daysGood containing day numbers when power was generated.Find the number of elements in each of the 3 velocity arrays. Calculate percentages of respective numbers of days over the observation period.3. Calculate power generated by the turbine using local function TurbinePower and the formula given above for power-generating days. The function should have input arguments velGood, r,rou,mu and output argument pwrWind. Convert the array pwrWind from Watts to MegaWatts (MW).4. Find average and standard deviation of produced power (in MW) over all power-generating days using built-in MATLAB functions.5. Using array concatenation (no loops), create a 3-colmn array dataOut, in which the 1^("st ") column contains numbers of power-generating days, 2^("nd ") and 3^("rd ") columns contain corresponding wind velocity and power values. Use transposition to convert row arrays to column arrays.6. Print numbers of days and their percentages for days when power was produced and days without power. Print the average and the standard deviation power for power-generating days with 2 and 1 digits after the decimal point, respectively. Include parameter description and their units. Print the 3column array dataOut with day numbers printed as integers, wind velocity and power values printed with 1 and 3 digits after the decimal point, respectively. Print column headings with parameter names and units.
Organize your script in Input, Calculations, and Output sections. Include cleaning commands; provide comments; suppress intermediate output. Use only those Matlab methods that were described in class.
Write a script YourLastName _ HW 6 . m , which

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!