Group Abstract Group Abstract

Message Boards Message Boards

6
|
11.6K Views
|
29 Replies
|
19 Total Likes
View groups...
Share
Share this post:
GROUPS:

[WSG24] Daily Study Group: Introduction to electric circuits

Posted 1 year ago

A Wolfram U Daily Study Group focusing on the beauty of Electrical Engineering begins on the 24th of June.

Join @Leonardo Laguna Ruiz, @Ankit Naik and a group of fellow learners to explore the fundamentals of electrical engineering. You will learn the basic concepts in an intuitive and accessible way. We will delve into analysis methods that will enhance your understanding of how electric circuits work. Next, we will focus on operational amplifiers and their versatile applications, such as solving equations, designing filters, and creating fundamental building blocks for analog synthesizers and analog computers.

This study group is suitable for both beginners and experienced engineers looking to refresh their knowledge and learn new analysis techniques. No prior Wolfram System Modeler or Wolfram Language experience is required to join the study group.

Please feel free to use this thread to collaborate and share ideas, materials and links to other resources with fellow learners.

We look forward to seeing you: June 24th-June 28th & July 8th-July 12th, 11am-12pm CT (4-5pm GMT). Due to the US Independence Day holiday, this Study Group will break during the week of July 1 and resume on July 8.

REGISTER HERE

enter image description here

POSTED BY: Ankit Naik
29 Replies

Hi Ankit;

In calculating both the amplitude and phase angle in electrical circuits, that contain capacitors and inductors, there is a technique called Phasors - which greatly simplifies the calculations. The phasor calculations are easily performed using my TI-89 calculator but cannot find a similar method using Mathematica. However, I would much prefer to use Mathematica. Does Mathematica have something similar to Phasors or is there a recommended method to calculating amplitudes and phase angles in Mathematica?

Thanks,

Mitch Sandlin

POSTED BY: Mitchell Sandlin

Mitch, phasors can simply be represented as complex numbers, and the Wolfram Language primitives deal just fine with manipulating complex numbers and then extracting the phase/magnitude after doing those manipulations. I asked ChatGPT (4o) your question, and it returned a completely competent answer:

https://chatgpt.com/share/2d90bf49-19af-43f7-8d7c-18c935d35a88 .

In general, ChatGPT is great for generating little code fragments of Wolfram Language code for questions just like this. Just keep in mind that all of the LLMs will create slightly or completely wonky answers from time to time. Trust, but verify.

POSTED BY: Phil Earnhardt

Also, there are multiple examples in the Wolfram Demonstrations project that mention phasors. You can download, run, and peruse the source code for each of these little projects.

POSTED BY: Phil Earnhardt

Hey Ankit,

Did you see my previous post?

Here is the thing. The learning curve for learning how to use System Modeler is steep. It doesn't really follow the paradigm of Wolfram Language. I start to think I am getting the hang of it, but then I get these weird curve balls. My purpose for following this class is not so much to learn circuit design, but it's to learn how to use System Modeler effectively in circuit design. That's not the emphasis for this class as it turns out, but still, a little help might convince me to buy the too or convince me to convince my corner of Boeing to buy the tool.

POSTED BY: Carl Hahn

In taking the quizzes, I would like to verify Question 2 in Quiz 1 and Question 6 in Quiz 2, in which I answered B and C respectively. If my answers are in fact incorrect, would someone please explain why.

Thanks,

Mitch Sandlin

POSTED BY: Mitchell Sandlin

Wolfram U prefers that students not discuss quiz answers in the DSG for a course. You should e-mail wolfram-u@wolfram.com or you can put info in the feedback form that pops up at the end of each lecture.

FWIW, I'll also be providing them feedback to the quizzes.

POSTED BY: Phil Earnhardt

I have checked the questions you mention and it seems that the answer key is incorrect, so the options we took as correct are wrong. I will update the quiz to reflect the correct answers.

I have checked the questions you mention and it seems that the answer key is incorrect, so the options we took as correct are wrong. I will update the quiz to reflect the correct answers.

Leo, I just had my score on Quiz 1 re-checked. I refreshed the course framework (in my Safari browser). The suspect question is still getting flagged as incorrect. As far as I can tell, the quiz answer sheet has never been updated with the correct answer. It's been almost 3 days since the errors on Quiz 1 and Quiz 2 were reported and over 2 days since you said that they would be fixed. Please fix them promptly. There's some in-course joke I should say about hysteresis at this point, but I can't quite figure out what it is. :)

I apologize for sending this message to the public forum, but this is the only means we're given to contact the instruction staff. If this were in an in-person class, I would speak directly with the teacher or the TAs.

POSTED BY: Phil Earnhardt
POSTED BY: Cassidy Hinkle
POSTED BY: Carl Hahn

Hi Carl,

It looks like the error you're encountering is due to the use of an older version of the Modelica standard libraries in your model. This can cause compatibility issues.

enter image description here

Specifically, the DCMotor component in the model is outdated and uses an older Modelica version component name ( Modelica.Electrical.Analog.Basic.EMF EMF(k = 2) "DC motor electro motoric force";)

By replacing it with the rotationalEMF component (Modelica.Electrical.Analog.Basic.RotationalEMF ), you should be able to resolve the issue and run the simulation successfully.

enter image description here

I've modified the model accordingly and am attaching the updated version.

Attachments:
POSTED BY: Vedat Senol

Can you try to switch the Modelica Version to 3.2.3 and simulate again? enter image description here

Right-click on Modelica library, go to version and switch to 3.2.3, and try to simulate? Let me know if that works else I will troubleshoot further.

In version 14, we made version 4.0.0 as the default. I am currently updating the Wolfram U videos to use this new version.

POSTED BY: Ankit Naik

The YouTube channel "Practical Engineering" had a discussion about real power vs. reactive power on the electrical grid. The video was documenting a recent failure of the grid in Montreal that was linked to the electromagnetic energy of coronal mass ejections: https://www.youtube.com/watch?v=ZwkNTwWJP5k (22 minutes).

Before the failure is discussed, the video talks about the need for reactive power in the grid -- and how engineers compensate for that need for more power. In short, the characteristics of the grid can be changed by installing large inductors and capacitors near equipment placing induction/capacitance demands on the grid. Some of those compensation devices are banks of capacitors; some are a motor that is just spinning without being connected to a load. The spinning motor allows it to both absorb and inject power into the grid.

Reactive power isn't ever consumed. In some sense, it's not real. As our instructors have noted, power in AC circuits has a real component and an imaginary component. This "imaginary" component still must be provided -- even though the destination equipment will put the power back into the grid somewhere else in the 50Hz/60Hz cycle. Measurement for the amount of reactive power consumed is somewhat complicated. For this and other reasons, homes are not charged for any reactive power they require. OTOH, businesses that demand much electrical power are charged for their reactive power usage. They pay not only for their real power usage, but for their imaginary power usage.

This video provides an excellent example of the need for complex numbers to understand AC circuits -- both small and massively large AC circuits. I suppose something other than complex numbers could be used to manage the housekeeping, but complex numbers have the precise amount of complexity to both visualize and calculate the physics of what's happening in an AC circuit.

I highly recommend this little video -- something to view during our "holiday" week in the DSG.

POSTED BY: Phil Earnhardt

In today's class, somebody asked:

why are frequencies represented with imaginary numbers?

I highly recommend ChatGPT for this kind of question. That exact question yields a comprhensive answer in the AI. Since ChatGPT 4o is available freely for anyone who requests an account; I highly recommend using that tool. OpenAI even provides an app for MacOS to help keep things uncluttered on your desktop.

In class today, our instructors were discussing the variety of sinusoidal behaviors associated with electronics and signal processing. I believe they were searching for a particular word. There is a pertinent list of such terms available online in the Electromagnetic Terms section of the Wikipedia entry for Oliver Heaviside. The terms are admittance, elastance, conductance, electret, impedance, inductance, permeability, permittance, and permittivity. Two other terms were coined by Heaviside's peers around the same time: susceptance and reactance. These terms were coined from 1885 to 1894. Some are widely used today in physics and engineering; others have withered into obscurity. Some terms deal with real values; others deal with imaginary values. The Wikipedia article contains links defining each of these terms.

Anyone who thoroughly understands these eleven concepts is a signal processing wizard.

POSTED BY: Phil Earnhardt
Posted 1 year ago

Hi There,

I noticed that Modelica electrical has an additional library called Spice. This gives more advanced settings for components like capacitors etc. Is there an easy way to add this to System Modeler?

POSTED BY: Sean G

The capacitor model in the Electrical and the Spice library looks the same to me. Unfortunately, we do not support it yet. For this course, you can create all the models using the Modelica.Electrical library.

class Modelica.Electrical.Analog.Basic.Capacitor
  Real v(quantity = "ElectricPotential", unit = "V", start = 0.0) "Voltage drop of the two pins (= p.v - n.v)";
  Real p.v(quantity = "ElectricPotential", unit = "V") "Potential at the pin";
  Real p.i(quantity = "ElectricCurrent", unit = "A") "Current flowing into the pin";
  Real n.v(quantity = "ElectricPotential", unit = "V") "Potential at the pin";
  Real n.i(quantity = "ElectricCurrent", unit = "A") "Current flowing into the pin";
  Real i(quantity = "ElectricCurrent", unit = "A") "Current flowing from pin p to pin n";
  parameter Real C(quantity = "Capacitance", unit = "F", min = 0.0, start = 1.0) = 1.0 "Capacitance";
equation
  n.i = 0.0;
  p.i = 0.0;
  v = p.v - n.v;
  0.0 = n.i + p.i;
  i = p.i;
  i = C * der(v);
end Modelica.Electrical.Analog.Basic.Capacitor;

class Spice3.Basic.C_Capacitor
  Real v(quantity = "ElectricPotential", unit = "V") "Voltage drop of the two pins (= p.v - n.v)";
  Real p.v(quantity = "ElectricPotential", unit = "V") "Potential at the pin";
  Real p.i(quantity = "ElectricCurrent", unit = "A") "Current flowing into the pin";
  Real n.v(quantity = "ElectricPotential", unit = "V") "Potential at the pin";
  Real n.i(quantity = "ElectricCurrent", unit = "A") "Current flowing into the pin";
  Real i(quantity = "ElectricCurrent", unit = "A") "Current flowing from pin p to pin n";
  parameter Real C(quantity = "Capacitance", unit = "F", min = -1.7976931348623157e+308, start = 0.0) = 0.0 "Capacitance";
  final constant Real WSMServices.Machine.Real_MAX = 1.7976931348623157e+308 "Maximum finite Real number.";
  parameter Real IC(quantity = "ElectricPotential", unit = "V") = 0.0 "Initial value of voltage";
  final constant Real ModelicaServices.Machine.inf = 1.7976931348623157e+308 "Biggest Real number such that inf and -inf are representable on the machine";
  evaluated parameter Boolean UIC = false "Use initial conditions: true, if initial condition is used";
  protected Real vinternal(quantity = "ElectricPotential", unit = "V") "Capacitor voltage";
  final constant Real Modelica.Constants.inf = 1.7976931348623157e+308 "Biggest Real number such that inf and -inf are representable on the machine";
equation
  n.i = 0.0;
  p.i = 0.0;
  v = p.v - n.v;
  0.0 = n.i + p.i;
  i = p.i;
  vinternal = p.v - n.v;
  i = C * der(vinternal);
end Spice3.Basic.C_Capacitor;
POSTED BY: Ankit Naik

As @Ankit Naik mentions, we do not have full support for the Modelica SPICE library in System Modeler. That means that some parts of the library can fail. The SPICE library contains more detailed models of semiconductor devices. The models included in the Modelica.Electrical library are simpler but they are still very useful. I usually stick to those because, for analysis purposes, they are easier to use and they tend to be faster.

Posted 1 year ago

Hi Leonardo,

I can see how it can be a real advantage to take a more simplistic approach. For example, system modeler is probably never going to be as accurate as a dedicated multi-physics FEA but it will get reasonable ballpark answers very quickly for complex multi-physics system-level problems (which is a big advantage). Accurate simulation for electronics can be very complex, System Modeler seems to be taking a more high-level simpler approach which is nice.

Is there any strategy for automatically taking outputs from software like Ansys, Comsol, LTSpice or other simulation programs and integrate the outputs as part of a system-level multi-physics simulation that System Modeler could model?

This would help solve scaling issues with the packages I mentioned above; they are so computationally intensive that doing large systems are not really feasible. It would be interesting to see some System Modeler examples doing this.

Another application where I'd love to see what System Modeler can do is as a tool something like LangChain where LLM outputs can be chained together to action complex tasks.

Apologies, my question maybe a little off-base, just a few general thoughts/questions.

POSTED BY: Sean G
POSTED BY: Carl Hahn
POSTED BY: Ankit Naik
POSTED BY: Ankit Naik
POSTED BY: Phil Earnhardt

Most (but not all) of the pertinent pages from "Scale" are available on the Google Books preview of the text.They start on p. 118 of the book in the section entitled "9. METABOLIC RATE AND CIRCULATORY SYSTEMS IN MAMMALS, PLANTS, AND TREES" and into the next section "10. DIGRESSION ON NIKOLA TESLA, IMPEDANCE MATCHING, AND AC/DC". It gives you a good taste of the entire text.

I had forgotten that impedance matching is the same as non-reflectivity at a boundary/interface. Did you ever see the Shive Wave Machine? This video shows John Shive himself demonstrating his machine: showing impedance matching then an impedance mismatch. Brilliant stuff -- a fantastic visualization. I once saw one of these machines tucked away in a lecture hall, but I never saw a live demonstration.

Biology uses impedance everywhere. The middle ear is an example of impedance matching: funky geometries of 3 little bones to translate vibrations in the air to a liquid medium.

It's great you asked yourself the question why the heart is a pulsatile and not a continuous pump.

POSTED BY: Phil Earnhardt

Just thinking out loud here: From what you quoted, the imbalance appears to have been in the generator frequencies to start with? I imagine they need to stay synchronized in frequency if they are sharing loads. Otherwise you set up a beat frequency at the difference frequency between the two generating systems, and their voltages will move from being in phase to being out of phase, back to being in phase again at the rate of the beat frequency. I don't know how power grids really work, but I imagine this will cause intolerable voltage variations as they sum in phase and out of phase. Did that happen? It's a simple graph to add two sine waves of equal amplitude but with a slight difference in phase to show what happens.

But upon closer inspection of the article you mentioned it looks like the real complaint was simply that having a slightly lower frequency than the assumed 50 Hz, kitchen equipment that assumes 50 Hz and some kind of zero crossing counter as a clock reference will get a long term clock drift.

As an aside, when we talk about load impedances being a function of frequency, unless the load has a very high Q (lossless resonance), they don't change very much in the vicinity of the frequency of the stimulus. Bio-mechanical systems (a cool topic) are inherently lossy and must have low Qs. To a first order it would be surprising to see much sensitivity to the frequency of the stimulus. But I can see additions and cancellations of multiple stimulus playing a role. And our internal body clocks seem to get reset every day according to the motion of the sun.

POSTED BY: Carl Hahn
POSTED BY: Phil Earnhardt
POSTED BY: Phil Earnhardt
POSTED BY: Ankit Naik
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard