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 YourLastNameHWm which will simulate and analyze the electrical power produced by a wind turbine. The turbine generates power according to the following formula:
Pwr turbine power in W wind velocity air density; turbine efficiency dimensionless; area swept by turbine blades, length of turbine blades.
The turbine is turned on when the wind velocity exceeds the "cutin value velCutln 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 and a standard deviation of The number of elements in velWind has to be a random integer number between and Use function to ensue repeatability of random numbers.
Create an array days with day numbers from 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 velocity arrays. Calculate percentages of respective numbers of days over the observation period Calculate power generated by the turbine using local function TurbinePower and the formula given above for powergenerating days. The function should have input arguments velGood, rrou,mu and output argument pwrWind. Convert the array pwrWind from Watts to MegaWatts MW Find average and standard deviation of produced power in MW over all powergenerating days using builtin MATLAB functions Using array concatenation no loops create a colmn array dataOut, in which the st column contains numbers of powergenerating days, nd and rd columns contain corresponding wind velocity and power values. Use transposition to convert row arrays to column arrays 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 powergenerating days with and digits after the decimal point, respectively. Include parameter description and their units. Print the column array dataOut with day numbers printed as integers, wind velocity and power values printed with and 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
