Question

please do this problem in matlab and show me the code. Thanks.

Problem #1: Circuits and linear-systems In the last HW you developed the governing equations for the “Wheatstone”-bridge circ

Your task is to investigate the accuracy of the above output voltage approximation for the case were R2=R3=R4=R, and R1 = R +

c) Overlay (plot on the same plot) the small AR output voltage approximation Vinput (AR/(4R)). How accurate is this approximaplease do this problem in Matlab and show me the code. Thanks.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

clear;
clc;
close all;
r11 = 1200;
r2 = 1200;
r3 = 1200;
r4 = 1200;

for i = 1:100
   r1 = r11 + i;
   [V_out,~] = Wheatstone_bridge(10,[r1 r2 r3 r4]);
   vout_vec(i) = V_out;
   vout_vec_approx(i) = 10*i/4/1200;
end
plot(1:100,vout_vec);
hold on;
plot(1:100,vout_vec_approx);
legend("Function Plot","Approximation Plot");
xlabel("delta_R");
ylabel("V_out");

error = abs(vout_vec_approx-vout_vec);
figure;
plot(1:100,error);
title("Error plot");
xlabel("delta_R");
ylabel("error");

function [V_out,I_vector] = Wheatstone_bridge(V_in,R_vector)
    r1 = R_vector(1);
    r2 = R_vector(2);
    r3 = R_vector(3);
    r4 = R_vector(4);
    syms vb vc;
    eqn1 = (vb-V_in)/r1 + vb/r2 == 0;
    eqn2 = (vc-V_in)/r3 + vc/r4 == 0;
    [vb,vc] = solve([eqn1 eqn2],[vb vc]);
    V_out = double(vc-vb);
    I_vector(1) = (V_in-vb)/r1;
    I_vector(2) = (vb)/r2;
    I_vector(3) = (V_in-vc)/r3;
    I_vector(4) = (vc)/r4;
end

0.25 Function Plot Approximation Plot 02 0.15 V ut 0.1 0.05 0 10 20 30 40 50 60 70 80 90 100 deltar

109 Error plot 9 B 7 6 5 error 3 2 1 0 10 20 30 40 50 60 70 80 90 100 delta R

Add a comment
Know the answer?
Add Answer to:
please do this problem in matlab and show me the code. Thanks. please do this problem...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • please do this problem in matlab and show me the code. Thanks. please do this problem...

    please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks.please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me...

  • Please code in MatLab or Octave Output should match Sample Output in Second Picture Thank you...

    Please code in MatLab or Octave Output should match Sample Output in Second Picture Thank you 5. In this problem we will investigate using the Secant Method to approximate a root of a function f(r). The Secant Method is an iterative approach that begins with initial guesses , and r2. Then, for n > 3, the Secant Method generates approximations of a root of f(z) as In-1-In-2 n=En-1-f (x,-1) f(Fn-1)-f(-2) any iteration, the absolute error in the approximation can be...

  • MATLAB PROGRAM FOR THE FOLLOWING PROBLEM Using Matlab write a program that will plot the pressure...

    MATLAB PROGRAM FOR THE FOLLOWING PROBLEM Using Matlab write a program that will plot the pressure signal, the perceived pressure signal, the resistance and the output voltage as functions of time, for Problem 1.30 in the textbook. (B) Using Matlab show a plot with the output voltage range if we happen to know that the transfer function (gain) has an uncertainty of 15% and the time constant has an uncertainty of 10%. (Note: the solution of the problem is provided...

  • can someone show me how to do this please i think i was taught that when...

    can someone show me how to do this please i think i was taught that when i want to find the output resistance then all i need to do is short circuit the input voltage and add a nominal voltage attached to Vout inorder relate with ohms law to find output resistance thank you (c) The small-signal equivalent circuit of a voltage follower is shown below in Fig. 2.3. (3 marks) Determine an expression for the small-signal output resistance of...

  • hi can you sovle this problem and do the matlab code please. thanks Problem #1 From ECE 102 Engineering Computation...

    hi can you sovle this problem and do the matlab code please. thanks Problem #1 From ECE 102 Engineering Computation textbook-, problem #1, page 126: Note: C is coulombs of charge, A is amperes of current The flow of charge in a conductor varies with time according to the function g(t)=(1-3,-)C a) Ifk -0.1s, find the current atl e Express your result rounded to 3 decimal places dt b) What is the current for very large values of time r?...

  • Please help me write a code for this in Matlab T = 1 millisecond Vm =...

    Please help me write a code for this in Matlab T = 1 millisecond Vm = 1 volt (amplitude voltage) t = linspace(-T, 2*T, 3001) The following pararameter is given v(t) = Vm - (Vm/T)t for 0<= t <= T 0 elsewhere I need to modify the vector v so that is represents a periodic function with a period T over this time period (hint: it should look like a sawtooth), and plot v vs t over the range from...

  • Please read the instructions carefully and show me the matlab code in detail and the graph...

    Please read the instructions carefully and show me the matlab code in detail and the graph For all the questions below, whenever necessary, use a time resolution of 10ms for your time axis and plot in the range t 10,10]. Matlab hint for time axis: t [0:0.01:101 Remember your script should be self-sufficient and run without any errors to receive any points. Question 1. Find the impulse response h(t) for the LTIC system (1) provided below, using Matlab's built in...

  • Matlab for engineers 5th edition please help me with this problem with explanation. Consider the following...

    Matlab for engineers 5th edition please help me with this problem with explanation. Consider the following mathematical expression to create a single input-output function. y= −x​3+ x​2 + 2 a)Create a single input-output function that can accept scalar and matrix values. b)Plot the output versus the input, and properly label the axes and add a title. Note: the plot command should be coded inside the function file. c)Calculate y values for x= [−10, 10] with an appropriate increment.

  • please answer all questions neatly and use Matlab for part C Vout - - Current Source...

    please answer all questions neatly and use Matlab for part C Vout - - Current Source Current-to-Voltage Converter SkW variable voltage 0-5V Figure 4. Current- to- voltage converter 3.- Current-to-Voltage Converter An op amp can be used to produce a voltage proportional to a given current as shown in fig. 4 a) (5 points) Derive the formula for the output voltage Vout. For full credit show all the steps of the formula derivation in a clear way, and indicate which...

  • The Taylor polynomial approximation pn (r) for f(x) = sin(x) around x,-0 is given as follows: TL ...

    The Taylor polynomial approximation pn (r) for f(x) = sin(x) around x,-0 is given as follows: TL 2k 1)! Write a MATLAB function taylor sin.m to approximate the sine function. The function should have the following header: function [p] = taylor-sin(x, n) where x is the input vector, scalar n indicates the order of the Taylor polynomials, and output vector p has the values of the polynomial. Remember to give the function a description and call format. in your script,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT