Sie sind auf Seite 1von 12

Worksheet 1 Introduction to PSCAD

Software required: PSCAD/EMTDC version 4.0.1 student edition

In this worksheet you will be introduced to the principles behind timestepping simulation programmes for circuits, and will be shown how the PSCAD/EMTDC programme works. You will also work through the initial online help for PSCAD/EMTDC. Be warned, since you are in this first stages of learning to use a new simulation programme, this worksheet involves a lot of reading though part of this exercise requires you to work through an online tutorial.

Learning Outcomes:
After completing this worksheet you should be able to 1 Discuss the general principles used by time-stepping circuit simulation software packages 2 Discuss the principles used by PSCAD/EMTDC to model circuit elements. 3 Distinguish between electrical signal, mechanical signal and control signal wires. 4 Be able to model basic circuits in PSCAD and choose time and print steps.

1.1 Time stepping simulation

We perform time-stepping simulations to examine signals that are a function of time. Examples include how the speed of a motor changes with time, or how the voltage at a point in a circuit changes with time. In real life such signals are analogue and continuous. In a computer simulation we need to model such signals. There are different ways of doing this, but one common way is to approximate our continuous analogue signal with one which is evaluated only at discrete time steps, fig 1.1. This has the advantage that the Mike Barnes Page 1 30/11/2007

computer has to only evaluate the signal at these time steps, and allows us to make use of a number of numerical routines for evaluating the mathematical functions which are used. The computer results are an approximation to the actual behaviour, but if the time steps are sufficiently small, the approximation is usually sufficiently good.

Fig. 1.1 Discrete approximation to continuous time signal We have a whole set of formulas for numerical analysis for this type of problem, known as Newton-Cotes rules. Two of the most basic are the rectangle rule (shown in fig. 1.1 main picture and top right) and the trapezoid rule (shown in fig. 1.1 bottom right).

The rectangle rule essentially assumes that over a small interval, from t4 to t5 in figure 1.1 say, the value of the signal can be approximated by the analogue signal value at the mid-point of the interval. The trapezoid rule assumes that a good approximation is given by a straight line function from the value at the start of the interval, to the value at the end of the interval. More complex numerical methods exist such as Simpsons rule, Simpsons 3/8 rule and Booles rule. However the trapezoid rule works well for periodic signals with a number of reasonably space time intervals within the period.

Mike Barnes

Page 2



All computer programmes which try and model real-world objects as a function of time have the same problem: how to represent these objects in a simple format that the computer can process. The general principle used is to model a real world system using differential equations and then manipulate these equations into a format that can be solved using numerical methods.

Fig 1.2 Simple RLC series circuit Most complex circuit elements can be represented by differential equations. In electrical systems the simple circuit in figure 1.2 would have the equation:


di 1 idt + iR + L C dt

This relates current and voltage. The current equation is second order, since it has both integral and differential terms. We could rewrite this in the form:

y = K I xdt + xK P + K D
where y=v, x=i, KI=1/C, KP=R and KD=L.

dx dt

Fig 1.3 Electric motor and pulley system

Mike Barnes

Page 3


Mechanical systems have similar equations. Consider the torque T applied by the electric motor in figure 1.3 to lift a mass against gravity g.

T mgr = k dt + B + J

d dt

This is also a second order equation and can be written in the form:

y = K I xdt + xK P + K D
where y=T-mgr, x=, KI=k, KP=B and KD=J.

dx dt

We could go one step further and model the behaviour of the mechanical system by an equivalent electrical system, figure 1.4.

Fig 1.4 Electrical equivalent of mechanical system

Circuit simulation packages use this powerful method of representing systems. The user draws the system in a Computer Aided Design (CAD) package. The CAD package, in this case Power Systems CAD (PSCAD), translates these drawings into differential equations. These equations are then passed to a solver package such as EMTDC (Electromagnetic Transients including DC) which represents and solves the differential equations as a function of time.

These results are then passed back to the CAD package which usually has a variety of tools for representing the results in an easy to use format.

Mike Barnes

Page 4


Fig 1.5 Dommel equivalent circuit elements used in EMTDC EMTDC does not solve the differential equations directly. Instead it uses the Dommel method [1] to simplify the equations. Inductor type elements and capacitor type elements are both replaced by current source and resistor elements, figure 1.5. The current between nodes k and m in the present timestep ikm(t) is a function of current in the previous time-step ikm(t-t), a resistor value R and the voltages at nodes k and m in the previous time step ek(t-t) and em(t-t). The equation used is:

ikm (t ) = ikm (t t ) +

ek (t t ) em (t t ) R

Where R is the value shown in figure 1.5. A lumped resistive element is modelled as a resistance only.

The more eagle-eyed among you will have noticed that in effect this method is a way of using the trapezoidal rule to simplify the differential equations so that they can be solved by a time-stepping algorithm. The trapezoidal rule represents the differential equations as an approximation to their actual true value. This approximation is only true for small changes. This means it is very

1. H. W. Dommel, Digital Computer Solution of Electromagnetic Transients in Single and Multiphase Networks, IEEE Transactions on Power Apparatus and Systems, vol. 88, no. 4, April 1969, pp. 388-399.

Mike Barnes

Page 5


important to choose a sufficiently small step size to enable the approximation used to remain valid.

1.3 Signal Wire Types

A typical transient simulation package will have a number of different elements. Mechanical parts, electrical parts and control signals can all be modelled. Typically, wires connect different model parts.

Fig 1.6 RC Circuit Electrical parts, for example the capacitor and resistor in figure 1.6, will be connected by wires. The top wire is at a potential or voltage v1. The wire carries a current i out of the resistor and into the capacitor. Likewise the lower wire is at some other voltage v2 but also carries a current. The electrical wire will therefore be carrying two pieces of information: a current and a voltage. A common requirement of electrical parts of circuits is that one wire is defined as zero volts. In PSCAD this is achieved by attaching the ground symbol to one wire. If two different wires have a ground symbol connected to them, these wires are assumed to both be at zero volts and connected together.

Electrical wires that are connected together form an electrical node. Electrical nodes have an additional important value in PSCAD, in that the student version of PSCAD/EMTDC which doesnt require a licence file, is limited to 15 electrical nodes. The Educational version on the Universitys

Mike Barnes

Page 6


PCs doesnt have this electrical node limit but has exactly the same capabilities otherwise.

Fig. 1.7 Simple system containing electrical and control wires Another important part of a simulation system is the control. In the real-world this may be accomplished by analogue circuits or software in a microprocessor. In a simulation programme, this is typically accomplished by control function blocks. In figure 1.7 a simple circuit is shown. The instantaneous current in the wire is measured, some signal processing is undertaken to find the rms current, and this current is compared with a reference value (i*). If the measured rms current is greater than the reference current, the switch is opened. The output of the comparator sends a digital signal which controls the switch. A latch holds the switch off, until the set signal reactivates the switch. There are a few keys points here: 1. Control wires (called data wires in PSCAD) have only one value 2. Control values can be analogue (e.g. 1.05) or digital (1 or 0, on or off). 3. Signal types must be kept separate. Control (data) wires cannot be connected to other types of wires. Analogue data wires shouldnt be connected directly to digital data wires. In figure 1.7 conversion blocks are used. A measurement block (transducer) is used to interface the electrical wire to the control (data) wire. A comparator block is used to interface the analogue data wires to the digital data wire. A switch block (actuator) is used to interface the digital data signal to the electrical wire.

Mike Barnes

Page 7


4. Control (data) wires have a from and a to. Data flows from the rms block to the comparator input in figure 1.7 for example.

Mechanical parts, are treated by different simulation programmes in different ways. PSCAD/EMTDC treats mechanical blocks as control blocks. Speed is one control signal, torque is another. So a motor would be connected to a load by two wires: a torque wire sending a signal from the motor to the load and a speed wire sending a signal from the load to the motor. Other programmes (e.g. SABER) treat mechanical systems like electrical systems, i.e. a motor would be connected to the load by one wire which has both speed and torque properties.

1.4 Starting with PSCAD/EMTDC When you first start PSCAD, a window similar to figure 1.8 will appear. Main Menu

Fig. 1.8 PSCAD main window

Mike Barnes

Page 8


Click on Help on the main menu at the top of the screen. Select the menu item Table of contents. You now have access to the online programme help. In future Help | Table of contents will be used to mean the sub-menu item Table of contents within the Help menu. If it is not already selected, select the Contents tab on the left hand side. Select the PSCAD menu item by clicking on the square box to the left of PSCAD so that the plus in the box becomes a minus. Your screen should now look like figure 1.9

Figure 1.9 PSCAD Help window Tasks 1. Open the sub-menu The PSCAD Environment. Read through all the items of the sub-menu. Work through the Tutorial: my first simulation. Note if you click on any underlined blue text, you will get more information on that subject. At this stage you may want to skip some of the detail - not all of the sections are immediately helpful to the first time user. However as you progress it is worth going back and looking over these sections again for this detailed information.

Mike Barnes

Page 9


2. Read through PSCAD | Basic Features and Operations in the help menu. Again, at this stage you may want to skip some of the detail but it is worth reading through the detail later. However please pay attention to the Projects | View Errors and Warnings section. Work through the tutorial Creating a new Project and save your project. Note: in the electrical palette on the right hand side of the PSCAD window, electrical nodes are the solid dots, data nodes are circles.

3. Load your saved voltage divider from the previous step. Run the project and look at the results. Bring up the project settings window (look in the PSCAD contents Basic Features and Operations | Projects | Editing Project Settings if you need help). At the moment you are plotting the results on to the output graph every 1000s. Change the plot step to 10000s. The output traces should now look different. Why? (Answer at end of worksheet)

Change the plot step back to 3000s and change the time step to 3000s. Again do you notice a difference? (Answer at end of worksheet)

4. Read through PSCAD | Online Plotting and Control. Again, at this stage you may want to skip some of the detail but it is worth reading through the detail later.

Mike Barnes

Page 10


Quiz: Select the appropriate answer(s) from this self-test quiz. 1. PSCAD/EMTDC models electrical circuits using differential equations simplified using the trapezoidal rule (TRUE/FALSE). 2. If the time-step used is large in PSCAD/EMTDC a. The programme runs more quickly b. Results will be inaccurate c. The PC memory storage used will be decreased 3. Mechanical connection wires a. Do not exist in PSCAD/EMTDC it is an electrical package only b. Should not be connected to electrical wires c. Carry inertia and speed information

Mike Barnes

Page 11


Answers: Task 3 The plot step sets how often results from the simulation are displayed on the output graph. If the plot step is too large, the data output becomes distorted. If the plot step is very small, you save a lot of data, use a lot of hard-disk space on your computer, and slow the simulation down.

The time step sets the size of time step the simulation takes. If it is too large (i.e. 3000s in this case) you distort your results. If the time step is too small, your simulation takes a long time to run, since the programme has to solve the circuit values for every time step. As a rule of thumb your time step should be at least 10 times smaller (and ideally 100 times smaller) than the period of the fastest event in your simulation or the shortest time constant in your control. In our simulation the fastest thing is the 60Hz ac source with a period of 16.7ms, our time step should be an absolute maximum of 1.6ms (1600s).

Quiz 1. True 2. a and c ( b is wrong because results may be inaccurate) 3. a

Mike Barnes

Page 12