AC power - Simulation and hand calculated values different

Click For Summary
SUMMARY

The forum discussion centers on discrepancies between hand calculations and MATLAB simulations for reactive power in an AC circuit. The circuit includes resistors (R1 = 12Ω, R2 = 20Ω), an inductor (L = 0.0531H), and a capacitor (C = 265.26μF). The user calculated real and reactive power for each component and noted differences in reactive power values for the inductor and capacitor when using MATLAB. The discussion emphasizes the importance of using RMS values and phase angles in power calculations, particularly when determining total complex power.

PREREQUISITES
  • Understanding of AC circuit analysis, including mesh analysis
  • Familiarity with MATLAB, specifically Simulink and SimPowerSystems
  • Knowledge of complex power calculations in AC circuits
  • Basic concepts of reactive power and power factor correction
NEXT STEPS
  • Learn how to use MATLAB's power measurement tools for AC circuits
  • Study the relationship between impedance and reactive power in AC circuits
  • Explore techniques for plotting complex impedance as a function of capacitance in MATLAB
  • Investigate methods for calculating total complex power using algebraic techniques
USEFUL FOR

Electrical engineering students, circuit designers, and anyone involved in AC circuit analysis and simulation using MATLAB.

eehelp150
Messages
235
Reaction score
0

Homework Statement


upload_2016-12-4_11-19-33.png


Homework Equations


P=I*(I*)*R/2

The Attempt at a Solution


R1 = 12
R2 = 20
L = 0.0531H
C = 265.26*10^(-6)F
W = 2*pi*60
L -> jwL = 20j
C = 1/(jwc) = -j10

Mesh equations:
Mesh 1 (left mesh, clockwise)
-Vs +I1(R1+L+C)-I2(C)=0

Mesh2 (right mesh, clockwise)
I2(C+R2)-I1(C)=0

I1=6.78-j5.09
I2=-0.68-j3.73

Hand calculated:
PowerR1 = (I1 * I1conjugate *R1)/2 = 431W
PowerR2 = (I2*I2conjugate*R2)/2 = 143W

PowerL = (I1 * I1conjugate *L)/2=j719.87VAR
PowerC = -j297.79VARWhen I simulate in MATLAB, I get different results for reactive power of L and C:
Matlab provides these following RMS Voltages:
VL = 119
VC = 53.53

PowerL = ##\frac{VL^2}{L}## = -j719.87VAR
PowerC = ##\frac{V_C^2}{C}##=j297.79VAR

Is my MATLAB simulation wrong or my hand worked calculations wrong?
 
Physics news on Phys.org
What value are you using for the source voltage?
 
gneill said:
What value are you using for the source voltage?
Completely forgot that, sorry.
Voltage Source is ##120\sqrt2cos(2\pi60)##
 
eehelp150 said:
Completely forgot that, sorry.
Voltage Source is ##120\sqrt2cos(2\pi60)##
Okay, so it's a 120 V rms source. You'll want to use rms if you're doing power calculations.
 
gneill said:
Okay, so it's a 120 V rms source. You'll want to use rms if you're doing power calculations.
The formula I'm using accounts for RMS, doesn't it? The divided by 2 should account for that.
 
eehelp150 said:
The formula I'm using accounts for RMS, doesn't it? The divided by 2 should account for that.
I suppose it would. Personally I find it simpler to just use 120V in the calculations and stick to P = VI*, where P is the complex power.
 
gneill said:
I suppose it would. Personally I find it simpler to just use 120V in the calculations and stick to P = VI*, where P is the complex power.
Is there any reason I'm getting 90degrees (+i) when I calculate it by hand and -90degrees(-i) when I use the measured values from MATLAB?
Note: For "measured" values of power, I am squaring the RMS voltage given by Matlab and dividing by the impedance.
 
From what I can see, your RMS voltages from Matlab don't include their phase angles. So only the impedance angle is contributing to the calculation.
 
gneill said:
From what I can see, your RMS voltages from Matlab don't include their phase angles. So only the impedance angle is contributing to the calculation.
Would it be 'acceptable' to exclude the phase angles? If I recall correctly they are irrelevant without context, right?
 
  • #10
eehelp150 said:
Would it be 'acceptable' to exclude the phase angles? If I recall correctly they are irrelevant without context, right?
I think it would depend upon what you want to do with the result. If you were determining the power factor for a circuit you'd probably want to know if it were leading or lagging. If you just want to know the magnitude of the reactive power in a component, losing the angle wouldn't matter.
 
  • #11
gneill said:
I think it would depend upon what you want to do with the result. If you were determining the power factor for a circuit you'd probably want to know if it were leading or lagging. If you just want to know the magnitude of the reactive power in a component, losing the angle wouldn't matter.
For percent error I could ignore it right?
The assignment is to solve the circuit by hand and get the real/reactive power for each element.
Then use MATLAB to solve the circuit and get the real/reactive power for each element
Then calculate percent error
 
  • #12
eehelp150 said:
For percent error I could ignore it right?
Sure, since I presume you'll be comparing the magnitudes.
 
  • #13
gneill said:
Sure, since I presume you'll be comparing the magnitudes.
If I want the total reactive power, I just add Q1 and Q2 right?
Do I ignore the phases as well for that?
 
  • #14
eehelp150 said:
If I want the total reactive power, I just add Q1 and Q2 right?
Do I ignore the phases as well for that?
I wouldn't ignore the phases for the total. The reactive powers being out of phase will at least partially cancel.

Instead, why not use the complex current supplied by the source and determine the total complex power? Then you can pull out the real and reactive components.
 
  • #15
gneill said:
I wouldn't ignore the phases for the total. The reactive powers being out of phase will at least partially cancel.

Instead, why not use the complex current supplied by the source and determine the total complex power? Then you can pull out the real and reactive components.
How would I get total complex power using MATLAB? I can get the RMS Current of the source, but I wouldn't have any degree, only magnitude.
 
  • #16
eehelp150 said:
How would I get total complex power using MATLAB? I can get the RMS Current of the source, but I wouldn't have any degree, only magnitude.
You used mesh analysis did you not? That gives you the complex current in the first loop...
 
  • #17
gneill said:
You used mesh analysis did you not? That gives you the complex current in the first loop...
Yes, but the professor wants the Total Real/Reactive power measured with MATLAB as well as by hand. I already have the by hand part.
 
  • #18
I don't have any idea how the Matlab portion was implemented, so I can't really advise. Did you write equations or run some kind of simulation?
 
  • #19
gneill said:
I don't have any idea how the Matlab portion was implemented, so I can't really advise. Did you write equations or run some kind of simulation?
I am using Simulink + SimPowerSystems. I think I am only able to get the RMS values.
Edit:
Nevermind. I found a power measurement tool.
 
  • #20
eehelp150 said:
I am using Simulink + SimPowerSystems. I think I am only able to get the RMS values.
Edit:
Nevermind. I found a power measurement tool.
Cool. Sorry I can't be of more help there, I've never used Matlab.
 
  • #21
gneill said:
Cool. Sorry I can't be of more help there, I've never used Matlab.
No worries. I really appreciate all the help you've given me this semester. You are literally (figuratively) a life saver.
 
  • #22
gneill said:
Cool. Sorry I can't be of more help there, I've never used Matlab.
Quick question: To reduce reactive power consumption, we would add a larger capacitor, right?
 
  • #23
eehelp150 said:
Quick question: To reduce reactive power consumption, we would add a larger capacitor, right?
Not necessarily. It depends on how the impedances combine in the circuit, and which side of the natural frequency the circuit is operating. You might find that there's a "sweet spot" for the capacitance that minimizes the reactive impedance that's not where you'd expect from the usual power factor correction approach. Usually there the idea is to stick a new capacitor in parallel with the original circuit, not change a capacitor that's already buried in the circuitry.

I presume that Matlab will let you plot a function fairly easily. Why not write a function that gives you the complex impedance as a function of the value of C in microfarads. Plot the imaginary component versus C. I think you'll find a minimum reactance when C is smaller than the original value (I estimate somewhere around 50 μF).
 
  • #24
gneill said:
Not necessarily. It depends on how the impedances combine in the circuit, and which side of the natural frequency the circuit is operating. You might find that there's a "sweet spot" for the capacitance that minimizes the reactive impedance that's not where you'd expect from the usual power factor correction approach. Usually there the idea is to stick a new capacitor in parallel with the original circuit, not change a capacitor that's already buried in the circuitry.
I want to reduce reactive power by 50%
This is my work:
##Q_{original}=430.8##
##Q_{desired}=215.4##
##Q_{delta}=215.4##
##X_C=\frac{V_{rms}^2}{Q_{delta}}=\frac{120^2}{215.4}##
##C=\frac{1}{X_C*2*pi*60}=3.967e-5##
Where would I stick this capacitor in the circuit to get my desired reactive power?

gneill said:
I presume that Matlab will let you plot a function fairly easily. Why not write a function that gives you the complex impedance as a function of the value of C in microfarads. Plot the imaginary component versus C. I think you'll find a minimum reactance when C is smaller than the original value (I estimate somewhere around 50 μF).
Don't really know how to plot with Simulink...
 
  • #25
eehelp150 said:
Where would I stick this capacitor in the circuit to get my desired reactive power?
Presumably across the source.
eehelp150 said:
Don't really know how to plot with Simulink...
Matlab itself should let you write and plot functions, no? Your total circuit impedance is just:

##Z = R1 + ZL + \frac{R2*ZC}{R2+ZC}##

where: ##ZC = \frac{1}{jω C}##
 
  • #26
gneill said:
Presumably across the source.

Matlab itself should let you write and plot functions, no? Your total circuit impedance is just:

##Z = R1 + ZL + \frac{R2*ZC}{R2+ZC}##

where: ##ZC = \frac{1}{jω C}##
For some reason the simulator will not let me put a capacitor in parallel with the source.
 
  • #27
eehelp150 said:
For some reason the simulator will not let me put a capacitor in parallel with the source.
Strange. Try putting a very small resistance in series with the capacitor. Something like 10-6 Ohms.
 
  • #28
gneill said:
Strange. Try putting a very small resistance in series with the capacitor. Something like 10-6 Ohms.
That works! Would there be any way to calculate a different value for the original capacitor instead of adding a capacitor?
 
  • #29
eehelp150 said:
That works! Would there be any way to calculate a different value for the original capacitor instead of adding a capacitor?

Yes, but I imagine that the algebra could get tedious. You want to find the reactive power as a function of C, so that means finding the imaginary part of the complex power. It would be easier to plot the reactive power and pick out the solution on the plot.
 
  • #30
gneill said:
Yes, but I imagine that the algebra could get tedious. You want to find the reactive power as a function of C, so that means finding the imaginary part of the complex power. It would be easier to plot the reactive power and pick out the solution on the plot.
Ok, thanks!
Going back to this:
##Z = R1 + ZL + \frac{R2*ZC}{R2+ZC}##
Total complex power would be V^2/Z, where Z is the above right?

How would I solve this using algebra?
 
Last edited:

Similar threads

  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 10 ·
Replies
10
Views
11K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
11
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K