  Aims: We developed a new method of estimating the stellar parameters Teff,
log g, [M/H], and elemental abundances. This method was implemented in a new
code, SP_Ace (Stellar Parameters And Chemical abundances Estimator). This is a
highly automated code suitable for analyzing the spectra of large spectroscopic
surveys with low or medium spectral resolution (R=2,000-20,000). Methods: After
the astrophysical calibration of the oscillator strengths of 4643 absorption
lines covering the wavelength ranges 5212-6860\AA\ and 8400-8924\AA, we
constructed a library that contains the equivalent widths (EW) of these lines
for a grid of stellar parameters. The EWs of each line are fit by a polynomial
function that describes the EW of the line as a function of the stellar
parameters. The coefficients of these polynomial functions are stored in a
library called the "$GCOG$ library". SP_Ace, a code written in FORTRAN95, uses
the GCOG library to compute the EWs of the lines, constructs models of spectra
as a function of the stellar parameters and abundances, and searches for the
model that minimizes the $\chi^2$ deviation when compared to the observed
spectrum. The code has been tested on synthetic and real spectra for a wide
range of signal-to-noise and spectral resolutions. Results: SP_Ace derives
stellar parameters such as Teff, log g, [M/H], and chemical abundances of up to
ten elements for low to medium resolution spectra of FGK-type stars with
precision comparable to the one usually obtained with spectra of higher
resolution. Systematic errors in stellar parameters and chemical abundances are
presented and identified with tests on synthetic and real spectra. Stochastic
errors are automatically estimated by the code for all the parameters. A simple
Web front end of SP_Ace can be found at http://dc.g-vo.org/SP_ACE, while the
source code will be published soon.
