Ece 102- write a matlab program that uses subplot to draw a


ENGINEERING COMPUTATION

Problem #1

The following table shows measured data for Im versus Vm.

X-15 Gadget: Current vs. Voltage

Measured voltage Vm

Measured current Im

(V)

(A)

1.00

8.26×10-2

1.45

3.32×10-2

2.15

1.31×10-2

2.50

5.94×10-3

3.05

2.56×10-3

3.55

1.22×10-3

3.94

5.11×10-4

4.53

2.17×10-4

4.97

2.17×10-4

a) Write a MATLAB program that uses subplot to draw a 2x2 grid of Im versus Vm using:

• linear-linear axes
• semilog axes (both lin-x,log-y and log-x,lin-y)
• log-log axes

Apply the principles of making "good" graphs (i.e., full axes labels, titles, markers, etc.). For fun, use a different marker type and marker color for each subplot. Also, turn on the grid to make it easier to see the scale divisions.

Attach a printout of your graph to your paper assignment.

Upload your MATLAB program to the appropriate D2L dropbox.

b) From examining the graphs, what type of functional relationship exists between the independent and dependent data (i.e., is it linear, power, or exponential)?

c) Calculate the numeric fitting parameters (i.e., m and b) for your selected relationship.

• Derive the correct curve fitting equations.
• You may perform calculations first and then round-off at the end.

Problem #2

A MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) is an active electronic component that can be used either as a digital switch or as an amplifier.

Figure 1 shows a three-terminal NMOS-type device. The terminals are the drain (D), source (S), and gate (G).

ID is the drain current
VDS is the drain-to-source voltage
VGS is the gate-to-source voltage

Figure 1: NMOS symbol

For an NMOS transistor, applying a positive VD voltage causes a current ID to flow. The amount of current is controlled by the gate voltage VG.

The drain current versus the drain voltage (i.e., ID versus VDS) is important when describing the performance of the transistor. Typically, the data is measured for several values of gate voltage (VG). The resulting "characteristic curves" are plotted on the same graph, similar to Figure 2.

Figure 2: NMOS characteristic curves1

1 https://www.electronics-tutorials.ws/transistor/tran_6.html

Task

Write a MATLAB program that meets these specifications:

• Prompts the user to enter a file name.

(The file with this name should contain measured ID-VDS data.)

• Reads the raw data from the file and stores it in appropriate arrays.

(Hint: Consider whether multiple 1-D arrays or a single 2-D array is more efficient.)

• Plots the characteristic curves on a graph, which should have these features:

o The 1st line of the title should be "ID-VDS Characteristic Curves".
o The 2nd line of the title should contain the name of the file.
o The x-axis label should be "Drain voltage VDS (V)".
o The y-axis label should be "Drain current ID (mA)".
o The legend should say "VGS = xx V", where xx is one of the gate voltage values.

o Hint: You can create cell arrays to hold multiple strings for the title and legend.

Attach a printout of your graph that uses data from SSOI2_NMOS_r12c11_50u_450.txt. Upload your MATLAB program to the appropriate D2L dropbox.

Important:

• Your program should have a title block and reasonable in-line comments.

• Your graph must look as similar to the instructor's graph style as possible. This includes marker symbols, font sizes, colors, labels, subscripts in labels, title, legend, etc.

• Your program should work for any data file that follows the format described below.

File Format

You are given two data files to use for testing:

• SSOI2_NMOS_r12c11_50u_450.txt (full set of actual measured values)
• reduced_data.txt (a subset of the SSOI2 file to make it easier for you to experiment with)

The internal organization of each file looks like this:

• The first line always states the number of VGS points.
• The second line always states the number of VDS points.
• The next block lists the gate-source voltage values (one per line).
• The next block lists of the drain-source voltage values (one per line).
• Following those are consecutive blocks of ID data values (one for each VDS) for a given VGS.

Hint: Look at the reduced_data.txt file. Once the raw data is read via dlmread, think about the array indices that mark the beginning and ending of each block. Since the file tells you the number of VGS and VDS points, see if you can find a general pattern for determining the indices of each block. You can then extract the desired data using the indices with the colon range operator.

Problem #3

Find two examples of "badly" designed graphs from outside sources. They can be from a magazine article, a book, a research paper, or a website. If the source is printed material, you can cut out the actual page, or photocopy it, or scan it. If it is from a website, you can print it out or do a screen capture.

Perform these tasks:

a) For each graph, list what is wrong with the graph.

b) Choose just one of your "bad" graphs and re-do it either on graph paper or via a graphing program (e.g., MATLAB). Fix all of the things that are wrong with the original graph. You may change the type of graph if that enhances understanding of the data.

Here are additional requirements:

• Each graph should be from a different source, e.g., one from a book and another from a website.
• Only submit graphs that are substantially bad! Each graph should have at least two major things wrong with it. The worse, the better!

Attachment:- Assignment.pdf

Request for Solution File

Ask an Expert for Answer!!
Other Engineering: Ece 102- write a matlab program that uses subplot to draw a
Reference No:- TGS02219882

Expected delivery within 24 Hours