This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
ecen_240_assignments [2016/02/28 00:10] petersen |
ecen_240_assignments [2016/09/07 09:18] (current) wilde [MT240.NR.0] |
||
|---|---|---|---|
| Line 32: | Line 32: | ||
| | Ch 10 | [[ecen_240_assignments#MT240.NR.10|MT240.NR.10]] | Sinusoidal Steady-State Power Calc| | | | Ch 10 | [[ecen_240_assignments#MT240.NR.10|MT240.NR.10]] | Sinusoidal Steady-State Power Calc| | | ||
| | ::: | [[ecen_240_assignments#MT240.NR.10.4.1|MT240.NR.10.4.1]] | Complex Power | [[matlab_guide#Annotation| Text]] | | | ::: | [[ecen_240_assignments#MT240.NR.10.4.1|MT240.NR.10.4.1]] | Complex Power | [[matlab_guide#Annotation| Text]] | | ||
| + | | ::: | [[ecen_240_assignments#MT240.NR.10.4.2|MT240.NR.10.4.2]] | Complex Power | Review | | ||
| | Ch 12 | [[ecen_240_assignments#MT240.NR.12|MT240.NR.12]] | Intro to L. Transform | | | | Ch 12 | [[ecen_240_assignments#MT240.NR.12|MT240.NR.12]] | Intro to L. Transform | | | ||
| | Ch 13 | [[ecen_240_assignments#MT240.NR.13|MT240.NR.13]] | L Transform in Circuit Analysis | | | | Ch 13 | [[ecen_240_assignments#MT240.NR.13|MT240.NR.13]] | L Transform in Circuit Analysis | | | ||
| Line 45: | Line 46: | ||
| Read and follow along with the document to get an introduction to MATLAB. \\ | Read and follow along with the document to get an introduction to MATLAB. \\ | ||
| - | {{:240matlab:ch0:matlab_intro.docx|}} \\ | + | {{:240matlab:ch0:matlab_intro.pdf|}} \\ |
| After completing the document, make sure that you feel comfortable with the following MATLAB topics: | After completing the document, make sure that you feel comfortable with the following MATLAB topics: | ||
| Line 212: | Line 213: | ||
| ===== Z-Circuit Analysis with Mesh Current Method ===== | ===== Z-Circuit Analysis with Mesh Current Method ===== | ||
| ==== MT240.NR.9.9.1 ==== | ==== MT240.NR.9.9.1 ==== | ||
| - | + | == Document == | |
| - | <file> | + | {{:240matlab:ch9:mt240_9_9_1_mesh_current_method.pdf|}} |
| - | MT240_9_9_1 Mesh_Current Method | + | |
| - | + | ||
| - | Objective: Design a circuit using capacitors and resistors that cause | + | |
| - | Vout to be 180 degrees out of phase with Vin. | + | |
| - | + | ||
| - | Background: Oscillators can be constructed from op-amps and an RC network. | + | |
| - | The basic theory is to create a 180 degree phase shift between Vin and | + | |
| - | Vout. This will cuase the op-amp to continuously oscillate in attempt to | + | |
| - | make both inputs the same voltage level (virtual short). | + | |
| - | + | ||
| - | Exercise: Refer to the provided image for this problem. | + | |
| - | You want to design a circuit that will oscillate at 40e3 Hz. You only | + | |
| - | have one resistor value (R = 1e3 ohms), but you have the various | + | |
| - | capacitors available (C = 1e-9:1e-10:20e-9). You decide to write a | + | |
| - | program to calculate the angle of Vout in reference to Vin as a function of | + | |
| - | Capacitance. To simplify calculations, you decide that every resistor | + | |
| - | must have the same value and every capacitor must have the same value. | + | |
| - | Also, since you are only interested in the phase shift of Vout, assume | + | |
| - | Vin to have a value of 1AC | + | |
| - | + | ||
| - | %Variables | + | |
| - | C = 1e-9:1e-10:20e-9; | + | |
| - | R = 1e3; | + | |
| - | w = 2*pi*40000; | + | |
| - | ZC = 1./(1j*w*C); | + | |
| - | Vin = 1; | + | |
| - | ic = zeros(1,length(ZC)); allocate space | + | |
| - | + | ||
| - | a) Label the currents in each mesh from left to right ia,ib, and ic. | + | |
| - | Use mesh current method to write a system of equations. | + | |
| - | + | ||
| - | System of Equations | + | |
| - | Vin = ia(...) + ib(...) + ic(...) | + | |
| - | 0 = ia(...) + ib(...) + ic(...) | + | |
| - | 0 = ia(...) + ib(...) + ic(...) | + | |
| - | + | ||
| - | Put the system of equations into matrix form. | + | |
| - | + | ||
| - | Matrices | + | |
| - | Impedances Currents A | + | |
| - | | (...) (...) (...) | * | ia | = | Vin | | + | |
| - | | (...) (...) (...) | * | ib | = | 0 | | + | |
| - | | (...) (...) (...) | * | ic | = | 0 | | + | |
| - | + | ||
| - | + | ||
| - | b) Solve for ic for every capacitor value. Remember that all | + | |
| - | three capacitors will have the same value. This means that | + | |
| - | you should have 191 different values of ic. | + | |
| - | + | ||
| - | %Solve for Currents: ia, ib, ic | + | |
| - | for m = 1:length(C) | + | |
| - | Impedances = [INSERT CODE HERE]; | + | |
| - | A = [Vin;0;0]; | + | |
| - | Currents = INSERT CODE HERE; | + | |
| - | ic(m) = Currents(3); | + | |
| - | end | + | |
| - | + | ||
| - | c) Calculate Vout for every value of ic. | + | |
| - | d) Calculate the phase shift of Vout in Reference to Vin. | + | |
| - | e) Plot the phase shift as a function of capacitance | + | |
| - | f) Question: Approximate the capacitor value that would create | + | |
| - | a phase shift of 180 degrees. | + | |
| - | </file> | + | |
| - | + | ||
| - | == Image == | + | |
| - | + | ||
| - | {{:240circuits:mt240_nr_9_9_1_mcmcomplex.png?300|}} | + | |
| - | + | ||
| - | == Template == | + | |
| - | + | ||
| - | {{:240matlab:ch9:mt240_9_9_1_t_meshcurrentmethodtemplate.m|}} | + | |
| - | + | ||
| - | == Solution Image == | + | |
| - | + | ||
| - | {{:240matlab:ch9:mt240_9_9_1_si_meshcurrentmethodsolutionimage.jpg?400|}} | + | |
| <ifauth @admin,@240ta> | <ifauth @admin,@240ta> | ||
| == Solution == | == Solution == | ||
| + | {{:240matlab:solutions:ch9:mt240_9_9_1_mesh_current_method.m|}} | ||
| + | </ifauth> | ||
| - | {{:240matlab:solutions:ch9:mt240_9_9_1_meshcurrentmethod.m|}} | + | <ifauth @admin,@240ta> |
| - | </ifauth> | + | |
| ===== Complex Power ===== | ===== Complex Power ===== | ||
| Line 355: | Line 282: | ||
| {{:240matlab:ch10:mt240_10_4_1_si2_complexpowersolutionimage2.jpg?400|}} | {{:240matlab:ch10:mt240_10_4_1_si2_complexpowersolutionimage2.jpg?400|}} | ||
| - | <ifauth @admin,@240ta> | + | |
| == Solution == | == Solution == | ||
| Line 361: | Line 288: | ||
| </ifauth> | </ifauth> | ||
| - | ===== Passive Filters ===== | + | ===== Complex Power ===== |
| - | ==== MT240.NR.14.4.1 ==== | + | ==== MT240.NR.10.4.2 ==== |
| + | {{:240matlab:ch10:mt240_10_4_2_complex_power.pdf|}} | ||
| - | <file> | ||
| - | MT240_14_4_1 Cross over network | ||
| - | Objective: Gain an understanding how you can use matlab to help you | + | <ifauth @admin,@240ta> |
| - | design lowpass, bandpass, and highpass filters. | + | == Solution == |
| - | functions to learn: log10, semilogx | + | {{:240matlab:solutions:ch10:mt240_10_4_2_complex_power.m|}} |
| + | </ifauth> | ||
| - | Introduction: A crossover network consists of a highpass, lowpass, and | ||
| - | bandpass filter. They are often used in stereo systems that separates | ||
| - | a signal into three signals (bass, treble, and midrange). You will design | ||
| - | a basic crossover network as depicted in the image below. | ||
| - | Exercise: Design a crossover network with the following specifications: | + | ===== Passive Filters ===== |
| - | | | Low pass | Bandpass | High pass | | + | ==== MT240.NR.14.4.1 ==== |
| - | |Lower cut off frequency | N/A | 250Hz | 2000Hz | | + | |
| - | |Upper cut off frequency | 250Hz | 2000Hz | N/A | | + | |
| - | a) For each filter design you will be calculating the transfer function | + | |
| - | of the voltage across each resistor. The equations should be simple | + | |
| - | voltage division as shown in the book. See chapter 14. Design your | + | |
| - | circuits choosing appropriate values for the capacitors and inductors. | + | |
| - | b) Find the magnitudes (|H(jw)|) for v1, v2, and v3 as a function of 'w' | + | |
| - | (frequency) with w being w = 0:10*2*pi:3e5*2*pi. Note that this is the | + | |
| - | transfer function (H(jw) = vout/vin) thus the amplitude of the input voltage | + | |
| - | source isn't needed in your calculations. | + | |
| - | 1) The midrange is a little more difficult so I provided you with the | + | |
| - | steps. | + | |
| - | a) Calculate the bandwidth. B = upper corner frequency - lower fc | + | |
| - | b) Solve for the inductor using the relationship B = R/L | + | |
| - | c) Solve for the capacitor value. | + | |
| - | c) Plot the magnitude in decibels vs the frequency(Hz) using a | + | |
| - | logarithmic scale. (use semilogx for this). | + | |
| - | d) How could you design a bandreject filter that rejects frequencies | + | |
| - | between 250Hz and 2000Hz? | + | |
| - | </file> | + | |
| - | == Image == | + | |
| - | {{:240circuits:hw13.png?400|}} | + | == Document == |
| - | + | {{:240matlab:ch14:mt240_14_4_1_crossover_network.pdf|}} | |
| - | == Template == | + | |
| - | + | ||
| - | {{:240matlab:ch14:mt240_14_4_1_t_crossover_networktemplate.m|}} | + | |
| - | + | ||
| - | == Solution Image == | + | |
| - | + | ||
| - | {{:240matlab:ch14:mt240_14_4_1_si_crossover_networksolutionimage.jpg?400|}} | + | |
| <ifauth @admin,@240ta> | <ifauth @admin,@240ta> | ||