From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-18-2007 12:51 AM
02-18-2007 03:37 PM
02-18-2007 04:01 PM - edited 02-18-2007 04:01 PM
Message Edited by martinmistere on 02-18-2007 04:05 PM
02-18-2007 09:16 PM
02-19-2007 12:29 AM
02-21-2007 06:02 AM
Hi martinmis,
I think that the calculation of the double integral Q as made in 3.1.1.3 should not be considered in a numeric sense but into an analytical sense. In fact, if you consider the last term of the equation as you did, you can obviously see that the integration of i in dt over a period must give 0 as result. Try instead to consider the first term of the right member in which there is the integral of v in di: in so doing what you have to calculate is the integral of v multiplied for the derivative di.
Starting from that point, you know that Power factor (P) is 1 if voltage and current are in phase (teta [or fi as you called it]=0) while is 0 if the phase (teta) is 90 degrees. For the reactive power Q is the contrary. So the example you discuss on doesn't be good in this case because I expect to have Q=1 (without considering constant factor) because the sin and cos generated have a relative phase of 90 degrees.
So, what I suggest to do is to make a vi that multiply the current value of v for the derivative of i (difference between current value of i and previous one) and then make the summation of all the value v*(i2-i1) obtained in that manner. This should fix your problem.
carlo>
02-21-2007 07:23 AM
02-22-2007 01:49 AM
Hi martinmis,
I post an example, I modify the VI posted by gvd. In this example I show you how to use shift register in order to do a derivative operation. If you take a look to the Block diagram, you will see that on the right side:
1. I leave unchanged gvd's calculation (for loop at the bottom).
2. I do calculation with i and v that are out of phase of 90 degrees i.e sin and cos (for loop in the middle) -> Q=1 as expected. You see that if you run the vi "sum" is equal to -pi=-3,14 that's should be right if you take into consideration the various normalization factors.
3. I do calculation with i and v that are in phase [teta=0] i.e sin and sin (uppermost for loop)-> Q=0 as expected. Note that if you increase the number of cicles that generate sin and cos functions in the left for loop of the vi Q-->0 faster.
Please, consider this example as a guideline, I let you to fix the various normalization constant.
I hope I've been of some help
carlo>
02-22-2007 12:53 PM
02-23-2007 06:58 AM
Hi martinmis,
here it is the VI saved for LV 8.0. I also include an image of the block diagram.
I hope this help you.
carlo>