Saturday, May 27, 2017

Op Amp Relaxation Oscillator Lab

Objective:
The purpose of today's class meeting was to focus on Op Amp AC circuits. The key to analyzing op amp circuits is to treat them as ideal op amps. This means that no current enter the positive and negative intervals of the op amp. The voltages at the positive and negative inputs are zero. The first step in dealing with op amp ac circuits is to transform the circuit to the frequency domain and then apply the ideal op amp analyzation to find the output voltage. We also covered the idea of producing or converting dc to ac by the process of an oscillator. An oscillator is circuit that produces an ac waveform as output when powered a by a dc input. However, in order for sine wave oscillators to sustain oscillation, they must meet the Barkhausen criteria which is that the overall gain must equal 1 or greater and the overall phase shift must be zero. Finally, we covered instantaneous power and average power.

Group Practice:
1. The problem shows an ac op amp and the first step is to convert its frequency domain. We then apply the idea that the op amp is ideal. With this in mind, we can solve for the voltage output more easily. Though, we must first apply nodal analysis at node 1 and 2 as show in figure 1.
Figure 1. AC op amp
2. The problem below shows how to solve for the instantaneous power which is the power at any instant time. If the voltage and current are in the form of a cosine as seen in figure 2, we can calculate the power by multiplying the voltage and current. We then apply trigonometric identity and express in the form as seen below.
Figure 2. Solving for instantaneous power while applying a trigonometric identity. 
3. Below, we have circuit and are told to find the current flowing through the resistor and capacitor, as well as finding the current flowing through the inductor. In order to find the currents, we must first solve for the overall current flowing through the AC power source. Then we can apply a current divider. Though, we must transform the circuit to its phasor domain. We will then find the Zeq in order to find the overall current.
Figure 3. Solving for the currents in the circuit.
Op Amp Relaxation Oscillator Lab:
1. The lab requires us to create an oscillator in which a dc source is converted to ac. Based on figure 4, we must design an op amp relaxation oscillator having a frequency of Hz. However, we must find a convenient capacitor and β = R1/(R1+R2). We choose β=1/2, so R1 and R2 will be 1KΩ. We will use the equation as seen in figure 5 to find the resistance R. But first we find the Period which is t=1/f. Thus, out theoretical T = .00196. We substitute the period, β, and capacitor into the equation in figure 5 and acquire a theoretical resistance R =896ohms
Figure 4. Op Amp Relaxation Oscillator
Figure 5. Theoretical Calculations.
2. We measure our component as follows, R= 874Ω±.5, R1=.985KΩ±.005, R2= .985KΩ±.005, C=.95 μF±.005. The actual set can be seen below.
Figure 6. Actual circuit set up.
3. We tested our oscillator id did not acquire an expected waveforms. We tried fixing the problem but were unable to find the solution on why our plot looked uneven.
Figure 7. Results for voltage across the capacitor. 
4. The results should be similar to the image as seen in figure 8.
Figure 8. Expected results.

Friday, May 26, 2017

Apparent Power and Power Factor Lab

Objective:
Today's class meeting covered effective or RMS value. Through some calculation we found that the effective value is its root mean square. We can then use the rms values in terms of the average power where P = Vrms*Irms*cos(θ៴-θі). We also discussed about apparent power and power factor. The avg power mentioned ealier is the product of two terms where the product of Vrms and Irms is known as the apparent power and the factor cos(θ៴-θі) is known as the power factor. The power factor is the ratio of the average power to the apparent power. In other words, pf = P/S where S is the S = Vrms*Irms. The power factor in this case is dimensionless. Also, the power factor is the cosine of the phase difference between voltage and current.

Group Practice Problems:
1. The problem below proves the relationship between the effective and RMS values. They are in this case equal to each other as seen below. Therefore, we will not refer to the effective values but as RMS values.
Figure 1. RMS and effective values 
2. The problem below requires us to find the apparent power S and power factor pf which is dimensionless. We have a circuit where a resistor is connected in series with an inductor powered by an AC outlet of 210 and a frequency of 50Hz. The 210V is actually the Vrms. The first step is to convert the frequency to angular frequency and transform the circuit to its phasor domain. We will then find the Irms by using the equations I=Vrms/Z where Z is the equivalent and transformed t polar form for easier manipulation. The power factor is calculated by multiplying the Vrms and Irms. The power factor is the cos(θv-θi).
Figure 2. Calculating the power factor and the apparent factor
3. The problem below shows given voltage across  a load and a current through the element in the direction of the voltage drop. We are told to find the complex power, apparent power, the real power, reactive power, power factor and the load impedance. The results are shown below. 
Figure 3. Find the powers f a circuit given v(t) and i(t).
Lab Procedures and Results:
1. We are building a circuit . Given our theoretical values, we will calculate for the following: Irms, Vrms, apparent power, power factor, average power to load, average power dissipated by Rt, and the ratio between the average power Rt and the load. Our calculation can be seen below and we are required to find them while changing the RL= 10, 47 and 100Ω. 
Figure 4. Theoretical calculations procedures. 
2. Our theoretical calculation can be seen below for different RL in figure 5.
Figure 5. Theoretical and experimental values.

3. Values of Components: RT= 10.8ohms, L = 1mH, RL=10.8ohms ,RL=48.3 ohms, RL=99.1 ohms. The actual set up can be seen below. 
Figure 6. Actual set up of circuit.
4. Our experimental measurements are seen below in figure 7, 8, and 9 and can be seen in comparison with our theoretical values seen in figure 5.
Figure 7. Measurements based on RL = 10 ohms.
Figure 8. Measurements based on RL = 47 ohms.

Figure 9. Measurements based on RL=100 ohms.
5. The next step is to acquire the same data but introducing a 1 mF capacitor  parallel to the load. Measurement can be seen in figure 10, 11, and 12. The real value for the capacitor in the actual circuit is .949mF.
Figure 10. 1mF capacitor in parallel to the load where the RL = 10ohms.
Figure 11. 1mF capacitor in parallel to the load where the RL= 47ohms
Figure 12. 1mF capacitor in parallel to the load where the RL= 100ohms.
Lab Learning Outcome:
The objective of the lab is to compare our theoretical results with our experimental results for Irms and Vrms for different load resistor of  RL=10.8ohms±.1 ,RL=48.3 ohms±.1, and RL=99.1 ohms±.1. The load is composed of the inductor which is L = 1mH in series with the RL. There is also and Rt in series with the load which is represented as the transmission line which has a resistance of RT= 10.8ohms±.05. We calculated our theoretical Irms and Vrms based on our formulas seen in figure 4 where are results are seen in figure 5. When comparing them to our experimental results, we acquired a percent error for the Irms of 3.16% when RL=10ohms, 2.39% when RL=47ohms, and 1.46% when RL = 100ohms. The Vrms percent error are .16% for RL=10ohms, 2.47% for RL=47ohms, and 2.05% for RL=100ohms. By having a small percent error, we can conclude that our theoretical calculation serves its purpose in solving for the Irms and Vrms, as well as calculate the apparent power, power factor, and the phase shift.

Friday, May 19, 2017

Group Projects and Practice Problems using the Phasor Domain

Objective:
The new method of transforming the circuit to the phasor domain but now applying all the methods we covered this semester such as nodal analysis, mesh analysis, etc. During calculations, we will be required to create a matrix of complex numbers in order to solve for unknown current or voltages. Though, we must used rref in order to solve for the unknowns when using MATLAB. Superposition are important to solve for a circuit where there are two sources with different angular frequencies being applied. We covered source transformations using the phasor domain. We reflect back to source transformation which is, when a resistor is in parallel with a current source, we can replace it with a voltage source. Also, we can replace a voltage sources which is in series with a resistor with a current source in parallel with the resistor used to calculate the current source.

Group Practice:
 1. The problem below shows a circuit in which there is a current source and are told to find the current through the .1F capacitor. The first step is to find the phasor domains for the inductor and capacitor as shown in figure 1. We can then apply nodal analysis at node one solve simplify into a linear equation. We then apply nodal analysis to the second node and simplify in terms of a linear equation. Since, we are able to solve for voltage 2 in terms of voltage 1. We can use substitution in this case or place it into a matrix and solve in MATLAB. After the voltage is solved we can change it to polar form and solve for the current.
Figure 1. Finding the current through the capacitor.
2. The following problem tells us to find the currents using KVL using 3 loops. However, we notice that one loop is given to us. We apply KVL and place it into system of linear equation and place it into a matrix for MATLAB to solve. It is important to first transform the circuit to its phasor domain before starting to work on it.
Figure 2. Solving for the current using 
3.  The problem below requires us to find the thevenin equivalent from terminals a and b. The first step is to transform the circuit into the phasor domain. We will apply KCL at node 1 and then KVL to the right loop as seen in figure 3. 
Figure 3.
Learning Outcome:
There was no Lab today but we practice using KVL,KCL, mesh analysis, nodal, analysis, thevenin equivalent in the form of a phasor domain. Same process is implemented when dealing with the phasor domain. We also covered the grading rubric and what is expected for the final project presentation. We got together with out partners and created a plan for the upcoming days. There is a pert chart that we must complete and include in our presentation.

Wednesday, May 17, 2017

RLC Circuit Response Lab


Objective: 
We obtained the step response for RLC circuits when in series and in parallel. Also, we introduced and dealt with second order op amp circuits. In dealing with these circuits, it is important to KVL or KCL and rearranging the terms so that there is a second order differential equations. However, we keep in mind that there is a steady state response which is the final values of what is being found v(t) or i(t). The complete solutions change for overdamped, underdamped, and critically damped. The completed solution consists of the transient response and the steady state response. There is no source free do deal with which means we need to keep in mind of the voltage or current source.

Groupe Practice:
1. The problem below tells us to find i(t) for t>0. First we find i(0) and v(0) before it is opened which we get i(0-)= 0 since inductors acts like a short circuit and the capacitor has a voltage of v(0-) = 20V  when fully charged. Yet, when closed for t>0, the voltage source is disconnected and only the LC circuit remains. We have a source free series LC circuit. We then find the alpha and omega and check whether it is overdamped, underdamped, or critically damped.
Figure 1. Finding the i(t) for t>0
2. The problem below will solve for the natural response and will write the completed response in the end. Also, the coefficients will be solved. However, we first find the initial conditions of the circuit.
Figure 2. Find the initial conditions and solving for the natural response and complete solution. 

RLC Circuit Response Lab Procedures and Results: 
1. This lab requires us to find the maximum overshoot, rise time, and DC gain based on the circuit show in figure 3. We will estimate theses values and compare them to the experimental measurements. 
Figure 3. Circuit schematic for RLC circuit. 
2. For the pre lab, we first write the differential equations of the system which is seen in figure 4. the equations is seen in orange where α(neper frequency) = 1/CR2 + 1/L and ω(undamped natural frequency) = R1/R2LC + 1/LC
Figure 4. Differential equations relating to voltage output and input
3. The actual circuit setup can be seen in figure 5. The measure values for the circuit are: R1= 47Ω, R2= 2.2 ohms L = 1mH, C = 1nF. We apply a 2V step input at low frequency so that the circuit reaches steady state between pulses. Based on the graphs recorded, we will measure the input and output voltage.
Figure 5. Actual RLC circuit.

 4. We acquired an overshoot of overshoot=51.188%, voltage in = 2.0844V, voltage out =
Figure 6. Voltage input and voltage output 

Figure 7. voltage input and voltage output
Learning Outcome:
Based on the RLC circuit schematic, we can calculate the initial values, i(inductor) = Vin/R1+R2 = .04065A and the voltage at the capacitor is Vc=




Impedance Lab

Objective:
We covered phasor relationships for circuit elements. Based on the acronym "ELI the ICE man", we are able to see what value leads what. For instance, ELI means that for an inductor, the voltage leads the current. For ICE, in terms of dealing with an inductor, the current leads the voltage. Finally, for the resistor, the voltage is in phase with the current. The following are the voltage current relations for three passive elements: V=IR for resistor, V = jധLI for an inductor, V = I/jധC for a capacitor. Theses equations can then be written in terms of a ratio of the phasor voltage to current in terms of Z which represents the impedance. the impedance may be represented in rectangular form, Z= R+jX where R is the resistance and X is the impedance of the element being dealt with. We can then apply this to Kirchhoff's Laws in the Frequency Domain.

Group Practice:
1. The problem below shows a voltage source of 10cosωt connected in series with a resistor of 5Ω and a capacitor of .1F. We write the impedance and solve for it as seen below. We also solve for the current by using I=V/Z where the Z is changed to polar form. It is easier to divide using polar form. We now solve for the voltage across the capacitor using equations V = IZc. The final results will be in the time domain.
Figure 1. Solving for the current and the voltage across the capacitor.
2. The same situation is modeled as in figure 1. However, there is a current source and a capacitor to deal with. We solve for the impedance
Figure 2. Solving for voltage across the capacitor involving a current source.
3. The problem below shows a circuit with an inductor parallel to a capacitor. In order to solve this, we need to find the impedance of the elements and find their equivalent. We can use a voltage divider in order to find the voltage across the 5H inductor. We keep in mind that we will need to change between rectangular to polar form. 
Figure 3. Solving for the voltage across the inductor in terms of the time domain.
Impedance Lab Procedures and Results:
1. For our pre lab, we are required to calculate the impedances of the resistor, inductor and capacitance as seen in figure 4. We will also find the current for each component in terms of it magnitude and the phase angle as seen in figure 5. 
Figure 4. Finding the impedance of each circuit.
Figure 5. Solving for the current in terms of magnitude and phase angle.
2. We construct the circuits from figure 4 and measure the voltage across the 47Ω resistor for each component connected in series, the current and the voltage across each components as seen in figure 4.  The measurements for the components are as follows: Resistance = 46.9士 .05Ω, R = 98.8士.05Ω, C = .092uf士.005, L = 1mH
3.  A 47ohm resistor will be connected in series with a a resistor R = 98.8ohms. Then the resistor will be changed to a capacitor C=.092uf with the 47 ohm resistor still connected in series. Finally, the capacitor will changed out to an inductor L = 1mH with the 47 ohm resistor still in series. The oscilloscope measures the voltage across the component mentioned, the current which is mathematically written as Voltage across the 47ohm resistor divided by the resistor value, I=Vr/R. The measurements can be seen below. The voltage input for all experiments are v(t) = 2cosωt. we also acquire our frequency by ω=2πf where f is 1kHz,5KHz and 10KHz
Figure 6. 1KHz with resistor
Figure 7. 5KHz with resistor
Figure 8. 10KHz with resistor
Figure 9. 1KHz with inductor
Figure 10. 5KHz with inductor
Figure 11. 10 KHz with inductor
Figure 12. 1KHz with capacitor
Figure 13. 5KHz with capacitor
Figure 14. 10KHz with capacitor
4. Out theoretical results are compared to experimental results as seen in figure 15.
Figure 15. Theoretical and experimental results
Learning Outcome: 
The lab requires finding the impedance Z of three circuits that contain a resistor Resistance = 46.9士 .05Ω  to another resistor R = 98.8士.05Ω, resistor Resistance = 46.9士 .05Ω, connected to an inductor  L = 1mH, and resistor Resistance = 46.9士 .05Ω, connected to a capacitor C = .092uf士.005. We are told to input a sinusoidal voltage of v(t)= 2cos(ωt) where 2 is the amplitude and ω is the frequency. When calculating the theoretical impedance, we must point out that our given freqencies of 1kHz, 5kHz, and 10kHz must be changed to rad/sec, so the equation ω=2πf will be used. Though, for the experiment, the frequency in hertz is used. Calculations for impedance for each set up can be seen in figure 15, as well as the current in the form of time domain. We are able to compare our theoretical and experimental amplitudes for the current which shows a percent differene of less than 6% for all sets up meantioned above. We can see based on out theoretical calculations that for the resistor connected in series with another resistor that voltage is in phase with current not matter whhat the freqnency. However, for the circuits that are connected with the resistor in series with the inductor or capacitor are different. For the inductor, the voltage leads the current and for the capacitor, the current lead the current. We ere unable to find the phase difference between the current and the voltages. 

Saturday, May 13, 2017

Phasors: Passive RL Circuit Response Lab

Objective:
We entered the world of alternating voltage where we have sinusoids to deal with. For instance, if we have a v(t)=Vsinwt, the v is the amplitude (vertical stretch), w is the angular frequency in rad/sec(stretches the wave), and can have a phase shift or vertical shift.  We can also see if we graph two sinusoidal voltages where one has a phase shift, we can see which voltage leads or lags the other. When we deal with sinusoids and adding them, we can use a graphical technique which makes calculations easier. the horizontal axis represent the magnitude of cosine and vertical axis represent the magnitude of the sine. Steinmetz is the father of AC analysis and now sinusoids can be expressed in terms of phasors. Phasors is a complex number that represents the amplitude and phase of a sinusoid. Our complex number can be written or represented in three ways: rectangular form, polar form, and exponential form.

Group Practice:
1. The image below show how to add two sinusoidal voltages by using a a graphical technique. the length is calculated by calculating the magnitude and finding the angle using trigonometry.
Figure 1. Calculating the magnitude and direction of the sinusoidal voltages.
2. The problem below shows two sinusoidal voltages and are told to find the phase between the two voltages. Using the graphical technique, we can see that the phase is 90-50-10 = 30 degrees.
Figure 2. Calculating the phase between two sinusoidal voltages using the graphical technique.
3. We are given a complex number in rectangular form We are told to rewire it in polar form, therefore, we must find the magnitude, as well as the phase angle using inverse tangent.
Figure 3. Rewriting the complex number from rectangular to polar form. 
3. The image below shows polar form complex number in which will be rewritten in rectangular form. Each piece is transformed and then added up. Finally, they will transformed back to polar form and taking the square root. It is easier to to do the square root when in polar form and easier in rectangular form when adding.
Figure 4. The image below shows the order in which we evaluate the complex numbers. 
4. We are given a phasor and must find the sinusoidal representation of the phasors. In order to this, we need to convert the phasor in polar form and then multiply as seen below. Finally, we can convert it to a time domain.
Figure 5. Transforming a phasor into a time domain.
5. We are told to find a current trough a .1H inductor with a sinusoidal voltage. In order to achieve this, we must know the frequency domain for an inductor.  and transforming the equations into polar form. When in polar form, we can find the current by dividing the polar form complex number. It is also easier to have this in polar form since it is easier to divide. Finally, it is then transformed to a time domain.
Figure 6. Finding the current in the form a time domain given a sinusoidal voltage and inductance. 
Phasors: Passive RL Circuit Response Lab Procedures and Results:
1. The lab involves measuring the gain and phase response of an RL circuit comparing them our theoretical values. As seen in figure 8, we calculated our theoretical gain difference and phase difference. We calculated a phase difference of 45 degrees for corner frequency. The gain difference=.015. We also calculated the high frequency gain=.02117 and the low frequency gain=.002117. Most importantly, we calculated the cut of frequency = 47000 rad/sec. Though we must keep in mind that we need to divide by 2π. so the cut of frequency in hertz is, Cut of frequency = 7480 Hz. This value will be used for the lab when entering the sinusoidal voltage of 1 v with the frequencies we are told to use.
Figure 7. The actual circuit with equations of gain and phase difference
Figure 8.  Measurements for cut of frequency.
2. We measure the actual resistance of the resistor R =47.5Ω and the conductor is assumed to be L=.001H since there is not way of measuring it. The actual set can be seen in figure 9 as seen below.
Figure 9. Actual circuit set up 
3. We will now measure the input voltage, current, and voltage across the inductor. From the graph values collected we will calculate the Gain and phase at each frequency. the vales can be measure by looking at figure 10 and 11.

Figure 10. Measuring the gain.
Figure 11. Measuring the phase.
4. The results can be seen below with the help of figure 10 and 11:
GAIN = amplitude of I/amplitude of V, PHASE = ∆T/T * 360
Figure 12. LOW FREQUENCY
Figure 13. HIGH FREQUENCY
5. The results can be seen below for theoretical and experimental values
Figure 14. Experimental and theoretical values

Learning Outcome:
The objective of the lab is to compare our experimental and theoretical results for gain and phase change. Our theoretical results are: cut off frequency, ωc = 47000rad/sec, gain = .02117 at low frequency, gain = .002117 at high frequency, gain = .015 at corner, phase shift = 5.71° at low frequency, phase shift = 84.3° at high frequency, phase shift = 45° at corner frequency. It is important to note when entering the frequency for the input sinusoidal voltage of 1v, we converted the cut off frequency into herts by dividing the value by 2π. So, the frequency in hertz is ωc=7480Hz. The input voltage frequencies were ω=ωc/10=748Hz(LOW), ω=ωc*10=74.8kHz(HIGH), ω=ωc=7480Hz(CORNER). We now compared with our experimental measurements by following figure 10 and 11 where gain = amplitude of voltage out/ amplitude of voltage in. Phase is calculated by the change in period from voltage input and voltage output divided by the period of the voltage input times 360. We acquired a gain of .02157 and phase of 7.326 at low frequency. The percent error for gain was 1.89% and shift was 28.2%. This shows that there is a close comparison between theoretical and experimental with a small difference in error. However, the phase shift was not accurately calculated since it was eyeballed using the picture. Unfortunately, due to time, we were unable to measure the high and corner results.