Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help pls 2: hw06b.py solving simultaneous equations using sympy Given the following 3 simultaneous current equations for this transistor circuit, solve for id, Vo and

help pls
image text in transcribed
2: hw06b.py solving simultaneous equations using sympy Given the following 3 simultaneous current equations for this transistor circuit, solve for id, Vo and Vs ID=Kn(VDDVaVTN)2(1+(VDDVd))ID=Kn(VDViVTN)2(1+(VsVD))ID=Kn(VsVTN)2(1+Vs) 1. A: write a function solve(Kn, VDD, Vg, Vtn, lambda) which returns (Id, Vo, Vs) as a tuple. a. It should default Vtn =1 and lambda =0 if they are not given. b. Since it is a polynomial function it will have many solutions. Some will be complex some will be real, but invalid, but only one should solve the circuit. Use a for loop to go through the solutions returned by sym. solve and only return teh valid one. i. Make sure it only returns real valued answers. Sometimes the value will be reported as complex due to rounding errors even though it is real. So if it is complex look at the imaginary part and see if it is negligibly smanl (1+j1e25) is actually real ii. Verify that the answers are valid for the given problern. 1. Since this circuit has no negative supply, Vs, Vo and Ig must be positive. 2. Since this circuit is powered by a DC supply = VCC, no voltages can be above VCC iii. If no solution is found it should raise a ValueError exception. 2. Include a main function that takes Kn Vdd VgVtn and Lambda as command line arguments and prints the answer as a. "Id=\{:.2e\} Vo=\{:2e\} Vs={:2e} b. If no valid solution is found, then main program should print "No solution found" and return 1 c. For example: Sw06b.py 1e-3 5310.1 i. Should print "ld=2.94e-04 Vom3.49e+00 Vsa-1.51e+00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

Students also viewed these Databases questions

Question

What are the main dietary components of most nonhuman primates?

Answered: 1 week ago

Question

4 What typifies the first and second waves of HRM?

Answered: 1 week ago