Power Systems Electromagnetic Transients Simulation

Appendix G: FORTRAN Code for State Variable Analysis

G.1 State Variable Analysis Program

This program demonstrates the state variable analysis technique for simulating the dynamics of a network. The results of this program are presented in section 3.6.

!****************************************************************!PROGRAM StateVariableAnalysis!!****************************************************************!! This program demonstrates state space analysis!             .!             x = Ax + Bu!             y = Cx + Du!!     Where     x in the state variable vector.!               y is the output vector.!               u the input excitation vector.!               .!               x = (dx/dt)!! The program is set up to solve a second order RLC circuit at! present, and plot the results. The results can then be compared! with the analytic solution given by SECORD_ORD.!!---------------------------------------------------------------!  Version 1.0    (25 April 1986) converted to FORTRAN90 2001!****************************************************************IMPLICIT NONE!  Definition of variables.!  ------------------------INTEGER, PARAMETER:: RealKind_DP = SELECTED_REAL_KIND(15, 307)REAL (Kind = RealKind_DP), PARAMETER :: pi = 3.141592653589793233D0<a name="1285"></a><a name="IDX-390"></a>INTEGER :: Iter_Count       ! Iteration CounterINTEGER :: Step_CHG_Count ...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Inertial Sensor Chips
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.