# HW5 - % % Assignment 5 % Runge Kutta Integration % Modified...

This preview shows pages 1–2. Sign up to view the full content.

% Assignment 5 % Runge Kutta Integration % Modified from Grainger problems 16.11 % clear; disp('Solution for first case - Hit any key to continue') disp(' ') % Some useful constants DegToRad=pi/180; D % % % Problem parameters H=5; fs=60; % Initialize variables Pm=0.7; Pe_pre=1.0; Pe_fault=Pe_pre/2; Pe_post=Pe_pre*0.9; delta=asin(Pm/Pe_pre); delta_cc=73*DegToRad; % Should be calculated from equal area but was done numerically t=0; wd=0; delta_t=.005; while (delta<delta_cc) Kwd1=pi*fs/H*(Pm-Pe_fault*sin(delta)); Kd1=wd; Kwd2=pi*fs/H*(Pm-Pe_fault*sin(delta+Kd1*delta_t/2)); Kd2=wd+Kwd1*delta_t/2; Kwd3=pi*fs/H*(Pm-Pe_fault*sin(delta+Kd2*delta_t/2)); Kd3=wd+Kwd2*delta_t/2; Kwd4=pi*fs/H*(Pm-Pe_fault*sin(delta+Kd3*delta_t/2)); Kd4=wd+Kwd3*delta_t/2; Kwd=1/6*(Kwd1+2*Kwd2+2*Kwd3+Kwd4); Kd=1/6*(Kd1+2*Kd2+2*Kd3+Kd4); wd=wd+Kwd*delta_t; delta=delta+Kd*delta_t; t=t+delta_t; end; disp('Critical clearing time in seconds is '); disp(t); disp('Or in cycles is '); disp(60*t); disp(' ') pause p % Next problem

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 07/14/2011 for the course ECE 522 taught by Professor Tomsovic during the Summer '10 term at University of Florida.

### Page1 / 3

HW5 - % % Assignment 5 % Runge Kutta Integration % Modified...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online