This is with Matlab programming Please resolve as you would

This is with Matlab programming. Please resolve as you would in Matlab.

Electric circuits are modeled Using Kirchchoff\'s voltage and current laws. The electric circuit under consideration is described by the following set of five algebraic equations: R_ii_1 + R_2i_2 - V_1 = 0 - R_2i_2 + R_3i_2 + R_3i_3 = 0 v_2 + R4i_4 - R_3i_3 = 0 - i_1 + i_2 + i_3 + i_5 = 0 Calculate the five unknown currents (i_1, i_2, i_3, i_4, and i_5) Using the following resistances and voltages as: R_1 = 470 ohm. R_2 = 330 ohm, R_3 = 560 ohm. R_4 = 100 ohm, R_5 = 1000 ohm. V_4 = 5V, v_2 = 10 V. Label the answers with current number and units. Using the resistances given above and v_1= 5V, write a program to find the range of positive voltages v_2 for which none of the currents exceeds 50 mA. The currents may be positive or negative. None of the currents may be less than - 50mA or greater than 50 mA. Output Format: Your program must display the current number and current value for part A in the form of a table as follows: For part B. find the range of voltages for which no currents are below - 50inA or above 50mA.

Solution

THE MATLAB CODE

clear all; % Clearing the workspace
% The parameters (Resisters and voltages) of the equation
R1 = 470;
R2 = 330;
R3 = 560;
R4 = 100;
R5 = 1000;
V1 = 5;
V2 = 10;
% Express the system of equations in vector form
% The coefficient matrix
A = [ R1 R2 0 0 0;...
0 -R2 R3 0 R5;...
0 0 -R3 R4 0;...
-1 1 1 1 0;...
0 0 -1 -1 1];
b = @(V2) [ V1; 0; -V2; 0; 0];
% Solve the system of equations for current
I = A\\b(V2);
% Print the result to the screen
fprintf(\'Current number\\tCurrent value(Amperes)\ \');
for i = 1:5
fprintf(\'\\t\\t%d\\t\\t\\t\\t%0.6f\ \',i,I(i));
end
% Answer to the Part B
index = 1;
for V2 = 0:0.05:100 % The vlotage range
if(max(abs(A\\b(V2))) <= 0.05) % Checking the current
V(index) = V2;
index = index +1;
end
end
% Disp
fprintf(\'For the range %f to %f of opsitive voltage\',min(V),max(V));
fprintf(\' V2, none of the currents exceeds 50mA.\ \');

OUTPUT

>> VIcurve
Current number   Current value(Amperes)
       1               0.004178
       2               0.009201
       3               0.014391
       4               -0.019413
       5               -0.005022
For the range 0.000000 to 24.700000 of opsitive voltage V2, none of the currents exceeds 50mA.
>>

This is with Matlab programming. Please resolve as you would in Matlab. Electric circuits are modeled Using Kirchchoff\'s voltage and current laws. The electric
This is with Matlab programming. Please resolve as you would in Matlab. Electric circuits are modeled Using Kirchchoff\'s voltage and current laws. The electric

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site