Lecture 6: Practical AC Analysis and Filtering

Previous lecture | Lecture index | Next lecture

Slides PDF | Equation sheet | Activity sheets | Quiz PDF | Quiz Solutions PDF

Use impedance and phase-aware Kirchhoff calculations for a sinusoidal circuit, then measure an RC time constant and decide whether the filter delay suits the process.

Start Here

Can you smooth a noisy sensor reading without losing the process change you need to detect?

Lecture 5 introduced amplitude and phase. Here you use both to describe an AC circuit. On paper, the symbol j marks the direction 90° from the chosen reference, so you can track phase along with size. Later you switch to a time trace of a filter responding to one abrupt input change.

🎯 Learning Objectives

  • Calculate series RL impedance, current magnitude, and phase.
  • Check AC KVL with a consistent phasor reference.
  • Estimate a first-order time constant and justify filter and sampling choices.

Continuing project: Keep the same process, controlled variable, manipulated variable, and disturbance throughout the sequence. Retain circuit sketches, raw data, assumptions, and the design decision from each activity.

⚡ Concepts, Equations, and Worked Examples

Stored Energy and a Phase Reference

A resistor dissipates electrical energy. A capacitor stores electric-field energy, and an inductor stores magnetic-field energy. Ideal capacitor voltage and inductor current cannot change instantaneously under finite excitation. Actual components also have losses and ratings.

At a single sinusoidal frequency, impedance combines resistance and reactance while retaining phase. With source voltage as the zero-angle reference, the RL example current lags by 43.3°. With current chosen as the reference for KVL, the same physical source voltage leads by 43.3°. Changing the reference does not change the circuit.

A low-pass filter attenuates rapid variation and adds lag. The ideal equations below assume a sufficiently stiff source and negligible output loading. A 1 s filter might suit a roughly 30 s temperature process and obscure a roughly 0.2 s flow response; verify the actual control effect. Correct interference and acquisition problems as well as considering smoothing. Filtering after aliasing cannot recover the original signal.

1 / Impedance and series RL current

Use RMS phasors, with \(j^2=-1\). $$Z_R=R,\quad Z_L=j\omega L,\quad Z_C=\frac1{j\omega C},\quad\omega=2\pi f.$$ $$Z=R+jX_L,\quad X_L=\omega L,\quad \underline I=\frac{\underline V_s}{Z}.$$

Worked example. \(R=20\,\mathrm{\Omega}\), \(L=50\,\mathrm{mH}\), \(f=60\,\mathrm{Hz}\), \(V_s=12\,\mathrm{V}\) RMS.

  1. \(X_L=2\pi(60)(0.050)=18.85\,\mathrm{\Omega}\).
  2. \(|Z|=\sqrt{20^2+18.85^2}=27.48\,\mathrm{\Omega}\).
  3. \(I=12/27.48=0.437\,\mathrm{A}\) RMS; \(\phi=\tan^{-1}(18.85/20)=43.3^{\circ}\) lag.

2 / AC KVL uses phasor addition

Draw the voltage directions before adding

A phasor holds the size and phase of a steady sinusoid. Pick the current as your zero-angle reference for this circuit. The resistor’s voltage peaks with current and the ideal inductor’s voltage leads by a quarter cycle. Draw the two voltage contributions at right angles and use the diagonal for the source. Impedance uses the same kind of two-direction arithmetic and is measured in ohms.

In the series example the resistor contributes 8.73 V horizontally and the inductor contributes 8.23 V vertically. The source is the diagonal, 12.0 V RMS.

In the series example the resistor contributes 8.73 V horizontally and the inductor contributes 8.23 V vertically. The source is the diagonal, 12.0 V RMS.

For this ideal series RL circuit: $$\underline V_s=\underline V_R+\underline V_L,\quad |V_s|=\sqrt{V_R^2+V_L^2}.$$

Worked example. Continue the RL example.

  1. \(V_R=IR=0.437(20)=8.73\,\mathrm{V}\).
  2. \(V_L=IX_L=0.437(18.85)=8.23\,\mathrm{V}\).
  3. \(\sqrt{8.73^2+8.23^2}\approx12.0\,\mathrm{V}\). Adding magnitudes would give the wrong result.

3 / RC low-pass cutoff and attenuation

Identify the input, output, and return

RC stands for resistor and capacitor. The capacitor’s voltage changes as it receives or releases charge through the resistor. Very quick input changes have little time to move the output. Very slow changes mostly pass through. This is a low-pass filter. It can smooth a noisy temperature reading. It can also delay a real process change that the controller needs to see.

A 10 kΩ series resistor feeds the output node. A 100 µF capacitor connects that node to the 0 V return. Output is measured across the capacitor.

A 10 kΩ series resistor feeds the output node. A 100 µF capacitor connects that node to the 0 V return. Output is measured across the capacitor.

For an unloaded output across the capacitor: $$\tau=RC,\qquad f_c=\frac1{2\pi RC}$$ $$|H(f)|=\frac1{\sqrt{1+(f/f_c)^2}}.$$

Worked example. \(R=10\,\mathrm{k\Omega}\) and \(C=100\,\mathrm{\mu F}\).

  1. \(\tau=10^4(100\times10^{-6})=1.00\,\mathrm{s}\).
  2. \(f_c=1/(2\pi)=0.159\,\mathrm{Hz}\).
  3. At \(1\,\mathrm{Hz}\), \(|H|=0.157\): a \(1\,\mathrm{V}\) sine becomes \(0.157\,\mathrm{V}\) in amplitude.

4 / Step response and data capture

Find the response time from a plot

Find the output just before the step and after it settles. Take 63.2% of their difference and add it to the starting level. Measure from the input step to the time when the output crosses that target. The result estimates the time constant for a first-order response. Use the same procedure for falling steps: the total change is negative and the target falls below the starting level.

The 5 V step settles toward 5 V. The 3.16 V guide crosses the calculated trace at 1 s.

The 5 V step settles toward 5 V. The 3.16 V guide crosses the calculated trace at 1 s.

For \(t\geq t_0\): $$y(t)=y_\infty+(y_0-y_\infty)e^{-(t-t_0)/\tau}.$$

Worked example. A \(0\to5\,\mathrm{V}\) step at \(t_0=0\).

  1. At \(t=\tau=1\,\mathrm{s}\), \(y=5(1-e^{-1})=3.16\,\mathrm{V}\): \(63.2\%\) complete.
  2. At \(3\tau\), \(y=4.75\,\mathrm{V}\): about \(95\%\) complete.
  3. A \(0.05\,\mathrm{s}\) sample interval gives 20 samples per \(\tau\) here. Record the step time, initial level and a settled final level; inspect sampling limits.

Engineering point: Noise attenuation comes with measurement lag; include it in the control decision.

🧪 Experiment: RC Step and Filter Decision (15 min)

Open Microcontroller I/O Studio. Use the simulator or the prepared educational circuit specified below. Preserve project-controller firmware and record board, firmware, input range, signal reference, settings, and actual sample interval.

Before you begin. Find the old level, settled new level, and command time on the trace. For a 0 to 5 V rise, mark 3.16 V before reading the crossing time.

  1. Set the simulated RC time constant to 1 s. Set D9 to 0%, wait for A2 to settle, and select A2 on the scope.
  2. Step D9 to 100%, retain a settled final region, and export raw A2 samples. Record command time and output time on the same time basis.
  3. Estimate initial and final levels from suitable windows. Calculate the target as initial plus 63.2% of the total change. Estimate the time constant from target-crossing time minus step time.
  4. Repeat with a 50%-to-75% step or a 0.15 s response. A smaller step changes the voltage target while preserving the time constant of an ideal linear model.
  5. Compare raw samples with the trend record. A 0.10 s trend interval gives only 1.5 intervals per 0.15 s time constant. Verify the actual faster acquisition and timing uncertainty.
  6. Hardware uses a prechecked compatible source and correctly rated, correctly polarized capacitor. The averaged simulator does not demonstrate real PWM ripple. The supplied CSV is a known model for analysis practice.

Record and Interpret

QuantityRun 1Run 2
Nominal time constant sRecordRecord
Initial and final output VRecordRecord
63.2% target VCalculateCalculate
Step time and uncertainty sRecordRecord
Target crossing time sRecordRecord
Estimated time constant sCalculateCalculate
Actual sample interval sRecordRecord

For a 2.50-to-3.75 V step, the ideal one-time-constant target is about 3.29 V. Optional analysis of the supplied model:

python3 analyze_mcu_csv.py RC_Model_Step_Reference.csv --mode step --time-column time_s --value-column voltage_V --step-time 0 --initial 0 --final 5

Extract the analysis bundle into one local directory before running this command. For actual exports, first inspect column names with the helper’s --list-columns option.

Data origin: Identify physical measurement, simulator output, supplied synthetic data, or calculated model for every record. Preserve the prediction before collecting the result.

Data and Analysis Downloads

Download the analysis bundle and extract it locally to retain the original script and CSV names.

🛠 Project Checkpoint

Complete EE 1 AC with the RL model, current, stated phase reference, KVL check, RC data, and time-constant estimate. Update EE 2 with the candidate filter, acquisition interval, timing uncertainty, and the response the measurement must preserve. Explain the extra lag that the controller must accommodate.

Check Your Understanding

An RC output slowly falls from 4.0 V to 1.0 V. Which output level marks one time constant?

Subtract 63.2% of the 3.0 V change from 4.0 V. The target is about 2.10 V. Measure the elapsed time from the input step to that crossing.

📝 Quiz (10-15 min)

After you try each question, select Worked solution below it to see the steps. Use the Quiz Solutions PDF above to review the full answer key.

12 points total; 4 points per question. Show work and units. Round numerical results to 3 significant figures. For multiple choice, select one answer and explain briefly.

Question 1: AC impedance and current

At one sinusoidal frequency a series circuit has \(R=12\,\Omega\) and \(X_L=16\,\Omega\). A 10 V RMS source drives it. Find impedance magnitude and RMS current.

$$|Z|=\sqrt{12^2+16^2}=20.0\,\Omega,\qquad I_{\mathrm{rms}}=10/20.0=0.500\,\mathrm{A}$$

Resistance and inductive reactance are perpendicular components in this model.

Question 2: An RC filter time scale

An unloaded RC low-pass has \(R=20\,\mathrm{k\Omega}\) and \(C=50\,\mu\mathrm{F}\), with output across C. Find time constant and cutoff. Assume negligible input loading.

$$\tau=20000(50\times10^{-6})=1.00\,\mathrm{s}$$ $$f_c=\frac{1}{2\pi\tau}=0.159\,\mathrm{Hz}$$

Attenuation of rapid variation comes with lag.

Question 3: Reading a step response

A first-order output changes from 0 V toward 10 V and first reaches 6.32 V at 2.0 s after the step. Estimate the time constant. Is it fully settled?

$$\frac{6.32-0}{10-0}=0.632,\qquad \tau\approx2.0\,\mathrm{s}$$

No. It is 63.2% complete and still 3.68 V below the final value.

✅ Exit Ticket

For \(Z=8+j6\,\Omega\) and a 10 V RMS source, find impedance magnitude, current magnitude, and lag. Why might a 0.10 s trend interval miss a 0.02 s response?

$$|Z|=\sqrt{8^2+6^2}=10\,\Omega,\qquad |I|=10/10=1\,\mathrm{A},\qquad \phi=\tan^{-1}(6/8)=36.9^{\circ}$$

Current lags the source. A 0.10 s interval spans five of the stated time constants and does not resolve the early response.

💬 Discussion Questions

Commit to an answer before comparing with a colleague or AI assistant.

  1. Why does adding AC voltage magnitudes give the wrong RL KVL result?
  2. How would output loading change the ideal RC model assumptions?
  3. What test would establish whether a candidate filter preserves the project’s control performance?

📐 Nomenclature

SymbolMeaningExample value
\(R\)Resistance20 \(\Omega\) (RL); 10 k\(\Omega\) (RC)
\(L\)Inductance50 mH
\(C\)Capacitance100 \(\mu\)F
\(f,\omega\)Frequency/angular frequency60 Hz; 377 rad/s
\(j\)Imaginary unit\(\sqrt{-1}\) (unitless)
\(Z_R,Z_L,Z_C,Z\)ImpedancesTotal \(20+j18.85\ \Omega\)
\(X_L\)Inductive reactance18.85 \(\Omega\)
\(\underline V_s,\underline I\)RMS phasors12 V; 0.437 A magnitude
\(V_R,V_L\)RMS drops8.73; 8.23 V
\(\phi\)Impedance angle43.3\(^{\circ}\)
\(\tau,f_c\)Time constant/cutoff1 s; 0.159 Hz
\(H\)Output/input ratio0.157 at 1 Hz; unitless
\(V_{\mathrm{in}},V_{\mathrm{out}}\)Filter voltages1; 0.157 V amplitude
\(t,t_0\)Time/step time1; 0 s
\(y,y_0,y_\infty\)Output/initial/final3.16; 0; 5 V

Underlining denotes a complex phasor. Filter formulas assume an ideal source and negligible output loading.

📚 Resources and Source Materials

This page combines the supplied lecture PowerPoint and speaker notes, one-page equation sheet, quiz and solution key, student workbook, instructor guide, and applicable model data. The 50-minute lecture includes the 15-minute activity. Scheduling positions in the teaching plan do not change posted course due dates.

Previous lecture | Lecture index | Next lecture

Course on GitHub

Python

Access

Communicate

Electrical

EE Lectures

Series

Data Engineering

Applications

Text OCR 👁️
Generative AI 🗣️
Humidity 📐
👁️=Computer Vision
⚙️=Actuators
⏱️=Time Series
🗣️=Language
🔊=Audio
📈=Regression
📊=Classification
📐=Sensors

Related Courses

Admin