Sunday, May 21, 2017

Phasors: Passive RL Circuit Response

We have completely finished the first part of the class, DC circuits. Now we move on to a new part of this class, AC circuits. Today we are introduced to a new powerful tool to analyze AC circuits, phasor. Phasor is a representation of a sinusoidal wave without the time dependence. Also, capacitors and inductors can also be considered as resistors with imaginary impedance. Ohm's Law still applies to AC circuits.

Then we did a lab on passive RL Circuit Response. Here is a schematic of the lab
We applied three different sinusoidal waves to the voltage input and calculated the gain and phase difference.

ω = 47krad/s
ExperimentalTheoreticalPercent Error
Angular Frequency (krad/s)47.0047.000.00%
Frequency (kHz)7.487.480.00%
Gain0.01490.0151.28%
Phase Difference (º)-43.1459-45.0004.12%

ω = 470krad/s
ExperimentalTheoreticalPercent Error
Angular Frequency (krad/s)470.0470.00.00%
Frequency (kHz)74.874.80.00%
Gain0.00210.00210.14%
Phase Difference (º)-86.1859-84.2892.25%
ω = 4.7krad/s
ExperimentalTheoreticalPercent Error
Angular Frequency (krad/s)4.7004.7000.00%
Frequency (kHz)0.7480.7480.00%
Gain0.0210.0212.89%
Phase Difference (º)-4.933-5.71113.61%

Summary: The impedance of a resistor is R; the impedance of a capacitor is -j/ωC or 1/jωC; the impedance of an inductor is jωL. It is obvious that the impedance of a capacitor or an inductor changes when different frequency is applied. This causes the different gain and phase difference in each case. Using phasors can help us analyze AC circuits in the same way as DC circuits.

Saturday, May 20, 2017

RLC Circuit Response

We are introduced to Schmitt Trigger. The primal function of the Schmitt Trigger, to convert noisy square waves, sine waves or slow edges inputs into clean square waves. One way to implement Schmitt Trigger is to use operational amplifier.

Then we did a lab on the step response of an RLC circuit. Here is a schematic of the circuit

We calculated the theoretical natural frequencies, undamped oscillation frequency, damped oscillation frequency and damping factor.

Here is the setup of the circuit

We calculated the damping ratio, DC gain, natural frequency, rise time and steady state response.
Damping Ratio0.155
DC Gain0.023
Natural Frequency (rad/s)10105.823
Rise Time (ms)0.622
Steady State Response (V)0.046


Summary: Even though this RLC circuit is not a regular series RLC circuit, we can still use the same method to get the response. The difference is that the damping factor and undamped natural frequency would not be R/2L and 1/sqrt(LC). The correct α and ω0 can be found by using the characteristic equation. To get the characteristic equation, a typical way is to use mesh analysis or nodal analysis.

Series RLC Circuit Response

Today we started second order circuits. Second order circuits are RLC circuits or a simplified version of them, LC circuits. The first step is finding boundary values. i(0+), v(0+), di(0+)/dt, dv(0+)/dt, i(∞), v(∞) are examples of boundary values. We can then use a second order differential equation to solve for a second order circuit. The solutions to the characteristic equation, s1 and s2, are called natural frequencies, in nepers per second (Np/s). s1 = -α + sqrt(α^2 - ω0^2), s2 = -α - sqrt(α^2 - ω0^2). α is called the never frequency or damping factor. ω0 is the resonant frequency or the undamped natural frequency.

There are three types of solutions

1. If α > ω 0 , we have the overdamped case.
2. If α = ω 0 , we have the critically damped case.
3. If α < ω 0 , we have the underdamped case.


For overdamped case, 


i(t)=A1 es1t +A2 es2t 
For critically damped case, 

i(t)=(A2 +A1 t)e−αt 
For underdamped case,
i(t)=e−αt(B1 cosωd t+B2 sinωd t)
ωd is called the damped natural frequency, ωd = sqrt(ω0^2 - α^2)

Then we did a lab on an RLC circuit in series. Here is a schematic of the circuit

Here is the square wave we applied to the circuit
 We were able to observe a natural response as following
We compared the oscillation frequency from the graph to the theoretical value.
ExperimentalTheoreticalPercent Error
Oscillation Frequency (Hz)101341.698599998.749991.34%
 
Summary: RLC circuits can be represented by using second order differential equation. Similar to damping oscillation in mechanics, RLC also have three different cases of oscillation. Our lab demonstrates the pattern of an underdamped case where the damping factor is smaller than undamped natural frequency.

Wednesday, April 26, 2017

Inverting Differentiator

Today we went over differentiators and integrators. They are based on the inverting amplifier. A differentiator circuit can be obtained by replacing the feedback resistor with an inductor or replacing the input resistor with a capacitor. An integrator circuit can be obtained by replacing the feedback resistor with a capacitor or replacing the input resistor with an inductor. Since inductors are expensive and rarely used, we only use capacitor to implement differentiator or integrator.

Then the concept of singularity is introduced. There are three common singularity functions. They are unit step function, unit impulse function and unit ramp function. They can be used to represent step response.

We did a lab on inverting differentiator. Here is a schematic of the circuit
Here is the setup of the circuit

We measured the experimental resistance of the resistor

We applied three different voltage inputs to the circuit. They are 100 Hz sinusoid, 250 Hz sinusoid, and 500 Hz sinusoid. We observed the output voltage on the oscilloscope

100 Hz

250 Hz

500 Hz
The phase shift on the graph is exactly π/2, which corresponds to the phase difference between a sinusoidal function and its derivative. We also compared the amplitude of the output voltage curve and the theoretical output.

100 Hz
ExperimentalTheoreticalPercent Error
A (V)1.001.000.00%
f (Hz)100.00100.000.00%
ω (rad/s)628.32628.320.00%
R (Ω)681.00680.000.15%
C (μF)0.961.004.00%
τ (ms)0.650.683.86%
Vout (V)0.430.430.64%

250 Hz
ExperimentalTheoreticalPercent Error
A (V)1.001.000.00%
f (Hz)250.00250.000.00%
ω (rad/s)1570.801570.800.00%
R (Ω)681.00680.000.15%
C (μF)0.961.004.00%
τ (ms)0.650.683.86%
Vout (V)1.071.070.17%

500 Hz
ExperimentalTheoreticalPercent Error
A (V)1.001.000.00%
f (Hz)500.00500.000.00%
ω (rad/s)3141.593141.590.00%
R (Ω)681.00680.000.15%
C (μF)0.961.004.00%
τ (ms)0.650.683.86%
Vout (V)2.122.140.76%

Summary: Differentiators and integrators can be implemented by using capacitors and resistors. It can be used to shift the phase of a sinusoidal input. Additionally, differentiators and integrators are also operational amplifiers circuits. It shows that operational amplifiers can not only be used to implement basic operations such as addition, subtraction, multiplication and division, but also calculus operations such as differentiation and integration.

Passive RC Circuit Natural Response & Passive RL Circuit Natural Response

Today we went over the charging and discharging process of capacitors and inductors. Theoretically speaking, it takes infinite time for a capacitor or inductor to charge or discharge. In engineering world, we consider a capacitor or inductor as completely discharged after 5 time constants. After five time constants, the remaining energy is less than 1%. In other words, we can measure the time it takes to almost drop to 0 energy and divide it by 5 to get the time constant. We apply this method in the following two labs

Passive RC Circuit Natural Response

This lab examines the natural response of an RC circuit. we use manual switch and square wave voltage source to create the natural response.

Here is a schematic of the circuit with theoretical values

We observed the voltage response on the oscilloscope window

We compared the values from the oscilloscope and the theoretical values.
ExperimentalTheoreticalPercent Error
Charging Time (ms)79.9765.13%
Discharging Time (ms)242.62420.25%

Then we applied a square wave instead of manually switching it.

ExperimentalTheoreticalPercent Error
Charging Time (ms)74.03762.59%
Discharging Time (ms)273.724213.10%
Passive RL Circuit Natural Response

This lab uses an inductor instead of a capacitor. The other parts of the circuit stay the same. 

Here is a schematic of the circuit

Here is the circuit setup

We adjust the frequency to get the time constant.

Summary: The natural response of capacitors and inductors indicates that there is a maximum switching frequency. Since a capacitor or inductor in a circuit takes a certain time to drop its voltage or current to a very small amount, switching to fast would cause the a capacitor or inductor to start discharging before it is fully charged or start charging before it is fully discharged. We normally consider a capacitor or inductor is fully charged or discharged after 5 time constants. The maximum switching frequency should be less than its reciprocal.

Friday, April 14, 2017

Capacitor Voltage-current Relations & Inductor Voltage-current Relations

Today we learned about different kinds of capacitors and inductors. First let's see how dangerous being an electrical engineer can be.
The explosion was caused by a electrolytic capacitor. Remember, If you connect a electrolytic capacitor with high voltage and wrong polarity, the outcome is fantastic!

Capacitor Voltage-current Relations
Back to the lab, we set up an RC circuit and applied different voltage patterns to it. Our prediction for sinusoidal wave and triangular wave is displayed in the following picture:

We measured the resistor and the capacitor


We applied 1kHz sinusoidal wave, 2kHz sinusoidal wave and 100Hz triangular wave to the circuit and used oscilloscope in WaveGen to plot the graphs.

1kHz sinusoidal

2kHz sinusoidal

100Hz triangular

Inductor Voltage-current Relations
Then we replaced the capacitor from the previous lab with an inductor. Everything else is still the same as the previous lab. We applied 1kHz sinusoidal and 2kHz sinusoidal voltage input and used the oscilloscope in WaveGen to plot the graphs.

1kHz sinusoidal

2kHz sinusoidal

Summary: Capacitors and inductors are useful elements in circuit. They are relatively big comparing to other electronic components. Capacitor is a double plate (usually circular) separated by a layer of dielectric. Inductor is a coil of wire (solenoid). The current in RC circuit is i = 1/RC *  idt and the current in LC circuit is i = L/C * di/dt.


Thursday, April 13, 2017

Temperature Measurement System Design



Today we have a concept of combination of different operating amplifiers. A group of different types of operating amplifiers connected together is called cascaded operational amplifiers. In this lab, we use a Wheatstone bridge and a difference amplifier to measure temperature. The change in temperature results in the change in resistance. Wheatstone bridge converts the change in resistance to the change in voltage. The difference amplifier will amplify the voltage change to a specific output voltage.

We designed a circuit as following:


First we setup the Wheatstone Bridge circuit without operational amplifier portion. In order to balance the bridge, we add a potentiometer in series with one of the 10 KΩ resistor. We tune it to a specific point when the voltage between the bridge is zero in room temperature.

ExperimentalTheoreticalPercent Error
R (kΩ)9.8102.00%
Rth low (kΩ)7.1572.14%
Rth high (kΩ)11.741017.40%
ΔR (kΩ)4.59353.00%
Vin Low (V)00N/A
Vin High (V)0.5570.37548.53%
Here is a video of the Wheatstone Bridge

Then we add the difference amplifier into the circuit and form our final configuration
ExperimentalTheoreticalPercent Error
R1 (kΩ)9.8102.00%
R2 (kΩ)56.2560.36%
R3 (kΩ)9.8102.00%
R4 (kΩ)56.2560.36%
Vin Low (V)00N/A
Vin High (V)0.5570.37548.53%
Vout Low (V)00N/A
Vout High (V)2.12.10.00%
 Here is a video of the entire system
It performs as we expected. The voltage change due to temperature change is successfully amplified by the difference amplifier.

Summary: Wheatstone Bridge is a convenient mechanism that converts a resistance change to a voltage change. The drawback of Wheatstone Bridge design is that it requires three resistors with the same resistance as the changing resistor. We also have to balance the bridge before we take any measurement.

Cascaded Operational Amplifier shows how we can do composite mathematical operations. The basic building blocks are inverting amplifier, non-inverting amplifier, voltage follower, summer and difference amplifier. By applying different kinds of operational amplifiers, we can combine different operations in a expression and use a circuit to represent it. It shows the potential of using analog circuit to make a calculator. Instrumentation Amplifier is a commonly used cascaded operational amplifier. The instrumentation amplifier is an extension of the difference amplifier in that it amplifies the difference between its input signals.