Matlab Simulations And Computations

and Computations Semester 2, 2015

Assessment: Assignment 3 Due: 23 October 2015 Marks: 300 Value: 30%

1 (worth 40 marks)

1.1 Introduction

To assess how useful the wind power could be as an energy source, use the file ass2data.xls to calculate the total energy available in the wind for each year of data.

1.2 Requirements

For this assessment item, you must produce MATLAB code which:

1. Calculates the total energy for each of the years.

2. Reports to the Command Window the energy for each year.

3. Briefly discusses whether there is any trend in the results for annual energy production.

4. Has appropriate comments throughout.

You must also calculate the total energy for the first four hours of power data (i.e. over the first five data entries) by hand to verify your code; submit this working in a pdf file. Your MATLAB code must test (verify) whether the computed value of energy is the same as calculated by hand.

1.3 Assessment Criteria

Your code will be assessed using the following scheme. Note that you are marked based on how well you perform for each category, so the in a basic way will receive half marks and the correct answer determined using an excellent method/code will receive full marks.

Quality of the code 5 marks

Quality of header(s) and comments 5 marks

Quality of calculation of the energy for each year 15 marks

Quality of reporting 5 marks

Quality of discussion 5 marks

Quality of verification based on hand calculations 5 marks

1

ENG3104 Engineering Simulations and Computations Semester 2, 2015

2 (worth 65 marks)

2.1 Introduction

For the wind turbines to operate effectively, they must turn to face into the wind. This could create large stresses in the structure if the wind changes direction quickly while the wind speed is high. You are to assess if this is likely to happen using the data in ass2data.xls.

2.2 Requirements

For this assessment item, you must produce MATLAB code which:

1. Calculates the instantaneous rate of change of wind direction using:

(a) backward differences

(b) forward differences

(c) central differences

2. Plots the three sets of derivatives as functions of time.

3. Produces scatter plots of maximum wind gust as functions of each of the derivatives.

4. Displays a message in the Command Window with a brief discussion of the scatter plots. Discuss which of the derivatives should be used to compare with the wind gust and why. Discuss whether you think the wind changes direction too quickly while the wind speed is high and why.

5. Has appropriate comments throughout.

You must also use a backward difference, forward difference and central difference by hand to determine the rate of change of wind direction for the twelfth data entry; submit this working in a pdf file. Your MATLAB code must test (verify) whether these values are the same as computed by the code for the three differences.

2.3 Assessment Criteria

Your code will be assessed using the following scheme. Note that you are marked based on how well you perform for each category, so the correct answer determined in a basic way will receive half marks and the correct answer determined using an excellent method/code will receive full marks.

Quality of the code 5 marks

Quality of header(s) and comments 5 marks

Quality of calculating the differences 30 marks

Quality of plotting the differences as functions of time 5 marks

Quality of plotting the wind gust as functions of the differences 10 marks

Quality of discussion 5 marks

Quality of verification based on hand calculations 5 marks

2

ENG3104 Engineering Simulations and Computations Semester 2, 2015

3 (worth 70 marks)

3.1 Introduction

A small non-switching power supply is being designed and the components must be selected so that the voltage in the circuit never falls below Vmin. The voltage in the circuit, vc, can be found using Eq. (1) during the charging phase [when Eq. (2) is satisfied]:

C dvc(t)

dt + ic =

|vt cos(2ft)| 2Vd vc(t) 2Rd

(1)

vc(t) |vt cos(2ft)| 2Vd (2)

and using Eq. (3) during the discharging phase [when Eq. (4) is satisfied]:

C dvc(t)

dt + ic = 0 (3)

vc(t) > |vt cos(2ft)| 2Vd . (4)

The variables in Eqs. (1)(4) are the capacitance, C, the current through the circuit, ic, the transformed AC voltage, vt, the frequency of the AC power, f, the voltage across the diode, Vd, and the resistance across the diode, Rd.

For your assignment, the values for these quantities are (note that all quantities are in SI units):

Vmin = 7.8489 V (5)

C = 5.5108 105 F (6) ic = 0.40439 102 A (7) vt = 6.4802 2 VAC (8) f = 2.0269 10 Hz (9) Vd = 8.6499 101 V (10) Rd = 4.2789 102 . (11)

(Note that these values are indicative of the order of magnitude that these variables might take and are not necessarily within the limited range that is used in practice.)

(a) Your task is to simulate the system for three cycles to determine whether vc is always larger than Vmin, in which case the components have been satisfactorily selected. Your initial condition should be chosen so that the equality is satisfied in Eq. (2). Use the following methods to simulate the system:

(i) Eulers method in MATLAB. You must report to the Command Window the value used for t.

(ii) ode45 in MATLAB

(iii) ode23 in MATLAB

(b) Your task is to see how long it takes for vc to charge to Vmin, starting with an initial condition of vc = 0 and assuming that the system never enters the discharging phase. Use the following methods to simulate the system:

(i) Eulers method in Simulink

(ii) ode45 in Simulink

(iii) ode23 in Simulink

Note that for part (a), only moderate accuracy is required for the simulation (it is not necessary to precisely simulate vc unless its smallest value is very close to Vmin).

3

ENG3104 Engineering Simulations and Computations Semester 2, 2015

3.2 Requirements

For this assessment item, you must produce MATLAB code and Simulink modules which:

1. Simulate Eqs. (1)(4) using the three methods listed in MATLAB.

2. Plots the simulated vc(t) for each method, clearly indicating the value of Vmin on each graph. Non-dimensionalise the value of time by multiplying by f; non-dimensionalise the voltage using (vt 2Vd). Non-dimensionalisation allows you to compare cases of different scale directly because the results are proportional to the non-dimensionalising parameter.

3. Displays a message in the Command Window stating whether vc(t) is always greater than Vmin for each of the methods.

4. Simulates Eq. (1) using Simulink.

5. Produces a plot using Simulink showing when vc(t) reaches Vmin.

6. Displays within Simulink when vc(t) reaches Vmin.

7. Produces output to MATLAB so that MATLAB can report to the Command Window the simulated times for vc(t) to reach Vmin.

8. Has appropriate comments throughout.

You must also verify your simulation using Eulers method in MATLAB for the first two timesteps of part (ai); submit this working in a pdf file. Your MATLAB code must test (verify) whether the value of vc after two timesteps is the same as computed by the code.

3.3 Assessment Criteria

Your code will be assessed using the following scheme. Note that you are marked based on how well you perform for each category, so the correct answer determined in a basic way will receive half marks and the correct answer determined using an excellent method/code will receive full marks.

Quality of the code 5 marks

Quality of header(s) and comments 5 marks

Quality of the MATLAB simulations 20 marks

Quality of the Simulink simulations 20 marks

Quality of plots (e.g. axis labels, titles) 5 marks

Quality of reporting of results 10 marks

Quality of verification based on hand calculations 5 marks

4

ENG3104 Engineering Simulations and Computations Semester 2, 2015

4 (worth 70 marks)

4.1 Introduction

A smoke alarm sounds at 1 kHz and PL = 75 dB. You are to determine whether these speci- fications are satisfactory for the chosen application of a corridor of length L. The propagation of sound is based on the sound pressure p (the pressure increase from ambient pressure in Pa), where the appropriate transport equation is:

2p

x2

1

c2 2p

t2 =

1

2dx

( 1 10dx/10

) p x

. (12)

The speed of sound, c, in air is a function of temperature T (in K):

c = kRT (13)

where the ratio of specific heats for air is k = 1.400 and the ideal gas constant for air is R = 287.0 J/kg.K. The sound pressure level (units of dB) is related to the sound pressure:

PL = 10 log

( p2rms p2 ref

) (14)

pref = 2 10 5 Pa (15)

For the purposes of Eq. (12), you can assume that p = prms. The attenuation on the rhs of Eq. (12) represents the conversion of sound energy into heat

and causes a constant decrease in dB per unit length. The value of in the atmosphere is in Table 1 (ignore the acoustic effects of the walls, ceiling and floor).

Table 1: Value of attenuation factor (dB/km). The relative humidity is .

T (C) (%) Frequency (Hz)

125 250 500 1000 2000 4000 8000

10 70 0.4 1.0 1.9 3.7 9.7 33 117

20 70 0.3 1.1 2.8 5.0 9.0 23 77

15 50 0.5 1.2 2.2 4.2 11 36 129

15 80 0.3 1.1 2.4 4.1 8.3 24 83

For your assignment, the following value is to be used:

L = 3.9511 m . (16)

The corridor is at 20C, the smoke alarm is attached to the wall at one end of the corridor and assume the gradient of pressure at the far end of the corridor is zero (the boundary value takes the value of the first interior node at the end of the previous timestep). You must determine:

(a) whether the sound level is a minimum of 70 dB at every point in the corridor under steady- state conditions (i.e. p/t = 0).

(b) the sound level at every location in the corridor the instant before the noise from the alarm first reaches the far end of the corridor (the noise travels at the speed of sound). The initial conditions are that the corridor is completely quiet (0 dB) except for the wall with the alarm (it has just turned on) and that the sound level isnt changing anywhere.

Use a backward difference to model the rhs of Eq. (12). Note that only the HD students are expected to attempt part (b).

5

ENG3104 Engineering Simulations and Computations Semester 2, 2015

4.2 Requirements

For this assessment item, you must produce MATLAB code which:

1. Does NOT use the Partial Differential Equation Toolbox.

2. Calculates the sound level at all locations for the steady-state case.

3. Plots the steady-state value of PL(x), showing the minimum pressure level on the same graph. Non-dimensionalise the distance using L.

4. Reports to the Command Window whether the sound level reaches 70 dB everywhere in the steady-state situation.

5. Simulates the transient case.

6. Visualises the value of PL(x,t) for the entire simulation in one image. Non-dimensionalise the time using c and L.

7. Plots the value of PL(x) computed in part (b), showing the minimum pressure level on the same graph. Also show on the same graph the value of PL(x) when the noise is half-way to the far end of the corridor.

8. Has appropriate comments throughout.

4.3 Assessment Criteria

Your code will be assessed using the following scheme. Note that you are marked based on how well you perform for each category, so the correct answer determined in a basic way will receive half marks and the correct answer determined using an excellent method/code will receive full marks.

Quality of the code 5 marks

Quality of header(s) and comments 5 marks

Quality of calculation of part (a) 20 marks

Quality of plot for part (a) 5 marks

Quality of reporting for part (a) 5 marks

Quality of calculation of part (b) 20 marks

Quality of plots for part (b) 10 marks

6

ENG3104 Engineering Simulations and Computations Semester 2, 2015

5 (worth 5 marks)

You are to write a brief report (about 100 words, excluding any code), which includes:

1. A description of an instance during the writing of your code for this assignment where there was a problem (e.g. a bug, an error, an unexpected result) or the most challenging aspect to overcome.

2. What steps you took to overcome the problem or challenge (including any code you wrote to test the problem/challenge).

3. The code before you resolved the problem or challenge, highlighting the line(s) of code where the problem or challenge occurred.

4. The code after you resolved the problem/overcame the challenge.

5. Code from the MATLAB editor is to be copied into Word; screenshots should be taken of the Command window.

The problem report will be assessed using the following scheme:

Description Marks

Excellent description of a difficult problem and effective solution 5

Good description of a moderate problem and useful solution 4

Reasonable description of a genuine problem with a pragmatic solution 3

Poor description or Problem is not very challenging or Solution is not effec- tive/efficient

2

Problem is trivial or Solution is poor 1

No report or description does not include a genuine problem 0

6 (worth 50 marks)

Your marks from the SPIDER activities will be added up to contribute to this 50 marks. Note that you will only be awarded up to 50 marks from the SPIDER activities.

Submission

Submit your code, with the ass2data.xls file that is provided to you (or an equivalent conver- sion to xlsx), by the due date to the StudyDesk. Submit your problem report as a pdf file that contains selectable text (your assignment will not be marked if the pdf file does not satisfy this requirement). Note that:

You may need to convert the ass2data.xls file to another format (e.g. ass2data.xlsx) to import properly into MATLAB. In that case, you must submit the files that you actually import using your code.

You do not need to rename your files when uploading: the system automatically segregates different students submissions.

You can submit all your files in a *.zip file or individually (do not archive in another file format such as rar or 7z). You do not have to submit your pdf file(s) separately.

7

ENG3104 Engineering Simulations and Computations Semester 2, 2015

You will NOT receive any confirmation of receipt. If you can see that the files have uploaded, then you have successfully submitted your assignment. There is no need to click a send for marking button, but you will have to click a button confirming that the submission is your own work.

8

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
1
Need assignment help? You can contact our live agent via WhatsApp using +1 718 717 2861

Feel free to ask questions, clarifications, or discounts available when placing an order.
  +1 718 717 2861           + 44 161 818 7126           [email protected]
  +1 718 717 2861         [email protected]