homework7 - ECE 1574 Homework Set #7 Tanuj Godara 905279307...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 1574 Homework Set #7 Tanuj Godara 905279307 LAB EXERCISE In good C++ style, write a program which by a Monte Carlo technique estimates the reliability of the electrical circuit represented schematically below. ------2 ohms---- ----3 ohms----- | | | | | | | | --- ---- ---- | | | | | | | | | | | | | ------4 ohms---- -----6 ohms---- | | | 100 volts 10 - 20 ohms | | | | ___ ___ - - In the circuit, there are a 100-volt DC source, a 2-ohm resistor in parallel with a 4-ohm resistor, and then a 3-ohm resistor in parallel with a 6-ohm resistor. The circuit is terminated in a load whose value varies randomly between 10 and 20 ohms. REQUIREMENTS 1. Using a flat logarithmic distribution values for the load [that is, a distribution in which any value in the domain from ln(10 ohms) to ln(20 ohms) is equally likely], let your program solve the circuit 100,000 times, counting the number of times the voltage across the load falls below 77.5 volts. (You may use one or more C++ vectors or arrays in your code if you wish, but this is not required.) 2. Implement operations by function calls wherever reasonable to do so. For instance, implement the parallel combination of 2 and 4 ohms by a function call. 3. Let your program calculate the average across the 100,000 trials of (a) the total power delivered by the source and (b) the power disspated by each resistor, including the load. 4. Let your program output three numbers on separate lines: first, the number of times the voltage across the load falls below 77.5 volts; second, the average power delivered by the source over the 100,000 trials; and, third, the average power dissipated by each resistors over the 100,000 trials.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Seed the computer’s random-number generator with the integer 569. QUESTIONS
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

homework7 - ECE 1574 Homework Set #7 Tanuj Godara 905279307...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online