2021-22 Sem 2 Project 3: Analysis and simulation of AC circuits

Project duration: 1 week

Project type: individual

In today’s lab sessions, we are learning how to use Octave/MATLAB and LTspice for AC circuit analysis and simulation. The following video reviews some basic theory, then shows a complete worked example for an AC circuit similar to (but not the same as) the one you will be investigating. First, a phasor analysis is demonstrated in Octave. Then the circuit is simulated in LTspice. Finally, the results of the phasor analysis and simulation are compared.

You will be analysing and simulating a different circuit, which is shown below:

  • Vs is a sinusoidal AC voltage source, with magnitude 230 V r.m.s. and a frequency of 50 Hz.
  • R1 = 10 kΩ
  • R2 = 10 kΩ
  • R3 = 10 Ω
  • L = 20 mH
  • C = 220 μF

Part 1: Octave / MATLAB analysis

(Submit your finished M-file to Brightspace as evidence, together with a screenshot of the calculated values displayed in the command window of Octave/MATLAB)

Using Octave or MATLAB, carry out a phasor analysis of the currents and voltages in the circuit. Make Vs the reference phasor (i.e. just set Vs equal to the r.m.s. magnitude of supply voltage so that it has zero phase angle).

  • Calculate the phasor current in R2.
  • Calculate the phasor voltage across R2.
  • Calculate the peak voltage across R2.
  • Calculate the phasor current in C.
  • Calculate Vc, the phasor voltage across C.
  • Calculate the peak voltage across C.
  • What is the phase angle of Vc? Is it leading or lagging Vs?

Submit your finished M-file to Brightspace, including clear comments identifying each step in the process (similar to the example shown in the video above). Also submit a screenshot of your M-file running the Octave/MATLAB command window, with all seven values listed above clearly displayed.

Part 2: LTspice simulation

(Submit the two LTspice screenshots described below to Brightspace as evidence)

Simulate the circuit (same circuit as part 1) in LTspice. As evidence of your successful simulation, obtain the two LTspice screenshots described below:

Screenshot 1:

  • Display the circuit schematic in one pane.
  • In a second pane, display a plot of exactly two cycles (i.e. 40 ms) of the oscillating supply voltage and the voltage across resistor R2. Choose a time period when both waveforms are at steady state (i.e. not at the very start of the simulation).
  • No other traces (waveforms) should be displayed on the plot.
  • Add a text label to each of the two traces to identify which is which.
  • Using the two cursors in LTspice, clearly mark the peak supply voltage and the peak voltage across R2.

Screenshot 2:

  • Display the circuit schematic in one pane.
  • In a second pane, display a plot showing exactly 4 cycles of the following three traces: the supply voltage, the voltage across capacitor C and the current through capacitor C.
  • Using the two cursors in LTspice, mark the peak of the supply voltage and the nearest peak of the capacitor voltage. Hence measure the time difference between the waveforms and calculate the equivalent phase shift between them.
  • Add two text labels to the plot – one stating the phase difference predicted by the earlier phasor analysis (the angle of phasor Vc), and the other stating the phase difference calculated by measuring the time shift between the waveforms in the LTspice plot. The two should agree – do they?

Submit the two screenshots to Brightspace.

2021-22 Sem 2 Project 2: Building a capacitor

Expected project duration: 3 weeks (2 weeks practical work + 1 week supervised writing)

Project type: group

The objective of this project is to construct a parallel plate capacitor from readily available materials such as aluminium foil (for the conducting plates) and paper (for the dielectric that separates the plates). You’re free to improvise with other materials, but please observe the following rules:

  • Use only dry materials in your capacitor. No liquids!
  • Carefully assess any potential risks associated with the materials you’re using and avoid doing anything that might cause injury (e.g. cutting up aluminium cans which produces dangerously sharp edges).

You’re encouraged to try to make the capacitance large. However, we’re also interested in how densely you can cram the capacitance into a compact space. Even better would be if your capacitance is variable. We’re hoping that some of you will impress us with creative solutions.

To give you time to develop something impressive, we’ll spend two weeks (i.e. 10 laboratory hours) on the practical phase of the project. Both lab sessions in the third week of the project will be spent writing a technical report on your work, under the supervision of your lab tutor. The following example report (for a different, but related experiment) is provided to guide you in writing your own report:

Theory

The following equation gives the expected capacitance for an ideal parallel plate capacitor.

C = \frac{\epsilon A}{d}

where

  • C is the capacitance in farads [F],
  • \epsilon is the absolute permittivity (often just referred to as the permittivity) of the dielectric (insulating material) that separates the conducting plates in farads per meter [Fm-1],
  • A is the area of each plate in square metres [m2], and
  • d is the distance between the plates in metres [m].

Note that the dielectric thickness, d, shown in the above diagram is greatly exaggerated. In a real capacitor, the dielectric would typically be extremely thin in order to get the plates as close to each other as possible.

Permittivity is a property of a material or medium in which an electric field is present. Tables of permittivity values are available for different materials (e.g. air, water, concrete, soil, glass, etc.). Permittivity has a very significant effect on how electromagnetic waves propagate through a medium so, among other things, it can tell us useful information about how mobile phone or wi-fi signals will penetrate the walls of a building. The medium with the lowest possible permittivity is a perfect vacuum. The permittivity of a material is often stated as a relative permittivity – the ratio between its absolute permittivity and the absolute permittivity of a vacuum.

\epsilon = \epsilon_r \epsilon_0

where

  • \epsilon is the absolute permittivity of the material in question in farads per metre [Fm-1],
  • \epsilon_r is the relative permittivity of the material, which is a dimensionless value (i.e. it has no units because it’s the ratio of two values that have the same units), and
  • \epsilon_0 is the permittivity of a vacuum, 8.854188 ✕ 10-12 farads per metre [Fm-1].

The permittivity of air is very close to that of a vacuum, so it has a relative permittivity of approximately 1. Materials that are good insulators tend to have low relative permittivities. Have a look online for some of the published lists of material permittivities.

Part 1: Construct a simple parallel plate capacitor

To begin with, construct a simple capacitor as follows:

  1. Cut out two square pieces of aluminium foil, approximately 20 cm x 20 cm, but leaving an extra strip of foil extending from one corner of each piece (for attaching wires).
  2. Cut two long wires – long enough to reach from the breadboard to opposite corners of your 20 cm x 20 cm square capacitor. Remove the insulation from the last 2 cm of each wire.
  3. Sellotape one wire onto the corner strip of each piece of foil.
  1. Lay one piece of foil down smooth flat surface.
  2. Lay a piece of A4 paper on top of the foil, taking care to cover every part of it except for the strip with the wire attached.
  3. Lay the second piece of foil down so that it is directly above the first piece (but separated from it by the paper). Orient it so that the corner with the wire attached is not at the same corner as the wire for the lower plate.
  4. Lay something flat and heavy (like a hardback book) on top to press the three layers tightly together.
  1. To measure the capacitance of your capacitor, plug the wires into a breadboard and build an RC circuit by connecting it to a resistor (e.g. 100 kΩ) and signal generator. Using the oscilloscope, measure the time constant of the RC circuit and hence estimate the capacitance. (To give you a rough idea what to expect, when I tried building this capacitor I obtained a capacitance of approximately 15 nF.)
  2. Try pressing down hard on the stack to squeeze the plates ever closer together. Does it affect the measured capacitance? Can you see the time constant changing?
  3. Using the equation from the theory section above, estimate the expected capacitance of this capacitor and compare it to the measured value. When applying the formula, note the following:
    • The area of the plates must be expressed in square metres.
    • The distance between the plates should be approximately equal to the thickness of the paper sheet. This is difficult to measure directly, but if you measure the height of a stack of sheets then divide by the number of sheets, a reasonably accurate estimate can be obtained. This distance must be expressed in metres.
    • Different types of paper will have different relative permittivities. The exact value for the paper you’re using won’t be possible to find, but you should be able to find a reasonable ballpark estimate online.

Retain all your calculations, measurements, and links to information sources so that you can include them all in your lab report next week.

Part 2: Design, build and test a larger and/or variable capacitor

Now you’re ready to create your own capacitor design, hopefully with a larger capacitance than the simple design described above. If you can think of a way to make the capacitance variable, that would be a major bonus.

Strategies to consider:

  • Increase the area of the plates?
  • Try a thinner dielectric material?
  • Use a dielectric with a different permittivity?
  • Stack more plates together?
  • Roll your capacitor into tightly rolled cylinder?
  • Create more than one capacitor and combine them in parallel?
  • Vary the capacitance by sliding one plate over the other?
  • Vary the capacitance by squashing the plates closer together?

Research online to get some more ideas.

To prepare for writing your report, please retain or collect all of the following items:

  • Photographs of everything you built, ideally including steps during the build process.
  • Screenshots of anything you measured using the oscilloscope.
  • Any calculations you carried out. If the calculations were carried out on paper, then retain the written calculations. If the calculations were carried out in MATLAB / Octave, then grab a screenshot or save it to an M-file so that you can refer back to it.
  • The sources of any information you obtained online – e.g. material permittivity, thickness of paper / cling film, etc.

Part 2b (optional): Variable frequency oscillator

Try incorporating your variable capacitor into the oscillator circuit you built in the synthesizer project at the end of semester 1, so that you can vary the frequency of oscillation.

Part 3: Write a lab report about the capacitor you built (during labs in week 3 of project)

An example lab report is provided to guide your writing. The example report is for a different, but closely related, experiment. Use it as a template for writing your report about this project.

  • Submit one report per group – i.e. a single Word document / PDF.
  • Identify all team members clearly at the start of the report.
  • Each team member writes at least one full section.
  • Proofread each others sections of the report to identify errors.
  • Clearly label the author(s) of each section of the report. The name(s) can be included in brackets following each section title.