Archive for November, 2009

In the study of electrical engineering, power factor comes up quite often in terms of its various mathematical definitions, but people seem to overlook its real-world relevance. Though there are some regulations governing power factor, the way residential users are billed for electricity often leaves us in blissful ignorance of the importance of power factor. In fact, power factor is a measure of efficiency.

Starting from first principles, let’s look at the equation for instantaneous power in electrical systems:P=IV

Of course, there are similar definitions for mechanical power (which involve torque and speed rather than voltage and current as above).

In the best case, the voltage and current waveforms will be identical, which means that they are both sinusoidal with crests and troughs occurring together. For passive devices like light bulbs (which are purely resistive loads), this is exactly what happens. However, some devices (such as capacitors and inductors) store energy for a short period of time, causing the waveform of the current to be phase shifted or displaced, relative to the voltage wave.

If we use the “average” values of voltage and current, we can determine what is known as apparent power. Even though I call them average, what we really use are the “root-mean-square” values — the reasons we use this measure are beyond the scope of this article, but suffice it to say that we can’t use a normal average for sine since it would simply be zero. For you statisticians out there, RMS is related to standard deviation (it’s a special case where your mean is zero).

Though its units are identical to those of Power (Watts), we use a different unit convention for this value, the Apparent Power (Volt-Amps, or VA).

Power factor is simply the ratio of real power compared to apparent power:

Power factor is defined as the ratio of real power versus apparent powerFor linear devices which do not store energy, real power and apparent power are the same, so the power factor is 1 (sometimes people call this “unity power factor”).

If, however, an energy storage device like an inductor or capacitor stores energy and simply return it back to the source, then the power factor will be reduced (since power is being transmitted over the line, stored temporarily and then sent back). Only real power contributes to work actually done — whether it be heating your room or turning a motor.

As mentioned earlier, inductors and capacitors cause the voltage and current to be shifted relative to each other. This results in what is called the Displacement Power Factor (the angle, φ, refers to the angular displacement between voltage and current):

Displacement power factor is equal to the cosine of the angle between current and voltageHowever, as we are moving forward in semiconductor techologies, we are increasingly encountering more and more nonlinear devices which introduce something known as Harmonic Distortion. Basically, it makes the current waveform “noisy” compared to the voltage reference; usually this is because a device switches on and off (goes from periods of drawing some current to zero current) instead of merely being proportional to applied voltage.

Total harmonic distortion (THD) is a measure of how “noisy” the current waveform is; for example, if you draw lots of power in short-duration bursts, the current wave won’t look like a sinusoidal waveform at all. This is also known as a shape factor since it will be 1 (unity) for perfectly sinusoidal current, and smaller otherwise.

Distortion power factor is equal to one divided by the square root of one plus the square of the Total Harmonic DistortionTHD is measured as a percentage, so its value is somewhere between 0 and 1.

The overall power factor takes both distortion (current waveform shape) and displacement (current waveform phase difference, relative to the voltage) into account:

Power factor is equal to the displacement power factor multiplied by the distortion power factorSo now we have identified an equation useful for determining the overall power factor of your equipment, especially for things like computers, cooking, heating, washing/drying of clothes, etc. But what does power factor have to do with efficiency?

To answer that question, let’s rearrange our power factor vs (real and apparent) power equation to look at what happens to current. We’ll be looking at RMS current, which is important because it is one of the primary factors that determines maximum loading of a given power line.

RMS current is equal to load power consumption divided by RMS voltage and power factor

Since the amount of power we’ll need and the RMS voltage (line voltage) are effectively fixed, we can see that power factor and RMS current are inversely related. That is, with a lower power factor, we will require higher RMS current to deliver the same amount of power to our load; our RMS current is lowest when the power factor is 1 (unity).

Since power dissipated across a transmission line is:

Power dissipated across a resistor (or transmission line) is determined by the square of RMS current multiplied by resistance

There are finite limits on the amount of current that can be transmitted (greater power dissipated results in more heating of the wires, which can cause them to expand significantly or to melt), a unity power factor means a more effectively utilized infrastructure.

If everything we connect to the power system has a low power factor, it will result in an inefficient use of existing infrastructure (since we are transmitting more current than necessary, which also increases total line losses). It also means we will need a greater investment in infrastructure sooner, which is a challenging issue facing electric power utilities responsible for distribution of power.

Read Full Post »

I’ve recently been pushing for greater support for Catalyst and MojoMojo on Debian. For the uninitiated, Catalyst is a Model-View-Controller Framework designed for writing web applications. MojoMojo is a Wiki application based on Catalyst that provides a lot of neat features; while it seems less popular than Wikimedia’s MediaWiki software, it’s still got plenty of features other wikis don’t.

Here’s a blurb about it from their homepage:

We also have a bunch of features you won’t find in every wiki, like an attachment system that automatically makes a web gallery of your photos, live AJAX previews as you are editing your text, and a proper full text search engine built straight into the software.

Unfortunately, such a rich feature set comes at a price — this shiny piece of software has a rather large dependency chain. As a result, building the module (after building its prerequisites) from CPAN is both slow and prone to failure, since each module must be individually retrieved, extracted, built, tested and then installed.

To make matters worse, any failure anywhere in the chain (perhaps a new version of a module breaks things) will cause a complete failure to build the module — either Catalyst or MojoMojo — which has some serious implications for production applications.

In Debian, we mitigate this risk by having separate unstable and testing distributions, so if a newer version breaks things in unstable, we will catch it and have a chance to fix it before the package makes it into testing. By packaging these modules for Debian, we get the advantages of a faster installation process (since we’re installing pre-built binaries) combined with better Quality Assurance.

One of the big issues blocking both of these has been missing copyright information for a lot of modules. I’ve worked a lot with Matt S. Trout, one of the primary people behind coordinating the efforts of the Catalyst project, and gathered the necessary information for an upgrade and upload into Debian.

Recently, libcatalyst-modules-perl (version 35) and libcatalyst-modules-extra-perl (version 4) were uploaded to Debian, containing many necessary updates and fixes to improve the Catalyst experience on Debian. The next big push is to get MojoMojo’s dependencies packaged (currently only String::Diff is blocking it, due to missing copyright information).

A bounty of $150 is being offered by one of the MojoMojo developers to the first person who can re-implement the String::Diff functionality in a free/open source way.

Read Full Post »

Thyristor-Controlled Series Compensation (TCSC) is used in power systems to dynamically control the reactance of a transmission line in order to provide sufficient load compensation.  The benefits of TCSC are seen in its ability to control the amount of compensation of a transmission line, and in its ability to operate in different modes. These traits are very desirable  since loads are constantly changing and cannot always be predicted.

TCSC designs operate in the same way as Fixed Series Compensation, but provide variable control of the reactance absorbed by the capacitor device. The basic structure of a TCSC can be seen below:


A thyristor-controlled series compensator is composed of a series capacitance which has a parallel branch including a thyristor-controlled reactor.

TCSC operates in different modes depending on when the thyristors for the inductive branch are triggered.  The modes of operation are as listed:

  • Blocking mode: Thyristor valve is always  off, opening inductive branch, and effectively causing the TCSC to operate as FSC
  • Bypass mode:  Thyristor valve is always on, causing TCSC to operate as capacitor and inductor in parallel, reducing current through TCSC
  • Capacitive boost mode: Forward voltage thyristor valve is triggered slightly before capacitor voltage crosses zero to allow current to flow through inductive branch, adding to capacitive current. This effectively increases the observed capacitance of the TCSC without requiring a larger capacitor within the TCSC.

Because of TCSC allowing different operating modes depending on system requirements, TCSC is desired for several reasons. In addition to all of the benefits of FSC, TCSC allows for increased compensation simply by using a different mode of operation, as well as limitation of line current in the event of a fault. A benefit of using TCSC is the damping of sub synchronous resonance
caused by torsional oscillations and inter-area oscillations.  The ability to dampen these oscillations is due to the control system controlling the compensator. This results in the ability to transfer more power, and the possibility of connecting the power systems of several areas over
long distances.

This article was taken from the introduction of a report which was written by a partner and I, submitted to ECE3333: Power Systems I, taught by Professor Rajiv Varma at the University of Western Ontario.

Read Full Post »