dynamic system simulation. charging capacitor the capacitor is initially uncharged there is no...

27
Dynamic system simulation

Upload: jonathan-turner

Post on 23-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Dynamic system simulation

Page 2: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Charging Capacitor• The capacitor is initially uncharged• There is no current while switch S is open (Fig.b)• If the switch is closed at t= 0 (Fig.c) the

charge begins to flow, setting up a current in the circuit, and the capacitor begins to charge

• Note that during charging, charges do not jump across the capacitor plates because the gap between the plates represents an open circuit

• The charge is transferred between each plate and its connecting wire due to E by the battery

• As the plates become charged, the potential difference across the capacitor increases

• Once the maximum charged is reached, the current in the circuit is zero

Page 3: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Charging Capacitor (2)• Apply Kirchhoff’s loop rule to the

circuit after the switch is closed

• Note that q and I are instantaneous values that depend on time

• At the instant the switch is closed (t = 0) the charge on the capacitor is zero. The initial current

• At this time, the potential difference from the battery terminals appears entirely across the resistor

• When the charge of capacitor is maximum Q, The charge stop flowing and the current stop flowing as well. The V battery appears entirely across the capacitor

Page 4: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Charging Capacitor (3)

• The current is , substitute to voltage equation

• The equation is called Ordinary Differential Equation (ODE)

• How to solve this equation? Solve mean we can express the equation into q(t)=….

Page 5: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Solution of ODE

• Using Deterministic Approach• Using Numerical approach:

1. Euler’s method2. Heun’s method3. Predictor-corrector method4. Runge-kutta method5. Etc.

Page 6: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Deterministic Approach

• The current is , substitute to voltage equation

• Integrating this expression

• we can write this expression as

Page 7: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Deterministic Approach

• If you integrate to obtain the solution, then you use exact/deterministic method.

• However in practical use, we often cannot integrate the function directly.

• The numerical approach is often preferable.

Page 8: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Numerical approach

Page 9: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Numerical approach (2)

Page 10: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Numerical approach (3)

Page 11: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Solution in Matlab

• Using ODE solver (m-file)• Using Simulink

Page 12: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is
Page 13: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is
Page 14: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is
Page 15: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

State space of charging capacitor

( ) 1 1( )

( ) [1] ( ) [0]

dq tq t x Ax Bu

dt RC R

q t q t y Cx Du

Page 16: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

State space in practical use

• In practical use, the A matrix consists of many states space

• Simulating the power system is just solving the differential equation of system states and (sometimes) algebraic equation related to load flow .

• Normally we use states space in power system simulation such as rotor speed, rotor angle, Flux-linkage change, etc.

( )x t

Page 17: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

State space in practical use (2)• Example: state space of synchronous generator with PSS

x Ax

Page 18: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Order greater than 1 (n>1)

• Suppose second order (n=2) equation

• We need to write second order equation into n order first order differential equation

• These equations can be solved simultaneously• Homework 1: how to solve this equation for

a=b=c=1 using Matlab (use function: ode45)? With all initial states are zero

Page 19: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Transformer Simulation

• Equivalent circuit

Page 20: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Transformer Simulation (2)

• Voltage Equation

• The flux linkage per second

• Mutual flux linkage

Page 21: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Transformer Simulation (3)

• The current can be expressed as

• Eqn. 4.29 is now

• Collecting mutual flux linkage

Page 22: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Transformer Simulation (4)

• Define

• Eqn 4.33 can be expressed as

Page 23: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Transformer Simulation (5)

• The flux linkage in integral form

Page 24: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Transformer Simulation (6)

Page 25: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Implementation in Simulink

Homework 2: Build this block in Simulink with all initial values of flux linkage are zero

Page 26: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

Rules for student

• Maksimal terlambat 20 min• Tidak boleh titip absen• Tidak boleh menggunakan barang elektronik

kec berhubungan dengan kegiatan perkuliahan

Page 27: Dynamic system simulation. Charging Capacitor The capacitor is initially uncharged There is no current while switch S is open (Fig.b) If the switch is

• All materials are posted at http://husniroisali.staff.ugm.ac.id/