transient stability of power system

Download Transient Stability of Power System

Post on 15-Jan-2016

89 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

Transient Stability of Power System. Programming Massively Parallel Graphics Multiprocessors using CUDA Final Project Amirhassan Asgari Kamiabad 996620802. Electric Power System. Largest infrastructure made by man Prone to many kinds of disturbance : Blackouts - PowerPoint PPT Presentation

TRANSCRIPT

  • Programming Massively Parallel Graphics Multiprocessors using CUDAFinal Project

    Amirhassan Asgari Kamiabad 996620802

  • Electric Power SystemLargest infrastructure made by manProne to many kinds of disturbance : BlackoutsTransient stability analysis: dynamic behavior of power system few seconds following a disturbance

    (Electric Power Network) (String and Mass Network)Voltage, Current, Power angel. Force, Speed, Acceleration.

  • Transient Stability ComputationDifferential and Algebraic Equations

    Discretize the differential part and use Backward EulerNewton Method solve nonlinear systemSolve Linear System

    Transient Stability computation Load

  • Jacobian Matrix PropertiesLarge and Sparse: 10k* 10k with 50k non-zeros Stiff: Eigen values are widespreadSave in sparse compressed row formatData, indices and pointer vectors

    indicesdatapointerColumn 0 1 2 3

  • Direct: LU factorizationLU factorization : Ax = (L U)x = L(Ux)=b

    Backward Substitution Ly = bForward Substitution Ux=y

    Number of active threads reduce during run timeBackward and forward substitution are serial algorithms

  • Indirect: Conjugate GradientIterative method which use only matrix multiplication and additionNecessarily converges in N iteration if the matrix is symmetric positive definiteSuffer from slow rate of convergenceTransforming system to an equivalent with same solution but easier to solvePreconditioning can improve robustness and efficiency

  • Chebychev PreconditionerIterative method which estimate inverse of matrixMain GPU kernels: Sparse Matrix-Matrix MultiplyDense to Sparse transfer

  • Sparse Matrix-Matrix MultiplicationOne thread per row: Multiply each element in the rowfor (int jj = row_start; jj < row_end; jj++)Find corresponding element:while (kk < col_end) && (indice[jj] >= vec1_indice[kk]) If found, perform the multiplication if (indice[jj] == vec1_indice[kk])sum += data[jj] * vec1_data[kk];IndicesdatapointerThread Id = 2 :

  • Sparse Matrix-Matrix Multiplication Code const int row = (blockDim.x * blockIdx.x + threadIdx.x); if(row < num_rows){ float sum = 0; int dense_flag = 0;

    int row_start = ptr[row]; int row_end = ptr[row+1]; int col_start = vec1_ptr[col_num]; int col_end = vec1_ptr[col_num+1]; for (int jj = row_start; jj < row_end; jj++){int kk = col_start; int not_found = 1;while( (kk < col_end) && (indice[jj] >= vec1_indice[kk]) && not_found){if (indice[jj] == vec1_indice[kk]){ sum += data[jj] * vec1_data[kk];not_found = 0;}kk++; }}

  • Dense to Sparse ConversionSave the result of multiplication in dense format:

    If thread holds zero, write zero, otherwise write 1:

    Perform scan over the pointer vector:

    if (dense_ptr[tid] - dense_ptr[tid-1]){ data[dense_ptr[tid] -1 + data_num] = dense_data[tid]; indice[dense_ptr[tid] -1 + data_num] = tid;}

    ABCDE

    000100001000110000000010

    000111112222344444444455

    ABCDE

    49131423

  • Conjugate Gradient AlgorithmMain GPU Kernels:Vector NormVector inner product (a,b)Update vectors

  • Vector Norm and Inner ProductVector norm adds square of all elements and output square root of result:Load elements and multiply by itselfPerform scan and compute square rootInner product multiply corresponding elements of two vector and add up the results:Load both vectors and multiply corresponding elementsPerform scan and report the results

  • Kernels Optimization:Optimizations on Matrix-Matrix vector multiplyLoad both matrices in sparseCopy vector in shared memoryOptimized searchImplement add in same kernel to avoid global memoryChallenges:Link lists and sparse formatsVarying matrix size in each kernel

  • Kernels Evaluation:Main kernels Execution Time

  • Preconditioner EfficiencyMethodology:1-Effect on Eigen values spectrum2- Effect on number of conjugate gradient iterationsPreconditioning Effect on IEEE-57 Test System

  • CG EfficiancyMatrices Structural Plot(source : Matrix Market)

    Matrix NameMatrix SizeTotal NonzerosCondition NumberTotal TimePer Iteration(ms)E05R23658566e+041.13 E20R42411315565045e+1011.33E30R96613063563.47e+1145.7

  • DiscussionChallenges , problems and ideasWork with all matrices: matrix market formNew kernel ideasSpMMulDens2SpFuture work and updatesOther iterative methods: GMRES, BiCG

  • **

Recommended

View more >