Pages

Thursday, February 25, 2016

json

 private static String convertInputStreamToString(InputStream inputStream) throws IOException{
       BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream));
       String line = "";
       String result = "";
       while((line = bufferedReader.readLine()) != null)
           result += line;

       inputStream.close();
   
     
       return result;

   }


public static String fetchGetResponseFromServer(String url){
       InputStream inputStream = null;
       String result = "";
       try {

           // create HttpClient
           HttpClient httpclient = new DefaultHttpClient();

           // make GET request to the given URL
           HttpResponse httpResponse = httpclient.execute(new HttpGet(url));

           // receive response as inputStream
           inputStream = httpResponse.getEntity().getContent();

           // convert inputstream to string
           if(inputStream != null)
               result = convertInputStreamToString(inputStream);
           else
               result = "Did not work!";

       } catch (Exception e) {
           Log.d("InputStream", e.getLocalizedMessage());
       }

       return result;
   }





private class HttpAsyncTask extends AsyncTask {




@Override
protected String doInBackground(String... urls) {
// TODO Auto-generated method stub

String ret =  fetchGetResponseFromServer(urls[0]);

ret= ret.substring(15,ret.length()-1);
httpResult = ret;
return ret;

}

}


to call
 new HttpAsyncTask().execute("url");

tools:listitem="@layout/list_item"

Tuesday, March 8, 2011

ListView in android

Listadapter
@Override
public int getCount() {
// TODO Auto-generated method stub
return lists.size();
}

@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return lists.get(position);
}

@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {

ListItems listItems = lists.get(position);
LayoutInflater layoutInflater= LayoutInflater.from(context);
if(convertView == null){
convertView = layoutInflater.inflate(R.layout.listitem, null);
}

TextView textView =(TextView)convertView.findViewById(R.id.textView1);
textView.setText(listItems.getName());

return convertView;
}

}

ListActivity

list = new ArrayList..ListItems...();

for(int i=0;i<=50;i++){
ListItems listItems= new ListItems();
listItems.setName("justin"+i);
list.add(listItems);
}

ListAdapter listAdapter = new ListAdapter(list, ListActivity.this);
ListView listView= (ListView)findViewById(R.id.listView1);
listView.setAdapter(listAdapter);



}


Tuesday, August 17, 2010

advanced power system protection


Justin kj
Mail:justinkj1@yahoo.com
Mobile:9688407066




“Advanced power system proctection”

















Abstract :
The integration of distributed sources into existing networks brings up several technical, economical and regulatory questions. In terms of physical integration, protection is one of the major issues. Therefore new protection schemes for both distributed generators (DG) and utility distribution networks have been developed in the recent years, but there are still open questions. This document is the result of a literature study and intends to give an overview of issues and current state concerning protection of DG. The 1rst section gives a basic introduction to distributed generation and power system protection. In section 2 protection issues concerning DG are outlined,
then the current practice is described in section 3. In section 4 some new
approaches in this field are reported and finally section 5 concludes with an
outlook.






Contents :

List of Acronyms
1. Introduction
1.1 Distributed Generation
1.2 Power System Protection
1.3. Transformers
1.4 Interconnection System
2 Protection Issues with DG
2.1 Short Circuit Power and Fault Current Level
2.2Reverse Power Flow and Voltage Profile
2.3 Islanding and Auto Reclosure
2.4 Other Issues
2.4.1 Ferroresonance
2.4.2 Grounding
3. New Approaches
3.1 Synchronized Phasor Measurement
4. Conclusion and Future Work
5.References








List of Acronyms
AC Alternating Current
AEPS Area Electric Power System
AM Asynchronous Machine
APS Adaptive Protection System
CHP Combined Heat and Power
DC Direct Current
DER Distributed Energy Ressource
DG Distributed, Decentralized, or Dispersed Generation
EG Embedded Generation
GPS Global Positioning System
HV High Voltage
IED Intelligent Electronic Device
IM Induction Machine
LOE Loss Of Earth
LOG Loss Of Grid
LOM Loss Of Mains
LV Low Voltage
MV Medium Voltage
NDZ Non-Detection Zone
PCC Point of Common Coupling
PFC Power Factor Correction
PMU Phasor Measurement Unit
PV PhotoVoltaics
ROCOF Rate Of Change Of Frequency
SCADA Supervisory Control And Data Acquisition
SM Synchronous Machine
SPS Special Protection Schemes
UI Universal Interconnection
VVS Voltage Vector Shift



1 Introduction

1.1 Distributed Generation
Distributed, dispersed, decentralized or embedded generation (DG, EG) are keywords for an upcoming probable paradigm shift in electric power generation.1 As mentioned in [1], there is no standing international definition for
these terms, but there are a number of legal definitions in several countries. A proposal for a definition of distributed generation is given in [4]. However, many distributed power sources have some characteristics in common:
*Their rating is small compared to conventional power plants,
*they are often privately owned,
* they are not centrally dispatched,
* they are connected to MV or LV distribution networks,
* they do not contribute to frequency or voltage control,
*and usually they were not considered when the local grid was planed.
Hence, there are infrastructural needs as, for example, means of communication. Two major reasons for an increased utilization of DG are liberalized markets which are now opened for various kinds of participants, and the global trend of reducing greenhouse gas emissions, which leads to more renewable, CO2-neutral sources which are normally small-scaled. Further reasons are
discussed in [1] and others. Besides a number of benefits, there are some technical, economical and regulatory issues with DG. In terms of market regulation, licensing, government aid and privacy are typical concerns. Economical considerations display a possible cost increase not only for generation but also for transmission and distribution. Finally, there is the technical point of view, and protection turned out to be one of the most problematical technical issues since its malfunction could cause serious risk for people and components.


1.2 Power System Protection
The primary purpose of power system protection is to ensure safe operation of power systems, thus to care for the safety of people, personnel and equipment. Furthermore, the task is to minimize the impact of unavoidable faults in the system from an electrical point of view, dangerous situations can occur from over currents and over voltages. For example, an asynchronous coupling of networks results in high currents. Earth faults can cause high touch voltages and therefore endanger people.
The general problem is always voltage and/or current out of limit. Hence, the aim is to avoid overcurrents and overvoltages to guarantee secure operation of power systems. For the safety of the components it is also necessary to regard device-specific concerns, for example oil temperature in transformers, gas pressure in gas insulated components etc. These points are not directly related to electrical values, but, as mentioned, they always come from or lead to unallowed high voltages or currents. Another issue is mechanical stress. Whenever power is converted electromechanically, one has to consider not only the electrical but also the mechanical equipment. An example is mechanical resonance of steam turbines due to underfrequency. Nowadays, electromechanical protection devices are replaced by microprocessor based relays with a number of integrated features. Currents and voltages are suitably transformed and isolated from the line quantities by instrument transformers and converted into digital form.

1.3 Transformers
Whenever machines or inverters are connected to networks of different nominal voltage, transformers are needed. The high voltage winding of the transformer is usually used to meet the grounding requirements of the utility.
Delta-wyes configurations are commonly installed for isolated generators. Interms of protection, the transformer connection is important since the zero sequence impedance depends very much on the winding type (delta/wye)
and also on the earth connection

1.4. Interconnection System
The commercial status of interconnection equipment (list of manufacturers, cost and pricing, etc.) is outlined. Interconnection systems are defined as "the means by which the DER unit
electrically connects to the outside electrical power system and provides protection, monitoring, control, metering and dispatch of the DER unit," where DER are Distributed Energy Resources .

2. Protection Issues with DG
The overall problem when integrating DG in existing networks is that distribution systems are planned as passive networks, carrying the power unidirectionally from the central generation (HV level) downstream to the loads
at MV/LV level. The protection system design in common MV and LV distribution networks is determined by a passive paradigm, i.e. no generation is expected in the network .With distributed sources, the networks get active and conventional protection turns out to be unsuitable. The following sections will outline the most important issues.


2.1. Short Circuit Power and Fault Current Level
The fault current level describes the effect of faults in terms of current or power. It gives an indication of the short circuit current or (apparent) power boost .whereas it is the fault current related to the nominal current and is
the inner impedance of the Thevenin representation of the network input current. This is, phase-phase or phase-earth faults normaly result in an overcurrent which is significantly higher than the operational or nominal current.
This is a very basic precondition for the function of (instantaneous) overcurrent protection. The fault current has to be distinguishable from the normal operational current.
Figure2: Short circuit at a. Current from transmission network current
from embedded generator voltages may occur even if the current is low. Furthermore
permanent faults may spread out and destroy more equipment. With DG in the network, the fault impedance zth can also decrease due to parallel circuits, therefore the fault level increases and there could be unexpected high fault currents in case of a failure. This situation puts components at risk since they were not designed to operate under that circumstances. For correct operation it is also important that the relay measures the real fault current which was expected and taken under consideration when the relay was configured. Figure 2shows a distribution feeder with an embedded generator that supplies part of the local loads. Assuming a short circuit at point a, the generator will also contribute to the total fault current

The phenomena of reduced reach of distance relays due to embedded power infeed is mentioned in and other references. In this problem is considered for conventional power systems. The reach of an impedance relay is the maximum fault distance that triggers the relay in a certain impedance zone, or in a certain time due to its configuration. This maximum distance corresponds to a maximum fault impedance or a minimum fault current that is detected.
2.2. Reverse Power Flow and Voltage Profile
Radial distribution networks are usually designed for unidirectional power flow, from the infeed downstream to the loads. This assumption is related in standard protection schemes with directional overcurrent relays. With a generator on the distribution feeder, the load flow situation may change. If the local production exceeds the local consumption, power flow changes its direction. Reverse power flow is problematic if it is not considered in the protection system design. Moreover, reverse power flow implies a reverse voltage gradient along a radial feeder.
Load currents are neglected for this consideration.













Dispersed generation always affects the voltage profile along a distribution line. Beside power quality issues, this could cause a violation of voltage limits and cause additional voltage stress for the equipment.

2.3 Islanding and Auto Reclosure
Critical situations can occur if a part of the utility network is islanded and an integrated DG unit is connected. This situation is commonly referred to as Loss Of Mains (LOM) or Loss Of Grid (LOG). When LOM occurs,
neither the voltage nor the frequency are controlled by the utility supply. Normally, islanding is the consequence of a fault in the network. If an embedded generator continues its operation after the utility supply was disconnected, faults may not clear since the arc is still charged. Small embedded generators (or grid interfaces respectively) are often
not equipped with voltage control, therefore the voltage magnitude of an islanded network is not kept between desired limits, and undefined voltage magnitudes may occur during island operation.
Another result of missing control might be frequency instability. Since real systems are never balanced exactly, the frequency will change due to active power unbalance. Uncontrolled frequency represents a high risk for
machines and drives. Since arc faults normally clear after a short interruption of the supply, automatic (instantaneous) reclosure is a common relay feature. With a continuously operating generator in the network, two problems may arise when the utility network is automatically reconnected after a short interruption:
² The fault may not have cleared since the arc was fed from the DG unit, therefore instantaneous reclosure may not succeed.


2.4. Other Issues
Besides the issues mentioned in the previous sections, there are some other problems concerning the integration of DG. These issues are already known from experience with conventional power systems.



2.4.1. Ferroresonance
The ferroresonance can occur and damage customer equipment or transformers. For cable lines, where faults are normally permanent, fast-blowing fuses are used as overcurrent protection. Since the fuses in the three phases do not trigger simultaneously, it may happen that a transformer is connected only via two phases for a short time. Then, the capacitance of the cable is in series with the transformer inductance what could cause disorted/high voltages and currents due to resonance conditions.






2.4.2. Grounding
It is possible grounding problems due to multiple ground current paths are mentioned. If a DG unit is connected via a grounded delta-wyes transformer, earth faults on the utility line will cause ground currents
in both directions, from the fault to the utility transformer as well as to the DG transformer. This is normaly not considered in the distribution system ground fault coordination.
3. New Approaches

3.0. advanced power system proctection
(diagram)
Adaptive protection In the above circuit diagram we can see the highly ground proctective system. The whole three inputs are individually protected by advanced grounding.


3.1. Adaptive Protection Systems
Adaptive protection is as "an online activity that modifies the preferred protective response to a change in system conditions or requirements. It is usually automatic, but can include timely human intervention" .An
adaptive relay is "a relay that can have its settings, characteristics or logic
functions changed online in a timely manner by means of externally generated signals or control action" .
In other words, adaptive protection systems are systems which allow to change relay characteristics/settings due to the actual system state. For example, the primary zone pickup value of a distance relay can be changed online according to power infeed from a T-connected generator (see section There are several adaptive techniques proposed in which use online information of the system to optimise the protection system function.
Some examples are:
² Adaptive system impedance modeling (an up-to-date impedance model
of the network that provides input data for a relay)
² Adaptive sequential instantaneous tripping (for faults near the remote
station)
² Adaptive multi-terminal distance relay coverage (regarding infeed from
T-connections in the relay settings)
² Adaptive reclosure (prevent unsuccessful reclosure for permanent faults,
high-speed reclosure in case of false trips).
it is proposed to use real-time synchronized phasor measurements of bus voltages and line currents as a source of information for adaptive relays. A feasibility study for adaptive protection of a part of a real distribution system is demonstrated in .The paper shows the basic requirements for implementing adaptive relaying concepts:
1. Microprocessor-based relays
2. Appropriate software for relay modelling, relay coordination and communication
3. Appropriate means of communication
A relay coordination software model as shown in figure is introduced which makes real time changes of relay configurations possible. It is assumed to be a function of certain relay parameters which are results
of the optimization. After a change in the network, the optimization was executed and relay settings have been updated with the optimal parameters.
The algorithm was successfully applied to the IEEE 30-bus test system.


4. Conclusion and Future Work
Much literature is available concerning protection of distributed generation. Many publications demonstrate the same problems and issues, but solutions are rare. A general approach is still missing, but rest steps are visible . it is discussed that the numerical relations of typical values such as line impedances, generator ratings etc. are equal in different networks (HV, MV, LV) if per-unit values are considered. The scaled system aspects min terms of powerflow are almost the same for small-scaled distributed generation and for large-scaled centralized plants. This point indicates once more that the key issues concerning integration of DG are related to infrastructural items such as data acquisition, operation, protection and control. Adequate infrastructure, as it is commonly installed in HV transmission
networks and conventional, centralized power plants, is missing. From the authors' point of view, there are three key issues to solve:
1. Information: Integrating DG into existing distribution networks is an issue because data acquisition systems are not available. The installation of an information system such as as the Supervisory Control And Data Acquisition (SCADA) system (usually installed in transmission systems) would help to solve many problems. The internet is already easily accessible, therefore it could be a great chance to utilize it for the purpose of power system operation .
2. Coordination: Proper coordination is a fundamental requirement for satisfying operation of protective relays. System studies and analysis have to be performed case-by-case to properly coordinate the protection settings. Software could be implemented that offers special coordination features for the integration of DG in distribution systems.
3. Adaptation: As mentioned in , the implementation of adaptive protection is a challenging task since information which is normally not available in distribution networks is needed to update the relay settings. Visions, future trends and expected developments in the field of electric power delivery are presented .The general view is that distributed generation is expected to play an important role in future energy systems.Future work could be related to the points discussed in the previous paragraphs, whereas three major questions arise:
² How should future distribution systems be designed to simplify integration of DG (towards a plug-and-play system)?
² How can islanded parts of distribution systems be operated and resynchronized?
² How can DG be dispatched centrally (if wanted), and what data in-frastructure is needed to achieve this?






5.References
[1] N. Jenkins et al. Embedded generation. IEE, 2000. ISBN 0-85296-774-8.
[2] G. Koeppel. Distributed generation. Literature and current state re-
view, Swiss Federal Institute of Technology Zurich, EEH - Power Sys-
tems Laboratory, 2003.
[3] N. Jenkins. Embedded generation. Power Engineering Journal,
9(3):145{150, 1995.
[4] T. Ackermann, G. Andersson, and L. Soder. Distributed generation: a
de¯nition. Electric Power Systems Research, 57(3):195{204, 2001.
[5] W.J.S. Rogers. Impact of embedded generation on design, operation
and protection of distribution networks. IEE Colloquium on the Im-
pact of Embedded Generation on Distribution Networks (Digest No.
1996/194), pages 3/1{3/7, 1996.