Total impedance of a RLC circuit

In summary, the problem is that the person writing the problem didn't clearly understand impedance and its dependence on frequency, and as a result they created an assignment that is poorly written and difficult to understand.
  • #1
andreasoro
7
0
Hi, I need to write a c++ program that calculates the total impedance of a simple RLC circuit. I'm given the values of each component (resistance, coil, condenser). The programming part is not a issue however I can't find the formulas for the impedance on the internet. Can someone help me out please? :) thanks a lot
 
Physics news on Phys.org
  • #2
andreasoro said:
Hi, I need to write a c++ program that calculates the total impedance of a simple RLC circuit. I'm given the values of each component (resistance, coil, condenser). The programming part is not a issue however I can't find the formulas for the impedance on the internet. Can someone help me out please? :) thanks a lot

I wanted to quote the Wiki, but it's been blacked-out.

Anyway...the complex number representations are the neatest representation, and I think C++ can handle complex variables, right?

Capacitance: [itex]Z_C = \frac{1}{j{\omega}C} = \frac{-j}{{\omega}C}[/itex]

Inductance: [itex]Z_L = j{\omega}L[/itex]

Resistance: [itex]Z_R = R[/itex]

For the resistance, the impedance is just the usual resistance. [itex]\omega[/itex] (angular frequency) is equal to [itex]2{\pi}f[/itex], where f is the usual frequency of the alternating current.

Series and parallel arrangements can be treated in the usual fashion, substituting the imaginary/complex reactances and impedances for the usual real resistances.
 
  • #3
Thanks a lot! I don't know if it does, we're supposed to use a struct with two integers representing the real and the imaginary part. Thanks a lot for helping! what is weird is that we're not given ω but just one value for each component (for example "condenser = 4)
 
  • #4
andreasoro said:
Thanks a lot! I don't know if it does, we're supposed to use a struct with two integers representing the real and the imaginary part. Thanks a lot for helping! what is weird is that we're not given ω but just one value for each component (for example "condenser = 4)

I'm pretty sure (ages ago, when I was programming for fun) that C (not even C++) can handle complex variables. I used it in a fractal generation program I wrote. You have to import the correct library, #include<complex.h> or something of the sort and probably #include<math.h> as well.
 
  • #5
andreasoro said:
... what is weird is that we're not given ω but just one value for each component (for example "condenser = 4)

What is the exact phrasing of the problem statement? Is it possible that you're being given the REACTANCES of the L and C components rather than their inductance and capacitance?
 
  • #6
The assignment is in the attachment
 

Attachments

  • Inf1_exsup_Aufgabe.pdf
    91.3 KB · Views: 559
  • #7
By the way, I really appreciate it that you're putting so much effort in helping me :)
 
  • #8
Actually I can't even do the programming part, I've been trying all day but I can't figure out how to do it.. I've never programmed before college and our assignment are really hard or at least they seem hard to me... so if you don't have time it's fine :(
 
  • #9
That's a weird assignment. They didn't specify units for any of the values. I assume the resistances are given in ohm, but what about the inductors and capacitors?

They did mention complex numbers, so they clearly want you to manipulate imaginary reactances and complex impedances. But they did not provide any frequency of the voltage source, etc. which is very important in determining the reactances of those components.

This assignment really needs to be clarified. Judging by the dates, unfortunately, it's not a current assignment.

With regard to the programming part, it looks like they want you to build complex arithmetic capabilities into your program, rather than using predefined library functions.
 
  • #10
If I was doing this assignment and I couldn't get clarification, I wouldn't worry too much. I would just assume that those are L and C values in the usual units (H and F, respectively). I would just leave f as a symbolic variable that can be "#define"d should the need arise, and calculate omega based on f.

Then it's just a matter of defining the structure "complex", constructing functions that add, subtract, multiply and divide, then define the series operation as just the sum of two impedances, and the parallel operation as [itex]\frac{Z_1Z_2}{Z_1 + Z_2}[/itex].
 
  • #11
ok thanks a lot for helping! I really appreciate it! The deadline has been changed to friday which means I still have a couple days! I really need to figure it out because I still need one point to be admitted to the final exam
 
  • #12
andreasoro said:
The assignment is in the attachment

The assignment is poorly written. It is apparent that whoever created the problem didn't fully understand impedance and its dependence on frequency.

I suggest that you add another set of tags, <freq> and </freq>, which allows you to specify the operating frequency of the circuit. This tag set would occur immediately following the <circuit> tag prior to any component specification, and only one per circuit, and would be required for any circuit that contains reactive components (coil or condenser).

With the circuit operating frequency known you can then calculate the impedances of the components given their component values.

Good luck!
 
  • #13
Of course, assuming those are given in H (Henry) and Farad (F) won't make it a very realistic problem though, since those are HUGE inductances and capacitances respectively. It's really a rather badly presented problem, and it's best you seek clarification before wasting too much time/effort.
 
  • #14
Ok I will! Thanks so much! It was very nice of you!
 

Related to Total impedance of a RLC circuit

What is the definition of total impedance in a RLC circuit?

The total impedance in a RLC circuit is the overall opposition to the flow of current in the circuit. It is a combination of the resistance, inductance, and capacitance of the circuit and is represented by the symbol Z.

How is total impedance calculated in a RLC circuit?

To calculate the total impedance in a RLC circuit, you need to use the formula Z = √(R^2 + (Xl - Xc)^2), where R is the resistance, Xl is the inductive reactance, and Xc is the capacitive reactance.

What is the difference between impedance and resistance in a RLC circuit?

Resistance is a measure of the opposition to current flow in a circuit, while impedance takes into account both the resistance as well as the reactive components (inductance and capacitance) of the circuit. Impedance is a vector quantity, while resistance is a scalar quantity.

How does total impedance affect the behavior of a RLC circuit?

The total impedance of a RLC circuit determines the flow of current through the circuit. A higher impedance will result in a lower current, while a lower impedance will result in a higher current. It also affects the frequency response of the circuit, with higher impedance resulting in a lower resonant frequency.

Can the total impedance of a RLC circuit be reduced?

Yes, the total impedance of a RLC circuit can be reduced by either increasing the resistance, decreasing the inductance or capacitance, or by using a parallel connection for the components rather than a series connection. Additionally, the use of a frequency-selective circuit such as a tuned circuit or bandpass filter can also reduce the total impedance at certain frequencies.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
816
  • Engineering and Comp Sci Homework Help
Replies
8
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
26
Views
2K
  • Classical Physics
Replies
1
Views
778
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
Replies
44
Views
3K
  • Introductory Physics Homework Help
Replies
8
Views
276
  • Introductory Physics Homework Help
Replies
3
Views
803
Back
Top