LRC Circuit Calculation
In this homework assignment, students (a) practice AC circuit calculations, (b) create functions and use them in Live Scripts in MATLAB, and (c) create Simulink models of AC circuits.
(a) Practice AC circuit calculations
Students practice calculating reactance of capacitors and inductors, impedance and phase of resistors, capacitors, and/or inductors in series and parallel, and output voltages, current, and phase in AC filter circuits.
(b) Create functions and use them in Live Scripts in MATLAB
Students convert a typical homework problems into a computational problems by filling in the programming template for the reactance calculations. Students learn to use the MATLAB functions and scripts by checking calculations of reactance, impedance, phase, and output voltage for AC series and parallel circuits.
(c) create Simulink models of AC circuitsStudents build series and parallel AC circuits in Simulink and correctly represent the voltage sources, resistors, capacitors, and inductors. Students compare output voltage peak values to output voltage calculations.
Context for Use
Description and Teaching Materials
Student handout AC circuits (Acrobat (PDF) 119kB Oct3 17)
ACseriesLiveScripttemplate (MATLAB Live Script 4kB Oct3 17)
ACparallelLiveScripttemplate (MATLAB Live Script 3kB Oct3 17)
ACcircuitsSeriesLiveScript (MATLAB Live Script 28kB Oct3 17)
ACcircuitsSeriesLiveScript (MATLAB Live Script 15kB Oct3 17)
Teaching Notes and Tips
The templates and model are for students new to MATLAB and Simulink. Students fill in the MATLAB Live Script template and determine the variables or values to replace the questions marks. In class, the instructor may work a similar problem at the board or have students work through the problem as group work. It is recommended that during class, the instructor lead the students through the process of filling in the Live Script template and demonstrate how to change the values in the Live Script to modify the calculations for different problems.
The Simulink model is an example of the first homework problem. Students must enter the correct values in the GUI window that pops up when each component is double-clicked. Students run the simulation by pressing the green arrow and then double-clicking on the scope. Students should be capable of completing models for the remaining problems if given the model for the first problem or a similar problem.
For each homework problem, students are assessed equally on the calculations, Matlab Live Script, and Simulink model.
- Calculations (4 pts)
- reactance of the capacitors and inductors
- impedance of the resistor and inductor/capacitor
- output voltage
- completion of functions
- correct parameters to the functions in the Live Script
- comparison of Live Script results to calculations
- creation of the circuit in Simulink
- input values for each component
- output voltage values displayed on the scope
- comparison of Simulink output voltage values to calculations