Trajectory sensitivities analysis is one of the most important tools for dynamic security assessment of power systems. In the recent years by the advent of distributed generation (DGs) a new concept which is named Micro-Grid is created. A micro-grid is a small power system including loads and DGs which are inter-connected via a distribution system. The micro-grid is originally connected to a stiff grid; however, it can also autonomously operate in an islanded mode due to disturbances and/or pre-planned events. Because of the wide use of synchronous based DGs in Micro-Grids and Distribution systems investigating the angle stability of these DGs is very important. In this thesis using trajectory sensitivities analysis the angle stability of synchronous machine DGs is investigated. Using this technique some critical parameters of power systems like critical clearing time and critical loading of generators is computed and new algorithms are presented. In this thesis some corrective algorithms are presented in which first swing stability conditions of synchronous machine DGs in a Micro-Grid or distribution system are provided. Calculating the appropriate values of series and shunt capacitor compensators and calculating appropriate ranges for loading of DGs are the main tasks of these algorithms. In the proposed algorithm for designing capacitive compensators the notion of trajectory sensitivities is used to determine the sensitivity of DGs rotor angles versus the susceptance of a compensator. Then, via the sensitivity analysis of the micro-grid subsequent to a pre-specified fault, the minimum required capacitor banks to maintain the angle stability of DGs is calculated. In the proposed algorithm for calculating the appropriate loading of DGs the notion of trajectory sensitivities is used to determine the sensitivity of DGs rotor angles versus the mechanical input power of DGs. The algorithms formulations can be used for a micro-grid with an arbitrary number of DGs and under various fault scenarios. Capabilities of the algorithm are investigated using a modified benchmark system of the IEEE standard 399-1997. The validity of the algorithm is verified based on time-domain simulations of the benchmark study system using MATLAB software tools. Test results show that all of the proposed algorithms provide the first swing stability conditions of synchronous machine DGs in both operation modes of Micro-Grids which are grid-connected and islanded modes. In this thesis using trajectory sensitivities a new index for finding the best place of synchronous machine DGs in a distribution system is introduced. In this index angle stability margin of synchronous machine DGs is considered. Using this index the best bus for using . Using a standard Keywords: Trajectory sensitivities analysis, Synchronous machine DG, Micro-Grid, Capacitive compensator, Islanded mode, Grid connected mode