To support PTC’s Electrical Engineering webcast, Mathcad for Electrical Engineers, the theme of last month’s Mathcad Community Challenge was based on an AC circuit:
An AC electrical circuit consists of the following components connected in series:
Calculate the following for this circuit:
Using an XY Plot or a Chart Component, graph the following in the same plot or chart over a minimum of 2 cycles:
Using the advanced input controls like sliders, buttons, check boxes, etc., allow people to change one or more values in the Calculation Challenge to see how that affects the calculated values.
The Calculation Challenge was intentionally straightforward, the kind of problem that a first-year engineering or high school physics student could solve. Even people who aren’t electrical engineers could look up the formulas. If you did not participate in the challenge in January, I encourage you to try your hand at it.
Alternating current is a concept that many students struggle with. The Graphing Challenge was intended to show people that the current and voltage in the resistor match phase; voltage in the inductor “leads” the current; and voltage in the capacitor “lags” behind the current. Please look at the graphs in the submissions to see the relationships between the various peaks and valleys.
This month had 12 worksheets submitted by 3 people, all of whom participate in the challenges loyally every month: TTokoro, Luc Meekes, and Alan Stevens.
Normally, I do not declare a “winner” to the challenge, as this is intended as a true community effort and for people to help one another. But TTokoro went above and beyond, submitting EIGHT separate worksheets, building on his effort every time.
The first worksheet uses a direct approach to the Calculation Challenge: define variables with units and evaluate the expressions. Functions, some involving integrals and derivatives, are used to graph the current and voltages. The second and third sheets get into sinusoidal steady-state phasor analysis (with a hat tip to Luc Meekes’s grid function from the forum discussion) and analysis of transients. This involves real and imaginary number functions, symbolic evaluations, and some voltages expressed in complex numbers I had never seen before. There is a lot of really advanced math that could benefit from a bit more documentation and explanation, especially for people unfamiliar with electrical engineering like me.
(Note: I found out from David Newman that Professor Tetsuro Tokoro-san has a YouTube channel where he discusses his submissions, among other topics. It is in Japanese, though.)
Luc Meekes submitted the second worksheet. At the top, some complex number functions and Laplace transformation functions are hidden in an area. I like how Luc defines functions and then evaluates them in the Calculation Challenge. Combined with the text blocks, it’s easy to follow. Similarly, I like his documentation and organization in the Graphing Challenge. As a layman in this field, I felt I could understand his results.
Luc submitted a total of three worksheets this month. The second one adds a rectifier to the voltage in the circuit. It uses an if function to set the voltage to zero when it evaluates to less than zero. His third worksheet creates a square wave function to the circuit voltage via the sign function.
Alan Stevens was the third person to respond. I like that he included an image he made of the circuit; as the saying goes, a picture is worth ten thousand words. The calculations of the reactances, impedance, and phase angle were solved directly. To find the current and dissipated power, he uses an ordinary differential equation approach and the Euler method of integration (due to Mathcad Prime Express limitations). His calculations take into account the transients before the circuit reaches steady state, which is depicted in graphs. For clarity, Alan creates two XY Plots for the Graphing Challenge, one for current and voltage, and the other for the voltage drops across the resistor, capacitor, and inductor.
As mentioned earlier, TTokoro submitted several more worksheets, which are summarized here:
This ostensibly simple circuit shows that the math behind electrical engineering can get extremely complicated very quickly. Fortunately, Mathcad Prime has a host of tools you can use to solve and document your product development tasks. These include (but of course aren’t limited to) units support, complex numbers, XY Plots, Solve Blocks, symbolic evaluation, differential equations, and advanced input controls.
By the time this blog is published, PTC will have already hosted its Mathcad for Electrical Engineers webcast. If you didn’t have the opportunity to see it live, be sure to view the replay. Join us in March for a physics-based challenge, and review all of the previous Mathcad Community Challenges at the index resource.
Make sure you hear about new Mathcad challenges as they happen by subscribing to our monthly newsletter.