Category

Blog

Shutting down of Badarpur Power Plant – Plan B

By | Blog | No Comments

There was a time, probably just 5 years ago, when regular mobile phone providing connectivity at an affordable price while allowing a person to be mobile was considered good enough. The smartphones were considered an object for the rich (due to their prices) and one used to wonder why I need such expensive phones when I can easily afford a cheaper one that serves “the purpose”.

Read More

Still controlling AC at your outlets with timers?

By | Blog | No Comments

There was a time, probably just 5 years ago, when regular mobile phone providing connectivity at an affordable price while allowing a person to be mobile was considered good enough. The smartphones were considered an object for the rich (due to their prices) and one used to wonder why I need such expensive phones when I can easily afford a cheaper one that serves “the purpose”.

Read More

Leading the world to a sustainable future

By | Blog | No Comments

The US President-elect’s stand on climate change, amongst other things, has been a hot topic of discussion since the election day. As the world fears losing a leader in the fight against climate change when Donald Trump takes charge of the oval office later this month, all eyes are set on China and India to fill this void.

Read More

Power Factor: The silent killer

By | Blog | No Comments

Have you ever looked at your electricity bill and wondered why you are being charged for more than your consumption? This problem is often faced by industrial consumers, who are billed on kVAh supplied instead of kWh consumed. Let us first try to understand what these terms mean and what role does power factor play in your electricity consumption.

Read More

Go Green This Earth Day with Zenatix

By | Blog | No Comments

Climate change is no more a thing of the future, it is no more about making the planet inhabitable for the future generations. It is happening right here, right this moment. Many of us discard the “theory” of climate change pointing towards the extra snowy winters in their towns. A simple explanation to that is that as temperatures rise, more water vapour is held in the atmosphere which leads to more intense rain and snow storms. Duration of cold weather decreases but the intensity can very well increase.

Read More

OpenWRT Rewiring

By | Blog | No Comments

This post is about making an OpenWRT image with the usb dongle support.

We, as a part of our kit that collects and sends data of energy meters over then net required to use routers in the solution along with the raspberry.

We settled on TP-LINK MR3020 with usb dongle support. Now, there is always an issue with usb dongles which cause them to lose connectivity and they go into a hung state which can be resolved by just plugging out an plugging in the dongle back. But in a system that has to be deployed, has to work without manual intervention, that can’t be a solution. So we needed more control over the router, and hence OpenWRT.

OpenWRT has a pretty decent documentation wiki of its own, but it is a little scattered, and this post is intended to describe making of an image with the 3g dongle usage in mind. The steps listed here should work with pretty much any router just by replacing a few words in the command which I will highlight as and when required.

(This is the link to the OpenWRT documentation on how to make a custom image. — http://wiki.openwrt.org/doc/howto/obtain.firmware.generate )

Firstly, check the architecture of your router and download the appropriate image builder from here (go to the folder of your router’s architecture and download the ImageBuilder archive. For TLMR3020, I went to ar71xx)—http://downloads.openwrt.org/barrier_breaker/14.07/

Extract the archive. Go to the extracted folder (for me it was OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64). Configure the package repositories in the repositories.conf file. My repositories file looked like (copied from the OpenWRT wiki)

src/gz barrier_breaker_base http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base
src/gz barrier_breaker_luci http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/luci
src/gz barrier_breaker_management http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/management
src/gz barrier_breaker_oldpackages http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/oldpackages
src/gz barrier_breaker_packages http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/packages
src/gz barrier_breaker_routing http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/routing
src/gz barrier_breaker_telephony http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/telephony
## This is the local package repository, do not remove!
src imagebuilder file:packages

The command to build the image is

make image PROFILE=XXX PACKAGES="pkg1 pkg2 pkg3 -pkg4 -pkg5 -pkg6" FILES=files/

PROFILE

Check the name of profile for your router, most likely it would be the router’s name. For me it was TLMR3020. You can check the list of available profiles by running <make info> command in the extracted folder. The list of profiles available for ar71xx are — http://pastebin.com/WbudpBDJ.

PACKAGES

Following are the packages required for the usb dongle to work and for luci (the web interface. You can exclude it if just ssh access is fine for you)

comgt kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan usb-modeswitch kmod-usb-storage block-mount kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859–1 luci-proto-3g luci

FILES

This is the important part for the image to work out of the box. For wireless and usb dongle to work as soon as you install the image (this is important for those who are update the firmware over remote access, as was the case for me), some files need to be included in the image. The way to include the files is extremely simple. You just make a directory in which you include the files exactly in the same structure as you want them in the router and pass the path of that directory. I included the following files in my directory –

/etc/chatscripts/3g.chat

ABORT BUSY
ABORT ‘NO CARRIER’
ABORT ERROR
REPORT CONNECT
TIMEOUT 10
“” “AT&F”
OK “ATE1"
OK ‘AT+CGDCONT=1,”IP”,”$USE_APN”’
SAY “Calling UMTS/GPRS”
TIMEOUT 30
OK “ATD*99#”
CONNECT ‘ ‘

The second last line might need to be changed according to your ISP.

/etc/config/firewall

config defaults
 option syn_flood 1
 option input ACCEPT
 option output ACCEPT
 option forward REJECT
# Uncomment this line to disable ipv6 rules
# option disable_ipv6 1
config zone
 option name lan
 list network ‘lan’
 option input ACCEPT
 option output ACCEPT
 option forward ACCEPT
config zone
 option name wan
 list network ‘wan’
 list network ‘wan6'
 option input REJECT
 option output ACCEPT
 option forward REJECT
 option masq 1
 option mtu_fix 1
config forwarding
 option src lan
 option dest wan
# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
 option name Allow-DHCP-Renew
 option src wan
 option proto udp
 option dest_port 68
 option target ACCEPT
 option family ipv4
# Allow IPv4 ping
config rule
 option name Allow-Ping
 option src wan
 option proto icmp
 option icmp_type echo-request
 option family ipv4
 option target ACCEPT
# Allow DHCPv6 replies
# see https://dev.openwrt.org/ticket/10381
config rule
 option name Allow-DHCPv6
 option src wan
 option proto udp
 option src_ip fe80::/10
 option src_port 547
 option dest_ip fe80::/10
 option dest_port 546
 option family ipv6
 option target ACCEPT
# Allow essential incoming IPv6 ICMP traffic
config rule
 option name Allow-ICMPv6-Input
 option src wan
 option proto icmp
 list icmp_type echo-request
 list icmp_type echo-reply
 list icmp_type destination-unreachable
 list icmp_type packet-too-big
 list icmp_type time-exceeded
 list icmp_type bad-header
 list icmp_type unknown-header-type
 list icmp_type router-solicitation
 list icmp_type neighbour-solicitation
 list icmp_type router-advertisement
 list icmp_type neighbour-advertisement
 option limit 1000/sec
 option family ipv6
 option target ACCEPT
# Allow essential forwarded IPv6 ICMP traffic
config rule
 option name Allow-ICMPv6-Forward
 option src wan
 option dest *
 option proto icmp
 list icmp_type echo-request
 list icmp_type echo-reply
 list icmp_type destination-unreachable
 list icmp_type packet-too-big
 list icmp_type time-exceeded
 list icmp_type bad-header
 list icmp_type unknown-header-type
 option limit 1000/sec
 option family ipv6
 option target ACCEPT
# include a file with users custom iptables rules
config include
 option path /etc/firewall.user

/etc/config/network

config interface ‘loopback’
 option ifname ‘lo’
 option proto ‘static’
 option ipaddr ‘127.0.0.1'
 option netmask ‘255.0.0.0'
config globals ‘globals’
 option ula_prefix ‘fd66:0dee:5f2c::/48'
config interface ‘lan’
 option force_link ‘1'
 option type ‘bridge’
 option proto ‘static’
 option ipaddr ‘192.168.1.1'
 option netmask ‘255.255.255.0'
 option ip6assign ‘60'
 option _orig_ifname ‘eth0 wlan0'
 option _orig_bridge ‘true’
 option ifname ‘eth0'
config interface ‘wan’
 option _orig_ifname ‘radio0.network1'
 option _orig_bridge ‘false’
 option proto ‘3g’
 option device ‘/dev/ttyUSB0'
 option service ‘gprs_only’
 option apn ‘internet’
config wifi-device ‘radio0'
 option type ‘mac80211'
 option channel ‘11'
 option hwmode ‘11g’
 option path ‘platform/ar933x_wmac’
 option htmode ‘HT20'
 option txpower ‘30'
 option country ‘US’
config wifi-iface
 option device ‘radio0'
 option mode ‘ap’
 option ssid ‘OpenWRT-Wifi’
 option encryption ‘none’
 option wmm ‘0'
 option network ‘lan’

Last three files are just copied from the router once all the options had been configured.

The next 3 files are two fix the dongle reset problem.

What we figured out was that every now and then the dongle got reset and lost its connection which can be solved by plugging out and plugging back the dongle. To emulate this a script is there by name of donglereset which checks if the internet is not working it switches the usb power off and on again after a couple of seconds. This is done by switching off the GPIO pin on the router.This pin might be different for different routers. The current script works for TLMR3020 with pin 8 for usb. The other two files are for initiating the cron and one crontab which runs the cron every 15 minutes.

/root/donglereset

#!/bin/bash
wget -s http://google.com
if [[ $? -eq 0 ]]; then
 echo “Online”
else
 echo “Offline”
 ifdown wan
 # turn off USB power
 echo 0 > /sys/devices/virtual/gpio/gpio8/value
 # let things settle
 sleep 2
 # turn on USB power
 echo 1 > /sys/devices/virtual/gpio/gpio8/value
 # restart the interface
 ifup wan
fi

/etc/crontabs/root

*/15 * * * * ash /root/donglereset

/etc/init.d/S60cron

#!/bin/sh
# start crond
/usr/sbin/crond -c /etc/crontabs

All these files are to be included in a directory files within the extracted folder and with the same directory structure as mentioned.

MAKING IMAGE

Now, run the make image command. For me, it was

sudo make image PROFILE=TLMR3020 PACKAGES=”comgt kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan usb-modeswitch kmod-usb-storage block-mount kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859–1 luci-proto-3g luci” FILES=files/

You now will have the image in bin folder of the extracted folder in the directory name of your architecture. Mine’s name was openwrt-ar71xx-generic-tl-mr3020-v1-squashfs-factory.bin. You can now use upload this image via the firmeware upgrade option in the router.

Reactive Power Compensation- Capacitor Panel

By | Blog | No Comments

Power factor improvement has always been a crucial area of concern for all industrial plants and big office spaces incurring large electricity cost. According to government norms, these type of consumers are to be supplied through HT line and billed on KVAh instead of Kwh. Where Kwh means total active energy delivered and KVAh is vector sum of both active and reactive energy. Supply at HT line of 11kv or 33kv has increased the effects of low power factor on the billing amount of the users.[1] Although capacitor banks are already installed at every facility for power factor correction, confusion still remains about the ideal point of sensing and correction to minimize the overall losses.
To get the ideal point of compensation, we need to analyze the ways in which low power factor affects the total electricity cost.

Type of losses due to low Power Factor-

For all the users which are being supplied at HT, low power factor affects the billing by two ways. One component is the difference of KVAh and Kwh, which accounts for direct per unit billing and the other is of the copper losses in the transmission and distribution losses due to the extra current.

  • Direct losses-

    Considering the example data to quantify this type of losses. For a 1000KVA connection (contract demand), if the user is consuming a constant load of 800kw at 0.9 power factor on day1 and at 0.95 on day2.

        For day1- Energy consumed= (800/0.9)*24= 21333KVAh

        For day2- Energy consumed= (800/0.95)*24= 20210KVAh
This shows an additional 1123 units in one day for which the consumer will be charged for a power factor of 0.9 as compared with 0.95.

  • Copper losses –

    Considering the same situation as for direct losses, current flowing in the conductors will be higher on day1; when the power factor is low. So there will be additional heating losses in the conductors for both transmission and distribution side. As the current on HT lines are low as compare to LT, this type of losses are very less on HT conductors. But on LT line, as the voltage is 430V, current flowing will be-

        For day1- ((800/0.9)*1000)/430= 1192 amperes

        For day2- ((800/0.95)*1000)/430=1130 amperes
Copper losses are directly proportional to square of current and resistance of the conductors. As cables used for distribution are generally 4 core copper armored cables and they are of different sizes according to load distribution and have different resistances.

For a rough estimation, consider the conductor resistance as 0.19 ohm/km (based on data in Table.1) and length of conductor as 200meter for distribution. Copper losses will be-

        For day1- ((1192)^2*(0.19/5))/1000= 54kw; for 24 hours- 54*24=1296kwh

        For day2- ((1130)^2*(0.19/5))/1000=48kw; for 24 hour- 48*24=1152kwh

This indicates the additional loss of 144 units in one day.

Check the chart below as reference for cable resistance.[2]

tumblr_inline_nol6mzWRlI1shjvod_400

Ideal Point of correction-

The decision about the point of capacitor connection and APFC relay sensing is to be decided while keeping in mind the utility’s billing design and copper losses in the power cables. Along with cables, reactive current flowing in transformer decreases its efficiency and results in poor voltage regulation. [3]

Different approaches to the problem are presented below, along with their benefits and shortcomings.

tumblr_inline_nol6nqv1hW1shjvod_500

CASE1: Capacitor Bank and APFC connected at Point B-

Refer to figure.1 and consider line-1 and line-2 connected under this condition, the power factor on the distribution is low (without compensation) but it is corrected at the HT panel, there will be no penalty from the utility but the copper losses in the distribution will be high. In this situation, there will be reactive current flowing in the transformer as well, reducing its efficiency and operational life. As the sensing of APFC is at point-B, control on the power factor of point B will be better.

CASE2: Capacitor Bank and APFC connected at Point A-

Consider Line-3 and Line-4 as connecting lines in fig.1, in this case the relay and capacitor arrangement will increase the power factor at point A. Consider PF to be 0.99 at point A. But in this condition relay has no data about the power factor at point A, it is the point at which utility will bill the consumer. It will fall below set point due the inductive nature of transformer and the power cables. Thus this arrangement will reduce the copper losses at distribution but relay will have poor control over the power factor at which utility is billing.

CASE3: Capacitor Bank at point A and APFC relay at Point B-

Consider line-2 and line-3 connected, as the APFC is connected at point B and Capacitor at point A, relay will always sense the power factor at HT meter. Under this situation, power factor of the distribution side is high and capacitor switching is governed by the power factor at HT meter. Thus, this arrangement gives the high PF at distribution side and also better control over the PF at HT meter and is considered as the ideal situation of working.

Refer to the table below for further clarity of all three cases with sample data.

tumblr_inline_nol6pfx0PQ1shjvod_500

Sizing of Capacitor Banks-

For attaining proper control over the power factor through APFC, capacitor banks are to be sized properly otherwise frequent switching of power contactors will damage the capacitor and power feeder as well.

For illustration, consider a distribution circuit where 250KVAr of reactive power is required and the capacitor banks are of 50KVAr each. If this arrangement will put on AUTO mode of APFC control, relay will switch ON 5 Capacitor Banks and power factor will be close to unity but it will not be able to respond to small changes in KVAr demand. If the KVAr demand is shifted from 250 to 225, relay will not be able to maintain a unity PF. To maintain a power factor close to unity, rating of different capacitor banks is dependent upon the analysis on reactive power requirement. Based on demand analysis, this compensation requirement should be divided into the fixed and variable parts. For a production plant, minimum load and thus minimum KVAr load can be calculated. And the remaining KVAr is to be compensated based on variable requirement. Consider the similar situation of 250KVAr requirement; calculation for minimum reactive power requirement can be done based on stored data for months. Let’s assume that the minimum requirement comes out to be 150KVAr; that means single capacitor bank of 150 rating is to be used. Along with this, rest of the demand is to be compensated in steps. Thus, ideal compensation should have one 150KVAr, 3*25KVAr capacitors and 3*10 capacitors. As one APFC relay can control the switching of up to 12 capacitor banks, all the arrangement can be controlled by one relay. (Other than this, APFC relay are available for 3, 5, 7 and 8 capacitor control too. [4] ) In this distribution scheme, relay will sense the change in reactive compensation and switch ON/OFF the capacitor bank which gives the best result.

By the analysis of the data collected by Zenatix’s software, we help clients to figure out the ideal number of Capacitor Banks and their sizes at different points of distribution network. Other than the size of capacitor bank, optimum number of APFC relay required and number of capacitor banks to be controlled by it can be determined by the same data.

Figure and Table Detail-

Fig.1-Power distribution scheme of a consumer with HT incomer along with capacitor banks

Table.1-Resistance of 4 core armored copper cables with their specific current rating

Table-2-Pros and cons of different power factor improvement schemes

References-

1 Schedule of Tariff for – H.T. Industrial And Steel Furnace Power Supply by DHBVN.

2 http://www.pagodacables.com/TECHNICAL-1554.pdf

3 larsentoubro..electrical-automation…