Nothing Special   »   [go: up one dir, main page]

Individualized Matlab Projects in Undergraduate Electromagnetics

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

AC 2010-36: INDIVIDUALIZED MATLAB PROJECTS IN UNDERGRADUATE

ELECTROMAGNETICS

Stuart Wentworth, Auburn University


Stu Wentworth received his Electrical Engineering doctorate from the University of Texas,
Austin, in 1990. Since then he has been with Auburn University’s Department of Electrical and
Computer Engineering, specializing in electromagnetics and microelectronics. He has authored a
pair of undergraduate electromagnetics texts, and has won several awards related to teaching. He
is a long-standing member of his department’s curriculum and assessment committee.

Dennis Silage, Temple University


DENNIS SILAGE (silage@temple.edu) received the PhD in EE from the University of
Pennsylvania. He is a Professor, teaches electromagnetics, digital data communication and digital
signal processing. Dr. Silage is past chair of the Electrical and Computer Engineering Division of
ASEE and recipient of the 2007 ASEE National Outstanding Teaching Award.

Michael Baginski, Auburn University


Michael E. Baginski (M’87-SM’95) received his B.S., M.S., and Ph.D. degrees, all in electrical
engineering, from Pennsylvania State University, University Park. He is currently an Associate
Professor of Electrical Engineering at Auburn University, Auburn, AL, where he has resided
since the completion of his doctorate. His research interests include analytic and numerical
solutions to transient electromagnetic problems, transient heat flow and solid state structural
analysis using finite element routines, EMI and EMC characterization, S-parameter permittivity
extraction routines, Synthetic Aperture Radar (SAR) design and data processing routines, and the
use of Genetic Algorithms for antenna optimization. Dr. Baginski is a member of Eta Kappa Nu,
Sigma Xi, the New York Academy of Sciences, and the IEEE Education and Electromagnetic
Compatibility Societies. He is also a member of Who’s Who in Science and Engineering and
Who’s Who Among America’s Teachers.

Page 15.728.1

© American Society for Engineering Education, 2010


Individualized MATLAB Projects
In Undergraduate Electromagnetics

Abstract

Four projects are described that require students to compose individualized MATLAB programs to
solve a problem in electromagnetics. These projects are: (1) vector electric field from an
arbitrary charge distribution, (2) vector magnetic field from an arbitrary current distribution, (3)
frequency dependent reflection coefficient looking into impedance matching networks, and (4)
beam pattern for an arbitrarily arranged 4 dipole array.

Introduction

MATLAB projects are often assigned in undergraduate electromagnetics courses, in part to satisfy
the ABET criteria on use of modern engineering tools. The best projects will enhance
understanding of the subject matter while providing a significant programming exercise. A
challenge for the instructor is to individualize assignments to make it more likely that students
are doing their own work.

Four projects are presented that require students to write a MATLAB program that calculates the
project’s objective. First, the vector electric field is determined from an arbitrary charge
distribution. Second, the vector magnetic field is determined from an arbitrary current
distribution. For these related projects the discrete sum solution of the electrostatic or
magnetostatic field are individualized by the charge or current distributions and the configuration
of the structure in three dimensions.

In the third project, students are required to find the two fundamental Smith Chart solutions for a
stub matching network and realize this network using microstrip transmission line. Variables
that are modified to individualize the project include load impedance, operating frequency, stub
termination (open or short), and substrate properties. Performance is compared for the two
networks over a range of frequencies. The final project requires the student to determine the
beam pattern for an array of four dipoles. Each dipole in the array has an individualized current
magnitude, phase and orientation that are linked to the student’s ID number. Additionally, an
estimate of the array’s beam solid angle and directivity is required. We will discuss how well
these projects result in individualized work along with our recommendations for future projects.

1. Fields from Arbitrary Source Distributions

a. Electrostatics
The vector electric field from an arbitrary static charge distribution can be calculated by the
application of Coulomb’s Law. Utilizing first the conceptually reasonable point charge, then the
somewhat implausible infinite line and surface charges densities, closed form integral solutions
for the vector electric field are obtained. Solutions using Gauss’ Law for the same charge
distributions can simplify the analysis. However, the fundamental aspects of Coulomb’s Law,
Page 15.728.2
expressed as a discrete summation, can provide additional insight for more practical problems in
electrostatics.

As part of the first course in electromagnetics, undergraduate students are tasked with the
computation of the vector electric field in a region from a unique static charge distribution. The
prerequisite for this course includes a course in engineering analysis using MATLAB and they are
familiar with both its computational and graphical rendering capabilities.

A typical charge distribution is shown in Figure 1(a) below in which two rectangular conducting
plates are offset at an angle and are specified to have a uniform charge density + S C/m2 on the
upper plate and − S C/m2 on the lower plate. This plate configuration is introduced as an initial
model of electrostatic deflection plates, as shown in Figure 1(b).

(a) (b)

Figure 1: (a) Configuration of rectangular conduction plates with a uniform charge distribution
(b) actual electrostatic defection plates

The intentionally vague specification of the task is to calculate the vector electric field at an
arbitrary location P(x,y,z) for a specific uniform charge density S. The width X1 and length Z1
of the rectangular plates, the angle and the charge density S are randomly assigned to each
student to avoid direct duplication of the results.

The course learning objective is to effect the translation of a problem to an engineering analysis
to be solved by discrete summation, rather than integration, and to formulate a reasonable
solution. The method utilized is a discussion in the class with groups of students proposing
specifications to modify the task, as it becomes readily apparent that the task is “open-ended”.
The discussion is quite lively, requires research and takes place over several class meetings.
This is a salient object lesson for the students in design and analysis and the points are organized,
agreed upon and added to the task:

For example, what is the restriction on the location P? The region to be analyzed directly affects
the computational time and should be limited. What should be the size of the discrete charge
x y S and how does this affect the computational time and the result? Since such plates are
discovered by the students to be used to deflect a beam of charged particles, usually electrons by
the Lorenz force equation, the salient region is the middle of the plates (x = X1/2), but what
Page 15.728.3

should the z range of the solution be?


It soon also becomes apparent that specification needs to be further analyzed. For example, the
beam of electrons has a dimension and over what region should the vector electric field be
uniform? Should the upper plate have a length greater than Z1 because of the orientation angle
? Should the lower plate have an orientation angle of − to make the vector electric field more
uniform? These points provide a natural division of the task which is then parsed to each student
to further avoid direct duplication of the results.

b. Magnetostatics
Next in the typical undergraduate course in electromagnetics is a consideration of the vector
magnetic field due to an arbitrary distribution of current calculated by the Biot-Savart Law.
Utilizing first the somewhat implausible infinite line and ring of current closed form integral
solutions for the vector magnetic field are obtained. Solutions using Ampere’s Circuital Law for
the same current distributions can simplify the analysis. However, the fundamental aspects of
the Biot-Savart Law, expressed as a discrete summation, again provide additional insight for
more practical problems in magnetostatics.

The undergraduate students are now tasked with the computation of the vector magnetic field in
a region from a unique constant current distribution. The usual two circular coils of the
Helmholtz configuration are modified and presented as five rectangular coils as shown in Figure
2(a). The rectangular coils have a width X1, a height Y1, an arbitrary number of turns and
spaced along the Z axis as shown.

(a) (b)

Figure 2: (a) Configuration of rectangular coils with an arbitrary number of turns


(b) an actual Helmholtz coil

Following the precepts of the course learning objective, the students are familiar with the process
and begin the lively, iterative discussion to modify the task. Such coils are discovered by the
students to be used to provide a uniform magnetic field. It soon becomes apparent to them that
the coils should be spaced symmetrically.

However, should the coils be rectangular or square? What is the optimum distribution of the
Page 15.728.4

relative number of turns in each coil? Over what region and what is the specification for the
uniformity of the vector magnetic field? What should be the size of the discrete current element
I L? As before these points provide a natural division of the task which is then parsed to each
student to further avoid direct duplication of the results.

The results of the calculation of the vector electric and magnetic fields are provided as written
reports from each student with tabulated graphical renderings of the fields using MATLAB. The
written reports provide practice in the formatting of an engineering analysis with summary,
introduction, discussion and conclusion. These reports are to satisfy the additional course
learning objective of the application of technical writing. The results are summarized and
discussed in class to further illustrate the concepts of vector electric and magnetic fields.

The course learning object of the translation of a problem in electrostatics and magnetostatics to
an engineering analysis to be solved by discrete summation is directly assessed by focused
questions on examinations that propose a charge and current distribution and require that the
student provide the MATLAB code for the solution. These questions are graded by the choice of
the limit size x y and L of the discrete summation and the dot and cross product vector
manipulations required.\

An indirect assessment of the course learning objective is obtained by the survey at the end of
the course. Student comments on the survey have favorably noted the proportion (30%) of the
final grade assigned to and the insight provided by the tasks.

2. Impedance Matching Networks

A MATLAB project is assigned at the end of a two semester electromagnetics sequence. This
sequence begins with transmission lines1, where students learn such things as how to calculate
input impedance looking into a terminated transmission line and how to use a Smith Chart to
design an impedance matching network using sections of transmission line (a shunt stub
matching network). In the second course, students study applied electromagnetics culminating in
microwave engineering topics including microstrip. Students therefore have covered all the
necessary topics to perform a MATLAB project involving microstrip impedance matching
networks. The project handout follows, with the “Given” information varied for each student:

ELEC 3320 MATLAB Project Name:______________________________

You are expected to develop your own MATLAB code for this project. Teamwork
is unacceptable.

If a constant |ΓL| circle for transmission line terminated in a mismatched load is


drawn on a Smith chart, it will intersect the 1 ± jx circle at two points. Thus,
there are two fundamental solutions to a stub matching problem. The magnitude
of the reflection coefficient |Γ| looking into the matching network will ideally be
zero at the design frequency. Your task is to plot and compare |Γ| vs. frequency
for the two fundamental matching networks realized in microstrip. Your
Page 15.728.5

microstrip substrate has perfect conductors sandwiching a lossless dielectric.


Given:
Substrate relative permittivity εr = ____________________

Substrate height h = ____________________

Characteristic impedance Zo = ____________________

Load impedance ZL = ____________________

Type of shunt stub: __________________

Design frequency: __________________

Frequency range for plot: __________________

Note that you can solve for the matching network in terms of wavelength, but to
find the actual lengths you must design 50 Ω microstrip for your given circuit
board material and determine guide wavelength at your design frequency.

This project covers several interesting concepts. Students must find the two fundamentals stub
matching networks using a Smith Chart. The stub lengths from these solutions are in terms of
wavelengths, so to find the physical lengths students must design their microstrip transmission
lines and determine a guide wavelength at the design frequency. Finally, students compare the
reflection coefficient for the two solutions over a frequency range about the design frequency.
The project therefore ties together concepts from both semesters of electromagnetics.

A project grading rubric (Table 1) is provided to the students to guide their effort. This detailed
rubric both simplifies and standardizes the project grading. Student results were verified by a
MATLAB code developed that accepts the “given” information in the order it is displayed in the
project handout. The routine solves for the line lengths (in both wavelengths and in physical
lengths) needed for the two fundamental solutions and then plots the reflection coefficient
magnitudes as a function of frequency. In this way, it was straightforward to assess the
individual projects.

There were 30 students in the class and their MATLAB project scores ranged from a low score of
8% to a high score of 100%, with an average score of 79%. Figure 1 shows the results from one
student’s efforts. This particular student did an excellent job on all aspects of the project (see
appendix for student code). Figure 2 shows a plot from a student who did a very poor job not
only in the basic design but in the coding to generate a plot as well. The goal of the
individualized work was mostly met, though it was apparent that some collaboration did take
place in the code development.
Page 15.728.6
Table 1: Stub Matching Project Grading Rubric

score 0 1 3 5
1. Problem
Solution
a. Neat/organized Sloppy work and Sloppy work or Very neat and
Poorly organized poorly organized Well organized
b. approach Illogical, invalid Logical, valid
approach approach
c. execution three or more errors Two errors One error flawless

d. Smith Charts Poorly labeled Well-labeled,


Sloppy Neatly shows each
incorrect correct solution
e. Circuit sketch Sloppy sketch, Sloppy sketch or Neat, top-down
(top-down view of poorly labeled poorly labeled sketch
microstrip circuit) Well-labeled

2. Program
a. Task definition Task undefined in Task poorly Task somewhat Task well-defined
program heading defined in program defined in program in program heading
heading heading
b. organization Sloppy appearance Sloppy appearance Neat appearance
and or code hard to and
Code hard to follow Code easy to
follow follow
c. comments No comments Program clarified
with comments,
variables clearly
defined
d. code quality Three or more code Two code errors One code error No apparent errors
errors in code

3. Results
a. Performance Program fails to Program runs with Program runs but Program works
run error messages generated faulty perfectly
results
b. Discussion No discussion Poor discussion of Poor discussion of Key points
key points and key points or summarized;
conclusions conclusions conclusions are
drawn
c. |Γ| vs freq. plot Incorrect, sloppy, Correct, neat,
improperly labeled properly labeled Page 15.728.7
Figure 3: One student’s microstrip stub matching network, top-down view and plot.
Page 15.728.8
Figure 4: Poor and incorrect plot for the impedance matching project

4. 4-Dipole Array Beam Pattern

The radiation pattern for both dipole antennas and antenna arrays was covered in the second
electromagnetic course of a two course sequence in electromagnetics. There are a large number
of possible projects related to antennas and antenna arrays the students could be assigned. The
true difficulty is in determining a project that is achievable in a reasonable amount of time,
individualized, theoretically and computationally demanding and yet can be graded efficiently.

The project required the students to determine the radiation pattern in two planes for an array of
four dipoles located on the z-axis. Each dipole was separated by a quarter wavelength ( /4) and a
twentieth of a wavelength ( /20) long. The projects were individualized based on the last four
digits of a student’s identification number (ID). This was done in the following manner:

Assuming the last four digits of a student’s ID number are d1 d2 d3 d4:

Magnitude and location of currents of dipole currents:

Current number Current Current Current phase Current


location magnitude orientation
Element 1 z=0 I1 = |d1| 1 = 30*d1 º d1 even :z-axis,
d1 odd :y-axis
Element 2 z = /4 I2 = |d2| 2 = 30*d2 º d2 even :z-axis,
Page 15.728.9

d2 odd :y-axis
Element 3 z = /2 I3 = |d3| 3 = 30*d3 º d3 even :z-axis,
d3 odd :y-axis
Element 4 z = 3 /4 I4 = |d4| 4 = 30*d4 º d4 even :z-axis,
d4 odd :y-axis

All students were asked to develop a MATLAB program that accurately does the following:

1) Plots the normalized power pattern at = 90 degrees for all angles 0 < < 360 degrees in
polar form.
2) Plots the normalized power pattern at = 0 degrees for 0 < < 180 degrees in polar
form.
3) Describes the code and specifically discusses how they developed the formulas used in
MATLAB. Also, a flowchart of the code is required along with sufficient comments in the
MATLAB file to ensure the code can be understood. Students are also asked to include a
printout of their code along with a CD in their project report.

The final projects showed a remarkable amount of diversity with one individual researching the
advanced technique of using Euler angles2 for determining three dimensional surface plots of the
radiation pattern. What became clear from reading the student reports and programs was that
students could basically be separated into four groups: a) Students that understood the antenna
and array theory who were good MATLAB programmers b) Students that understood the antenna
and array theory who were poor MATLAB programmers, c) Students that had little understanding
of antenna and array theory who were good MATLAB programmers and c) Students that had little
understanding of antenna and array theory who were also poor MATLAB programmers.

Grading of the plots for correctness was relatively simple since a code that only required the
entry of the last four digits of the persons ID number had already been created. It was likely that
some collaboration occurred in a small number of cases. However, most of the codes were very
different with several people creating completely vectorized codes. The same basic grading
rubric of Table 1 modified for this project was used. A correct radiation plot from a student is
shown in Figure 5.

Conclusions

Several individualized MATLAB projects have been presented where students use MATLAB to
study fundamental topics in electromagnetics. These projects help satisfy the ABET criteria on
use of modern tools by requiring a significant degree of MATLAB programming that improves
student understanding of the course material.

Typical project reports and code for parts 1a and 1b are available at:
http://www.astro.temple.edu/~silage/archive.htm

Project and code for parts 2 and 3 are available at:


http://www.eng.auburn.edu/~baginme/matlab_emag_projects/
Page 15.728.10
Polar plot of Normalized Power Pattern: θ Variation
90
1
120 60
0.8

0.6
150 30
Normalized Power (Watts) 0.4

0.2

180 0

210 330

240 300
270

θ (degrees)

Figure 5: Polar Plot of Normalized Power Pattern from Variation in

Bibliography

1. Wentworth, S. M., Applied Electromagnetics: Early Transmission Lines Approach, John Wiley & Sons, 2007
2. T. Milligan, “More applications of Euler rotation angles,” Antennas and Propagation Magazine, IEEE, vol. 41,
1999, pp. 78-83.

Page 15.728.11

You might also like