Question
Please answer with screenshot of code in Python
sistor and one capacitor. Exercise 8.1: A low-pass filter Here is a simple electronic circuit with on - Vour Vin - W- This ci
di = Rc (Vin – Vout). a) Write a program (or modify a previous one rogram (or modify a previous one) to solve this equation f
0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: If you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

Note: Brother sometimes while uploading on HomeworkLib the indentations change. So, I request you to verify it with screenshot once. This is the link where I have saved the code too

https://trinket.io/python3/bfdd2b0be3

import matplotlib.pyplot as plt
import numpy as np
def dydx(RC,x, y):
Vin=-1;
if(np.floor(2*x)%2==0):
Vin=1;
return (1.0/RC)*(Vin-y);
  
# Finds value of y for a given x using step size h
# and initial value y0 at x0.
def rungeKutta(RC,x0, y0, x, h):
# Count number of iterations using step size or
# step height h
n = (int)((x - x0)/h)
# Iterate for number of iterations
y = [y0];
xx=[x0];
for i in range(1, n + 1):
"Apply Runge Kutta Formulas to find next value of y"
k1 = h * dydx(RC,x0, y[i-1])
k2 = h * dydx(RC,x0 + 0.5 * h, y[i-1] + 0.5 * k1)
k3 = h * dydx(RC,x0 + 0.5 * h, y[i-1] + 0.5 * k2)
k4 = h * dydx(RC,x0 + h, y[i-1] + k3)
  
# Update next value of y
y.append(y[i-1] + (1.0 / 6.0)*(k1 + 2 * k2 + 2 * k3 + k4))
  
# Update next value of x
x0 = x0 + h
xx.append(x0);
return xx,y;
  
# Driver method
x0 = 0
y = 0
x = 10
h = 0.02
for RC in [0.01,0.1,1]:
xx,yy=rungeKutta(RC,x0, y, x, h);
plt.plot(xx,yy);
plt.legend(['RC=0.01','RC=0.1','RC=1']);
plt.show();

M Inbox - gurkaranpreet.singh.me x Trinket * C Please Answer With Screenshot x C My Q&A | Chegg.com x + - X C trinket.io/libr

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Please answer with screenshot of code in Python sistor and one capacitor. Exercise 8.1: A low-pass...
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
  • Learning Goal: To analyze and design a passive, first-order low- pass filter using a series RL...

    Learning Goal: To analyze and design a passive, first-order low- pass filter using a series RL circuit. The analysis and design will be repeated for a series RC circuit. An electrocardiogram needs to detect periodic signals of approximately 1 Hz (since the resting heart rate of a healthy adult is between 55 and 70 beats per minute). The instrument operates in an electrical environment that is very noisy with a frequency of 60 Hz. It is desirable to have a...

  • Learning Goal: To analyze and design a passive, first-order low-pass filter using a series RL circuit....

    Learning Goal: To analyze and design a passive, first-order low-pass filter using a series RL circuit. The analysis and design will be repeated for a series RC circuit. An electrocardiogram needs to detect periodic signals of approximately 1 Hz (since the resting heart rate of a healthy adult is between 55 and 70 beats per minute). The instrument operates in an electrical environment that is very noisy with a frequency of 60 Hz. It is desirable to have a low-pass...

  • Please answer all parts thank you 6. [15 POINTS] Consider a passive low-pass filter as shown...

    Please answer all parts thank you 6. [15 POINTS] Consider a passive low-pass filter as shown below. 1k2 + - m - + Vin(t) 1 mF Vout(t) a) Derive a transfer function for the above circuit. b) Derive a time-domain expression for the unit impulse response of the circuit. Also, plot the impulse response as a function of time. c) Derive a time-domain expression for the unit step response of the circuit. Also, plot the step response as a function...

  • Analysis and Design of Low Pass Filters 1 of 3 > Before designing the throne must...

    Analysis and Design of Low Pass Filters 1 of 3 > Before designing the throne must understand the relationship between the output voltage of the circut and the frequency. For a series RL crout, how do the impedances of the circut elements depend on the frequency? Select the correct answer View Available Hintſ Learning Goal: To analyze and design a passive, first-order low-pass filter using a series RL rout. The analysis and design will be repeated for a series RC...

  • What is the answer to question 23.1? 23.1 Active low-pass filter You can make a low-pass...

    What is the answer to question 23.1? 23.1 Active low-pass filter You can make a low-pass filter by putting a capacitor Cr and resistor Rf in parallel for Zj as shown in Figure 23.1. At low frequencies (well below the corner frequency), the feedback impedance is approximately Rf and the gain of a non-inverting amplifier is is 1 +R//R,. At high frequencies (well above the corner frequency),the impedance is approx- imately 1/(jwCs), and the gain of a non-inverting amplifier is...

  • 4. The switched-capacitor filter implementation of a two-integrator loop is shown below. Assume a clock frequency of fe 100 kHz, and C-C2-5 pF Ca (by (a) An optimally flat low-pass response is...

    4. The switched-capacitor filter implementation of a two-integrator loop is shown below. Assume a clock frequency of fe 100 kHz, and C-C2-5 pF Ca (by (a) An optimally flat low-pass response is realized when Q 1/V2 and wan w.Design the circuit so the 2d integrator's output is an optimally flat low-pass function where w1000 and the DC gain is 1. (Hint: see section 17.11.2 in the text) 4. The switched-capacitor filter implementation of a two-integrator loop is shown below. Assume...

  • 1. Read the laboratory supplement entitled “Frequency Response". 2. Read the remainder of this handout. 3....

    1. Read the laboratory supplement entitled “Frequency Response". 2. Read the remainder of this handout. 3. In Multisim, build the circuit shown in Figure 1 with C=0.22 uF and R = 2.2 k12. This circuit looks like a simple voltage divider except that one of the resistors is replaced by a capacitor. Il Figure 1: RC network. F Set up Vin to be a 1 Vpp sinusoid with 0 VDC Offset using a function generator. 2. Connect the oscilloscope in...

  • Please answer parts E, F and G given answers for previous steps: a) High Pass Filter...

    Please answer parts E, F and G given answers for previous steps: a) High Pass Filter or HPF b) Reactance Xc = 1/(2 x pi x f x C) = 1/(2 x 3.14 x 1000 x 47 x 10-9) = 3386.28 Ohm c) Impedance = (15002 + 3386.282) = 3703.63 Ohm d) Cut off frequency = 1/ (2 x pi x R x C) = 1/(2 x 3.14 x 1500 x 47 x 10-9) = 2258 Hz = 2.258 kHz...

  • Analyals and Deaign of High-Pass Filters O 5o 14 > I Review I Corstante Learning Goal:...

    Analyals and Deaign of High-Pass Filters O 5o 14 > I Review I Corstante Learning Goal: To analyze and design a passive, first-order high-pass titer using a series RC arcuit. • Part A-Qualtative analysis of a series RC low-pess fiher An instrument nceds to detect penodio signals ot approximately 5O00 Hz. The instrument operates in an environment with a lot ot periodic noise ranging trom a few to several hundrod hertz. Ahigh-pass RC titer can be bult using avalable 2.5...

  • skipped part. Tutorial Exercise The RC high-pass filter shown in the figure below has a resistance...

    skipped part. Tutorial Exercise The RC high-pass filter shown in the figure below has a resistance R -0.500 n and a capacitance C = 673 pF. What is the ratio of the amplitude of the output voltage to that of the input voltage for this filter for a source frequency of 583 Hz? R Scout Step 1 The source frequency given in this problem is not an especially high audio frequency so we might guess that the voltage transfer ratio...

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