P 2.2-3 A linear element has voltage v and current i as shown in Figure P 2.2-3a. Values of the current i and corresponding voltage v have been tabulated as shown in Figure P 2.2-3b. Represent the element by an equation that expresses v as a function of i. This equation is a model of the element. (a) Verify that the model is linear. (b) Use the model to predict the value of v corresponding to a current of i = 6 mA. (c) Use the model to predict the value of i corresponding to a voltage of v = 12 V.

 

Hint: Plot the data. We expect the data points to lie on a straight line. Obtain a linear model of the element by representing that straight line by an equation.

 

Figure P 2.2-3

 

An electrical element is linear if it satisfies both superposition and homogeneity.

Superposition requires that  a model that produces a v from an i, then consider two such points that follow:

 

Homogeneity requires that a model that produces a v from an i, then consider the following:

To test this since there are no obvious points that are related, let’s plot this in MATLAB and get a “best straight-line” and then we will have the model to test linearity on.

 

From MATLAB, we find a relationship

MATLAB found a slope of 0.2565 (V/mA) and a y-intercept of 4.5983 x 10-15 V which is zero!

 

(a) Verify that the model is linear.

 

Superposition gives us

Superposition is valid!

 

Homogeneity gives us

Homogeneity is valid!

Model is Linear!

 

(b) Use the model to predict the value of v corresponding to a current of i = 4 mA.

 

From MATLAB we find v from

 

 

(c) Use the model to predict the value of i corresponding to a voltage of v = 12 V.

 

And again using MATLAB we solved

 

 

Model is linear:

Answers for (b) and (c)

 

MATLAB Plot and Code follows:

 

 

%Program to Plot Element Properties in Problem 2.2-3 to determine

%if the element is a linear element.  We can also determine a

%mathematical model for the element.

%Version 2019-2-19 D.W. Donovan

 

clear all;

v = [3.078 5.13 12.825]';

i = [12 20 50]';

x = i;

y = v;

a(:,2) = i;

a(:,1) = ones(size(i,2));

c = a\v;

b = c(1);

m = c(2);

 

inew = [min(i) : (max(i) - min(i))/1000 : max(i)]';

vnew = m*inew +b;

vb = m*(6) +b;

 

ic = (12-b)/m;

 

ls = ['Model Slope is ' num2str(m) ' (V/mA)'];

ly = ['Model Y-intercept is ' num2str(b) ' (V)'];

lv = ['v(i = 6 mA) = ' num2str(vb) ' (V)'];

li = ['i(v = 12 V) = ' num2str(ic) ' (mA)'];

 

ans = {'Slope ' m; 'Y-intercept ' b;

    'v(i = 6 mA)(V) ' vb; 'i(v = 4 V)(mA) ' ic};

 

ans

 

figure

hold on

plot(i, v, 'k *','MarkerSize',20)

plot(inew, vnew, 'k-', 'LineWidth', 3)

plot(max(i), min(v), '.w')

plot(max(i), min(v), '.w')

plot(max(i), min(v), '.w')

plot(max(i), min(v), '.w')

 

tt1 = 'PH 320 Homework Problem 2.2-3';

tt2 = 'Voltage vs Current for a Circuit Element';

ttn = 'D.W. Donovan -- ';

tnl = '\newline';

ttf = [tt1 tnl tt2 tnl ttn date];

xl = 'Current, i, (mA)';

yl = 'Voltage, v, (V)';

 

sp = 1;

axxmin = min(x)-sp;

axxmax = max(x) + sp;

axymin = min(y) - sp;

axymax = max(y) + sp;

 

 

title (ttf,'FontSize', 16)

xlabel(xl, 'FontSize', 16)

ylabel(yl, 'FontSize', 16)

legend ('Raw Data', 'Model Curve', ls, ly, lv, li,'Location','SE')

legend ('boxoff')

 

axis([axxmin axxmax axymin axymax])

 

 

%{

ans = 'Slope '           [    0.2565]

    'Y-intercept '       [4.5983e-15]

    'v(i = 6 mA)(V) '    [    1.5390]

    'i(v = 4 V)(mA) '    [   46.7836]

%}

 

 

 

 

Please send any comments or questions about this page to ddonovan@nmu.edu

This page last updated on February 19, 2019