Friday, May 20, 2016

DAY 18: 2nd Order Circuits/ RLC Circuit Response Lab

Part 1: Step Response of a Series RLC circuit 
Today, we expanded the RLC circuit in the previous class by applying the power supply into the RLC circuit. This expansion will make the homogeneous differential equation become the non-homogeneous differential equation, with the solution x= xn + xf, xn is natural solutions with natural response when the circuit only have R,L,C; xf is the particular solution. 

We began with the series circuit and deduce the DE for the voltage across the capacitor. The DE in terms of the vc because we need to express Vs in the DE. vf(infinite) = Vs

Then we did a practice problem for the RLC circuit in series with Vs. First, we need to initial values of vc(0), dvc/dt (0), and vf(infinite) to solve for the constant coefficient. We calculate the neper frequency a = R/(2L) , and resonant frequency w=1/sqrt(LC). So, a<w => underdamped. Then, we deduced the vn, and A1, A2. 

Then we studied about the RLC circuit in parallel, We analyzed the circuit, write out the equation for KCL, try to remain the Is in the equation in order to deduce the non-homogeneous DE. Thus, iL = iLn + iLf. neper frequency a=1/(2RC), resonant frequency w =1/sqrt(LC). Comparing the a and w, we concluded the circuit was underdamped. Based on the boundary values, we got the coefficients of the solution.
Part 2: RLC Circuit Lab
Purpose: We will verify the theory of the RLC circuit with the voltage supple through this experiment. Particularly, we will verify the property of the RLC in parallel. 
iL= in+if, t>=0.

Pre-lab:
The schematic circuit is the RLC circuit in parallel with the voltage supply. We will transform the circuit from the voltage supply in series with the resistor into the current supply in parallel with the resistor. The we will observe the standard circuit for the RLC in parallel. The inductor current equals iL= in + if, which iL is the solution of the 2nd order non-homogeneous DE. 

We deduced the iL for this circuit. We found that the neper frequency is less than the resonant frequency, so the circuit is under the underdamped effect. 

We found the coefficients for the general solution of iL, then Vo = R2*iL. 

The Everycircuit for the current across the inductor, capacitor, and R2. We observed iL=iR2, and iL, iC, iR2 expressed the underdamped effect. 

The current through the Vin and current through R2.

The circuit for this experiment. RLC in parallel. 

The oscilloscope for the Vin, Vout. From our analysis, Vout=R2*iL, so it will expressed the underdamped effect, and the oscilloscope showed the same phenomena. 
The period is 0.67ms. wd = w*pi/T = 9424 rad/s . wd (calculation) = 9943 rad/s. percent error = 5.5%



Part 3: Second order of op amp circuit
With the op amp and the capacitor in a circuit, when we analyzed the circuit by applying KCL, KVL, ideal op amp assumption for simplicity, we will get the second order differential equation. One example of this circuit is described in the lecture note. 

v o (t) = v on + v of = 10 + e− t(A cos 2t + B sin 2t) mV
v o (t) = 10 − e− t(10 cos 2t + 5 sin 2t) mV

Conclusion:
We discussed about the RLC with the power supply both in series and parallel. By applying KCL, KVL, we try to get the non-homogeneous 2nd order DE, and solve for the general solution y= yn + yp. We also did the experiment to very find the theory with a parallel RLC circuit and observed that the oscilloscope graph behaved closely to the theory. Error occurred because the inductor and capacitor is not ideal and have inner resistance. We also discussed a second order op amp circuit which combine the capacitor and the op amp in a circuit. 


DAY 17: Natural Response RLC Series and Parallel Circuits/ Series RLC Circuit Step Response Lab

Part 1: Natural Response RLC Serires and Parallel

Today, we discuss about the RLC circuit series and parallel. We expect to deal with the linear second order differential equation of RLC circuit. Then, we do the Series RLC circuit step response lab to verify three situations in the RLC circuit when a>w, a=w, a<w, which a is neper frequency or damping factor, w is resonant frequency. 

We practice to find the boundary values, initial values and final values. They are very important to get the general solution of the differential equation in RLC circuit. There are two key factors mentioned in the lecture note to find the boundary values.
 First—as always in circuit analysis—we must carefully handle the polarity of voltage v(t) across the capacitor and the direction of the current i(t) through the inductor.  Keep in mind that v and i are defined strictly according to the passive sign convention. One should carefully observe how these are defined and apply them accordingly.
 Second, keep in mind that the capacitor voltage is always continuous so that
v(0+) = v(0−)
                  and the inductor current is always continuous so that
i(0+) = i(0−)
where t = 0− denotes the time just before a switching event and t = 0+ is the time just after the switching event, assuming that the switching event takes place at t = 0. Thus, in finding initial conditions, we first focus on those variables that cannot change abruptly, capacitor voltage and inductor current, by applying the equations above.

Then, we analyzed the RLC series, and deal with the linear second order differential equation (DE). For the series RLC, the neper frequency is a = R/(2L), the resonant frequency is w = 1/sqrt(LC). We yields the quadratic equation and get the general solution for s.  

There are three cases for the DE. Respectively, we have three situation for the RLC cirtuit, overdamped (a>w, 2 real roots), critical damped (a=w, 1 real roots), underdamped (complex roots). 
a>w: i= A1*e^[(-s1)*t] + A2*e^[(-s2)*t]
a=w : i = (D1*t+D2)*e^[(-a)*t]
a<w, wd = sqrt(w^2-a^2): damping frequency, i = B1*e^(-at)*cos(wd*t)+B2*e^(-at)*sin(wd*t)

Part 2:  Series RLC Circuit Step Response Lab

Purpose: This lab is aim to verify three situations of the RLC circuit in series, overdamped, underdamped, critical damped. We use the waveform generator to create the step response voltage, and use the oscilloscope to gain the behave of the voltage input and voltage output which is across the capacitor. 

Pre-lab:


The first experiment, we use the R=0.9Ohm, the capacitor = 470uF, the inductor = 1uH, so we calculated the time constant =1.08s, a= 450*10^3 rad/s, w= 461266 rad/s, a<w => underdamped, wd=101322 rad/s
The waveform generator is square, f=1kHz, A=2V, offset =2V.
The set-up for this RLC circuit in series.

The underdamped RLC circuit. Vc = -VL - Vr = Ldi/dt - Ri = A1*e^[(-s1)*t] + A2*e^[(-s2)*t].
wd=2*pi*f = 2*pi/T, T=0.045 => wd = 139626 rad/s, percent error = (139626 - 101322)/139626=27.4%


We get the overdamped circuit by making a > w. We use R=22Ohm to gain this effect. As our calculation, a=11*10^6, w=461260

The graph expressed the overdamped situation in the RLC series


Next, we discuss about the RLC circuit in parallel. In parallel circuit, a= 1/(2RC), w=1/sqrt(LC).

We apply the initial values to solve for the constant in the general solution. V(0) is initial voltage across capacitor, dv/dt (0) = 1/C*ic(0)=v'. Find ic by KCL, ic=iR+iL, and solve for A1, A2. 



Conclusion: 
We discussed RLC in both series and paralellel with no power supplly. After analyzing we came up with the 2nd order differential equation with 3 possible situations: overdamped, underdamped, and critical damped. We also did the lab to verify these situations. The result shows the reality meets with our calculation. We observe the underdamped effect when the neper frequency is less than the resonant frequency, and the overdamped effect when the neper frequency is greater than the resonant frequency. 

DAY 16: 1st Order Circuits Step Response/ Inverting Differentiator Lab

Part 1: First order op amp circuit
Today, we discussed the 1st order circuits step response and the inverting differentiator. We also did a experiment to verify the theory of the inverting differentiator. We also discussed a few basic knowledge of the unit step function, the unit impulse function, and the ramp function. 


The deduction for this op amp circuit, the inverting differentiator. By applying ideal op amp assumption and the KCL, we deduced vo(t)= V0 -1/(RC) * integral(vi.dt).



With different vin, we deduce the vo based on the relationship between them. 
vo(t)= V0 -1/(RC) * integral(vi.dt). 

Part 2: Inverting Differentiator Op Amp Lab
Purpose: The lab aims to verify the theory of inverting differentiator. We will observe the vin, vout of an inverting differentiator on the oscilloscope and expect to gain two sinusoidal graphs that are greater or less pi/2.

Pre-lab:

Based on the given values, we calculate the equation between vin and vo, vo=(ARCw).sin(wt) = 6.28*sin (wt), with f=500Hz. Similarly for f=1000Hz, vo=1000*sin(wt); and f=2000Hz, vo=2500*sin(wt)

The set-up of a inverting differentiator

500Hz
Expected output voltage = 500, measured out voltage = 628.3, percent error = 20.42%

f=1kHz
Expected output voltage = 1257, measured out voltage = 1000, percent error = 22.43%

f=2kHz
Expected output voltage = 2513, measured out voltage = 2500, percent error = 0.5%

Summary:
Frequency (Hz)
Input Voltage (mv)
Expected Output Voltage (mv)
Measured Output Voltage (mv)
Percent Error%
500
200
500
628.3
20.42
1000
200
1257
1000.25
22.43
2000
200
2513
2500
0.52




Part 3: More Switching Functions/ 

The unit impulse function 

the unit ramp function r(t)


We did a practice to get familiar with the unit step function, the unit impulse function, and the unit ramp function. 

Step Response of an RC circuit

By using KCL, and the initial value of v, vc = v(t) as a function above. 

RC step response graphs, vc(t), ic(t) with V0=0V. 
v(t) = V s (1 − e− t/τ)u(t)
i(t) = (V s /R)*e− t/τu(t)

We continued to analyze the RC circuit step response, and let V0=0V. We deduce ic as above. 


We applied the theory of the RC circuit to solve for the RC circuit above, with the Vs = 5u(t).


Similarly, we studied about the step response of an RL circuit
The standard step response RL circuit  


From the KVL, and the intial value of i, we deduce iL=i as a function above
i(0-)=0, we deduce the iL=it as above

deducing from i(t), we get v(t) as function above 
The graphs of the step response RL circuit. 

We did a practice problem for the step response RL circuit.

Conclusion
Today, we discussed and studied some knowledge about the inverting differentiator, the step response RL, RC circuits,, the 3 new kinds functions: the unit step response, the unit impulse, the unit ramp. We did the inverting differentiator lab to verify the theory we had discussed. We also practiced some problem to grasp the theories of the step response RL, RC circuit. These kind of circuit can be analyzed through the KVL, KVC, the unit step response when t<0, and t>=0. The analysis of the behaviors of the circuit in each moment is very important. Remind some basic concepts: inductor resists the instantaneous change of current iL(0-)=iL(0+), the capacitor resists the instantaneous change of voltage vc(0-)=vc(0+). Time is infinite, the inductor acts as the short circuit, the capacitor acts as the open circuit. Some tranformation concept, and the Thervenin circuit are also important. For find Rthervenin, replace voltage source with a short circuit (imaging the standard circuit of Thevernin Vs and R in series), the current source with a open circuit. (imaging the standard circuit of Norton Is and R in parallel).



Sunday, May 15, 2016

DAY 20:Sinusoidal Analysis/ Impedance Lab

Part 1: Impedance and Admittance
Today, we advance our method to analyze an sinusoidal source RLC circuit. We discuss how to apply Ohm's Law, KCL, and KVL into the impedance analysis.
The rattio of the phasor voltage and phasor current  of R,L,C

impedance and admittance summary of R,L,C


The relation between polar and Cartesian coordinate, the relation between the impedance and admittance

We did a practice problems to apply the phasor and impedance in find the voltage and current in the circuit. We transform the function from time domain into frequency domain to calculate, and then transform back to the time-domain. 

Part 2: Impedance Lab
Purpose: The lab aims to verify the impedance theories and observe how the frequency will affect the Vout, Gain - the ratio between Vout and Vin, the phase shift between Vout and Vin. We will do the experiment on three elements resistor, inductor, and capacitor with three different frequencies 1kHz, 5kHz, 10kHz to compare the corresponding results. 

Pre-lab: 
1. Resistor

From our the theory, the circuit which only has resistors does not have the imaginary part of the impedance, so the frequency will not effect the impedance of the circuit. Therefore, the gain the will be the same regardless of the frequency's changes; the phase shift between the Vout and Vin is 0.
I=(r,phil)=(0.014,0)
1kHz

5kHz

10kHZ

We observe the same effect from the experience. There is no phase shift, and the gain is slightly different, 4% error. 

2. The inductor 

From the theory, in the circuit has inductor the frequency will affect the impedance of the inductor ZL=jwL. The greater the frequency is, the larger the inductor impedance is. The Zeq = ZR+ZL. the ratio = Vout/Vin = ZL/Z= G/phil, which G, phil are respectively the Gain, and the phase shift between the Vout and Vin.
f=1kHz, ZL/Z= (r,phil)=(0.135, 82.2), G= 0.135 phase shift = 82.2, I=(0.043,-7.79)
f=5kHz, ZL/Z= (r,phil)=(0.56, 55.62), G=0.56.phase shift = 55.62, I=(0.036,-34.4)
f=10kHz, ZL/Z=(r,phil)=(0.80, 36), G=0.8 phase shift = 36.16, I=(0.026,-53.85)

Observably, as the frequency increase, the gain increase and the phase shift decreases. Graphically, we has 

The phase differences among the Z, ZL, ZR is similar to the phase differences among Vin, Vout, VR. As the f or w increase, ZL increases, phil decrease, the gain (Vout/Vin) or cos(phil) increases. The positive is clockwise. Vout leads Vin value of phil


1kHZ, G=0.12, phase= 80

5kHz, G=0.5, phase = 51

10kHz, gain= 0.75, phase = 29

We observe the same phenomena with the theory. The gains and the phase shifts are respectively close to the theory's values. The errors are about 8%-10%

3. The capacitor.
From the theory, in the circuit has inductor the frequency will affect the impedance of the capacitor ZC=-j/(wC). The greater the frequency is, the smaller the capacitor impedance is. The Zeq = ZR+ZC. the ratio = Vout/Vin = ZC/Z= G/phil, which G, phil are respectively the Gain, and the phase shift between the Vout and Vin.
f=1kHz, ZC/Z= (r,phil)=(0.99, -6.78), G= 0.99 phase shift = -6.78, I=(5.12e-3, 83.22)
f=5kHz, ZC/Z= (r,phil)=(0.85, -30.7), G=0.85.phase shift = -30.7, I=(0.022, 59.29)
f=10kHz, ZC/Z=(r,phil)=(0.64, -49.91), G=0.64 phase shift = -49.91, I=(0.033, 40)

Observably, as the frequency increase, the gain decrease and the phase shift increase negatively.  Graphically, we has
The phase differences among the Z, ZC, ZR is similar to the phase differences among Vin, Vout, VR. As the f or w increase, Zc decreases, phil increase, the gain (Vout/Vin) or cos(phil) decreases. The positive is clockwise. Vout lags Vin the value of phil.


1kHz, G = 0.90, phase = -7.2
5kHz, G=0.85, phase=-30.6
10kHZ, Gain = 0.625, phase = -61.2

We observe the same phenomena with the theory. The gains and the phase shifts are respectively close to the theory's values. The errors are about 8%-10%


Part 3: KIRCHHOFF’S LAWS IN THE FREQUENCY DOMAIN

We did a problem apply the KVL, or voltage divider in the frequency domain. 

We did another problem for the KVL, the phase between Vout and Vin for the R=Xc is -45.

Conclusion:
We learned a useful method to analyze the RLC circuit with sinusoidal source by using phasor and frequency domain. We also study about the impedance and realize that the Kirchhoff's laws also apply for the frequency domain. Therrefore, we can analyze and solve these circuit by KVL,KCL, voltage divider, current divider. We also do an experiment to verify the impedance theory and see how the change of frequency affect ZL, and ZC.