Wednesday, April 10, 2013

Op Amps 1 Lab

Note: There was not enough time to write up this lab assignment.

Step 1A: Rl=V/I=Ri=1kohm

Step 1B: Rf=10V/1mA=10kohm

Step 1C: 1/8 = 144/Rx implies Rx=1552 ohm

Step 1D: Using voltage divider, we came up with 104.72 ohm

Step 1E: We came up with RTh=96 ohm

Step 1F: No

Step 3: See table in photos below.








Step 5: See photos below for data.






PSpiceLab

In this brief lab assignment we were asked to use PSpice for in order for us to do a specific circuit simulation. But since I have a Macintosh computer at home, I was unable to download PSpice. Instead, I purchased a $10.00 app at Apple's app store and I downloaded iCircuit. I found this circuit simulation software to be much more intuitive and appealing to use than PSpice.

Our instructor gave us a circuit diagram to make Thevenin and Norton measurements across the load resistor. Here are the photos of the circuit, along with their corresponding "multimeter" measurements.

I drew my circuit, and set my load resistor equal to 999Tohms, which for all intents and purposes is an open circuit at the load and can be considered to contain infinite resistance. The "multimeter" reading in the photo below the circuit gave a reading of 10V at the load. So my open circuit VTh value came out to be 10 V.



Next, I short circuited the load to determine my INorton value. Again here are the circuit and it's corresponding multimeter reading. As you can see in both the circuit diagram and the multimeter reading, the short circuit current through the load was measured to be at INorton= 3 A.




Last but not least, I replaced the resistor back into the load, and set it arbitrarily equal to 1 ohm.  Our goal now was to determine the RTh=RNorton value. As you can see in the multimeter reading below, the current across the 1 ohm load resistor was measured to be at 2.308 A. Furthermore, from the VTh value measured earlier, I was able to compute the Rth=RNorton= Vth/I= 10V/2.308A=4.33 ohms.





So this concluded the Thevenin and Norton equivalents portion of the lab assignment. Unfortunately, due to time constraints, my relative lack of access to PSpice, and also due to being a novice to the iCircuit app software, I was unable to create a graph in order to determine the maximum power transfer to the load. From the discussions that I had with my classmates, even many of those who use a Windows computer had trouble creating their graphs on PSpice. So in a sense I'm a bit relieved as a result.

Monday, April 8, 2013

Maximum Power Lab

The purpose of this lab was to verify the Maximum Power Transfer Theorem and to use this theorem to determine the Thevenin resistance. There were two parts for this lab assignment. To begin Part A, we were told to obtain a 5.6 kohm resistor as well as a 10kohm potentiometer. As usual, we were instructed to measure and record the value of the resistor with a potentiometer. We measured an astonishingly close value of 5.62kohm.

Next, we had to construct our circuit on the breadboard as specified in Figure 1. We measured our power supply to be 4.54 V. It should be noted that this value and that of the 5.6 kohm resistor were to be used for our theoretical calculations later. We used a multimeter to guide us into obtaining an accurate measurement. Now our job was to vary the potentiometer's resistance in small increments from it's minimum resistance value to its maximum resistance value and then measure it's voltage and resistance at each increment. The table is listed in the photo below. The power at each increment was computed manually with a calculator.





We were now instructed to answer the analysis questions for Part A. Setting the potentiometer's resistance equal to the Rth=5.6kohm, with the help of the voltage divider rule, we computed the theoretical value of the potentiometer to be 2.25 V. It's corresponding measurement for power, which is the theoretical maximum power delivered to the load was computed to be 0.226 W. Next we were instructed to create two graphs, one depicting potentiometer voltage vs. power and potentiometer vs. resistance . They are listed in the photos below.



Although not perfect, both graphs can be approximated to be linear. Since we determined that Vth= 2.25 V, a quick glance at the potentiometer voltage vs. resistor graph shows that the value of the potentiometer resistance occurs during a maximum power transfer at approximately 11.0 ohms. The theoretical resistance during maximum power transfer should be about R=(12.08+10.77)/2= 11.42 ohms. 

Now we were to begin Part B of this experiment. 


We were instructed to clear the breadboard from Part A and to construct the circuit pictured in Figure 2.  As usual, we used a digital multimeter to make sure that the resistance of these 10 kohm resistors were indeed close enough to their rated values. We recorded values of 9.85 kohm, 9.66 kohm, 9.76 kohm, 9.86 kohm, and 9.79 kohm, for resistors R1, R2, R3, R4, and R5, respectively. We adjusted the two voltage sources to values of 4.5 V and 9 V as close as possible. Using a multimeter we recorded values of 4.54 V and 9.05 V, respectively. We then placed all the resistors into their appropriate positions.




We were instructed to create an analysis using LabPro, but the entire class experienced an unfortunate technical difficulty with the software. So we were unable to do the Part 3 analysis questions. 

To wraps things up, the was perhaps the most frustrating lab assignment so far this semester, due to the LabPro software not working correctly. However, one benefit from this lab assignment is that it helped me to better understand the Maximum Power Transfer Theorem much better.

Sunday, April 7, 2013

Thevenin Lab

The purpose of this lab was to create a complicated circuit experimentally and to confirm that the simpler equivalent Thevenin circuit is equivalent to this circuit.
Figure 6a

Figure 6b

Given values of Rc1=100 ohms, Rc2=Rc3=39 ohms, Rl1=680 ohms, Vs1=Vs2=9V, and Vload2,min=8V, we were asked to determine the smallest possible value of Rl2, and to determine the open circuit voltage and short circuit current for Vload2.

Before beginning the lab, we were asked to compute the open-circuit voltage for Figure 6a. Using nodal analysis, we came up with a value of 8.64 ohms. Next we were asked to compute Vy and the short circuit current for Figure 6b. After using nodal analysis and setting up a system of equations we came up with values of 5.11 V and 0.1311 A for Vy and the short-circuit current, respectively. We were asked to verify our results by computing Rth, which was determined to be 65.95 ohms. 
Figure 3


Next we were asked to compute the minimum resistance for Rl,2 using a number of methos such as through a voltage divider, the short-current using Ohm's law, and through the open circuit voltage through inspection. Using all three methods, we came with a value of Rl,2min= 5.28 ohms each time. 


Next, we were asked to devise the experiment into two phases as listed in the above photo. Notice that in Stage 1 we were asked to model the simplified Thevenin equivalent, whereas in Stage 2 we were required to construct the original complex circuit. Before setting up the breadboard for the Thevenin equivalent, we were required to make measurements of the resistors using a multimeter and to compare these values with their nominal values. The following photo shows these values.



The values were indeed close enough to their nominal values. Next, we were required to set up the breadboard for the Thevenin equivalents. After receiving verification from our instructor, we went ahead and performed this part of the experiment. This was the power supply this we used for this experiment. It was rated at 1W.





As you can see, our measured values for Rl2,min, and Rl2=inf came very close to their theoretical values. Hence, we were satisfied with how successful we were with the Phase 1 of this experiment. Notice the low percent errors in each case.

We were now required to begin preparing for Phase 2 of the experiment, which we mentioned earlier was the complicated original circuit. Again, we were asked to measure the values of our components and to compare them to their nominal values. And once again the measured values were measured to be very close to their nominal values. A power supply rated at 1W was used.




Then we were required to set up the breadboard for this phase of the experiment. After getting verification from our instructor, we went ahead and performed the experiment. Here were our results for the measured voltages for Rl2,min and Rl2,inf as compared to their theoretical values. Our percent errors with slightly higher than those for the Thevenin equivalent circuit, but we were satisfied with our results because 6.43% is still a low percent error.


Now we were required to answer some analysis questions. Before disassembling the circuit, we were asked to compute the value of the maximum  power delivered to the load resistance Rl2. We did so by using the formula Pmax=(Vl2^2)/4Rth= 0.287W.

Now we were required to establish this maximum power in the laboratory by setting Rl2 equal to 0.5Rth, Rth, and 2Rth, measuring the voltage across each of these loads and calculating the corresponding power delivered to each of these loads. Our instructor wanted us to show our work for the power delivered to the first load, which is shown above the table in the photo below. Also notice how close the experimental value of 0.279W is to the theoretical value of 0.287W. This low percent error indeed confirmed our results.


This lab assignment was now over and we were asked to disassemble the lab setup. This lab assignment really helped me to reinforce the concept of Thevenin equivalents. More importantly, I felt accomplished for the low percent errors that we measured for all phases of this lab assignment. Hopefully this will carry into future lab assignments.

Friday, April 5, 2013

MATLAB


In this laboratory assignment, we were introduced to a programming language called MATLAB, which easily allows one to perform complex mathematical operations such as matrix and vector operations with relative ease. We used a variant of MATLAB called FREEMAT.

First we we instructed to do specific arithmetic operations involving addition, subtraction, multiplication, division.



Next we were instructed to perform specific operations with mathematical functions such with a square root and some trigonometric functions. We noted that the input values for the trigonometric functions must be given in radians.


Next we were instructed to purposely input an expression such as 3=4 that would give an error message on the output. Furthermore, we were told that the up arrow key would allow us to redo the expression. Thus, we edited 3=4 to 3+4.


Then we were instructed how to use the help menu. As an example, we typed in "help" followed by "sin", in order for us to receive an instructional output regarding the use of this trigonometric function.


Next, we were instructed to create a variable and assign a value to it. This is very similar to how it's done in programming languages such as in Java. It is simply done by typing in a variable, followed by an equal sign, and then the numerical value of the variable. We noted that variables are case sensitive and that variables of specific functions cannot be used. We were also shown that typing in a semicolon after assigning a value to a variable would not be repeated in the output screen.


Next, we were instructed to do intermediate level operations with vectors and matrices. First we were instructed how to create a matrix. Commas were used to separate entries in a specific row, whereas semicolons are used to create a new row. Here is the specific example that we were instructed to do.

Next, we were told to create automatic arrays using the general formula A=x:y:z, where x is the variable for the initial entry, z is the variable for the final entry, and y is the increment for the sequence of numbers. Here is the example that we were asked to work on.  Note that I was unable to fit the entire sequence on the screen.


Next, we were instructed to transpose a matrix. A single quotation mark (') is used to transpose matrices. In our first specific example for this part, we were asked to create a variable that was a row vector and then to create a second variable which was the transpose of the first matrix, which should output a column vector. Next, we were asked to create a variable "xx" and to assign an arbitrary 2X3 matrix to it, followed by creating the matrix "xx'', which outputted a 3X2 transpose matrix.


Next, we were asked to apply functions to a row vector. In other words, we were asked to compose  functions from another function. Here are the specific examples that we were asked to work on.

Now, for the fun part, we were asked to perform operations on vectors. We were also instructed that ".*", "./", and ".^" performs scalar multiplication, scalar division and scalar exponentiation, respectively. from the value "x" from the previous example, we were asked to define and compute CC=cos(x)*sin(x) and DD=sin(x).*cos(x). We received an error message for variable CC, because a period was not included before the multiplication symbol.



Next, we asked to enter commands that would give parts of a matrix, or submatrices. Specifically, we were asked to create a matrix, followed by creating a submatrix for the first row, first column, first two rows, and the last two columns, respectively.

Next, we were asked to create some simple plots. We were instructed to create a variable "degree", which was a row vector with the parameters 0:2*pi/100:2*pi. Then we were to create a second variable "output", which was a function of "degree". Then by typing in the command "plot(degree, output)", a graph of the function appeared on the screen.


Next we asked to create multiple graphs on the same screen by implementing the "hold on" function and adding a cosine function.

We were then asked to enter the "hold off" command an create the original sine function. Then we were asked again to enter the both the sine and cosine functions by entering them through a single command.
Next, we were required to create script files by using the text editor to perform commands. After following the list of instructions in doing so, I saved it and created a variable "a=2" in the regular command screen and clicked on the "Execute Current Buffer" icon on the text editor menu.

We then set a=6 and we received similar results.

Next, we were given instructions on how to solve a specific set of simultaneous equations.  Here are the results that we obtained.

Next, we were given a circuit with resistance values for some resistors and some voltage values for some voltage sources, and were asked to find the current through the middle resistors. This could be done by setting up some mesh equations and solving for the unknowns. Here is what we got:


Our next assignment was to plot two exponential functions of the form 2e^(-t/tau). Using the given instructions I entered the required variable assignments, I came up with these graphs. The variable assignments are listed underneath the graph.


Next we had to plot two more exponential functions of the form 2*(1-e^(-t/tau)). Here is the the graphs along with the additional assignment variable statements underneath the graph in the photo.



Our next assignment was to plot the trigonometric function 3sin(2t+10^0)+5cos(2t-30^0). Here is the assignment statements along with the corresponding graphs.



Our final assignment was to create a script file so that we could create the graphs using a desired frequency, such as f=10. Here is a photo of the script file and it's corresponding graph after freq=10 was entered in the regular prompt screen.




As a final thought, even though it was very time consuming and required an entire day to perform, I thought that this lab was the funnest lab assignment to work with all semester long. I learned how to solve problems and perform mathematical operations with MATLAB!