Matab Assignment -
Description of Assessment Task - In this assignment you will develop and test a Matlab program for plotting antenna radiation patterns and antenna parameters calculation. You will be given 4 data files in .csv format that represent results for measured radiated power of an antenna versus azimuthal angle φ and elevation angle θ.
- File Phi.csv contains a column of azimuthal angles φ from 0-360 degrees.
- File P_phi.csv contains a column of measured radiated power in Watts in the direction of angle φ with matching index, e.g. fifth row in P_phi.csv (i.e. P(5) value) corresponds to fifth row in Phi.csv (i.e. φ(5) value).
- File Theta.csv contains a column of elevation angles θ from 0-360 degrees.
- File P_theta.csv contains a column of measured radiated powers corresponding to θ angles.
You are required to analyse the data by calculating antenna parameters and visually representing radiation patterns in the report.
Step 1: Import files
Copy all required files to the Matlab folder on the computer. Files need to be in the same Matlab folder as the program you run.
Write code to import the contents of the .csv files into Matlab. Import files for azimuthal angles φ and corresponding powers first. (Alternatively use import button in Matlab for lower mark).
Step 2: Preliminary parameter calculations
i. Find the angle in direction of which radiation is maximum.
ii. Normalise powers of radiated field to maximum radiated power.
iii. Convert angles to radians.
Step 3: Plot antenna radiation pattern
Plot radiation pattern for powers in dB versus azimuthal angle φ. You can use "plot_dB.m" Matlab program that is attached in your assignment. Program works similar to inbuilt Matlab "polar plot" command and expects angle in radians and power in normalised ratio form (not dB).
polar_dB (angle, power, rangedb, increments, rays) Matlab program requires the following variables as input:
i. angle - replace with your actual variable name for angle in radians
ii. power - replace with your actual variable name for power in normalised ratio form
iii. rangedb - define minimum polar radius value mark on the axis (find min power in dB and round it a integer number, remove negative sign)
iv. increments - optional, tells how many circular grid lines do you want in the plot (hint: gridline through -3dB level is helpful, adjust increments and rangedb so that radius axis starts and zero and finishes at a suitable integer number)
v. rays - optional, tells how many grid lines for angles do you want in the plot
All input variables have to be calculated before using "polt_dB.m" command.
Write code to export image into a .jpg file. (Alternatively use save button in Matlab for lower mark).
Step 4: Parameter calculations
i. Write code to calculate P ratio in dB and calculate the beamwidth of the antenna in horizontal plane. If exact required power level match is not possible due to discrete data in .csv file, use the nearest available value in.csv file for calculations. Include formula and/or explanation for each calculated parameter. (Alternatively find required data from .csv files for lower mark). Compare the result to what you see on the graph to check for correctness.
ii. Write code and calculate front to back ratio of the antenna in dB in horizontal plane.
iii. Write code and calculate number of antenna side lobes, direction of maximum radiation and powers in dB radiated into direction of each side lobe in horizontal plane. (Alternatively find side lobe levels and directions from .csv files for lower mark).
Step 5: Repeat steps for elevation angles
Repeat steps 1 to 4 for vertical plane (versus elevation angle θ).
Step 6: Export result to a file
Export results of your calculations for each result into a .csv file.
Step 6: Discuss the results
Discuss antenna's properties in the report based on what you have found from calculations and visualisation. Attach your Matlab code to your report as appendix.
General guidelines -
The Assignment report format should include the title page with assignment title, your name and student number and sections entitled: Introduction, Method, Results, Discussion and Conclusion. Subsections may be included as required. References should be in IEEE format.
The report shall include two cases of radiation patterns: one in horizontal plane and one in vertical plane and calculated antenna parameters in each plane. Provide adequate explanation on how you executed the steps.
Section to be included in the report and demonstration -
Introduction, Method, Results, Discussion and Conclusion - Each section is present in the report and adequately covered.
Import and export - Correctly coded import and export commands.
Normalising radiated power - Correctly identified direction of maximum radiation and normalised radiated power.
Plot of radiation pattern in horizontal plane - Image of radiation pattern plotted in polar coordinates in dB scale.
Parameter calculations in horizontal plane - Calculated beamwidth, front to back ratio, number and power level in dB of side lobes with formulas and/or explanation included.
Plot of radiation pattern in vertical plane - Image of radiation pattern plotted in polar coordinates in dB scale.
Parameter calculations in vertical plane - Calculated beamwidth, front to back ratio, number and power level in dB of side lobes with formulas and/or explanation included.
Discussion - Discuss antenna properties based on calculated results and radiation patterns.
Reference style - Follow IEEE reference style.
Attachment:- Assignment Files.rar