Neural mass models have been used for many years to study the macroscopic dynamics of neural populations in a simple and computationally inexpensive way. In this paper, we modified a model proposed by Wendling et al. [Wendling F, Bartolomei F, Bellanger JJ, Chauvel P. Epileptic fast activity can be explained by a model of impaired GABAergic dendritic inhibition. Eur J Neurosci 2002;15:1499-508] to simulate EEG power spectral density (PSD) in some regions of interest (ROIs) during simple tasks (finger movement or working memory tests). The work consists of two subsequent stages: (1) in the first we evaluated the role of some model parameters (i.e., average gain of synapses and their time constants) in affecting power spectral density. This analysis confirmed the possibility to simulate various EEG rhythms (in the alpha, beta and gamma frequency ranges) by modifying just the time constants of the synapses. The position of the individual rhythms (i.e., the corresponding peaks in the PSD) can be finely tuned acting on the average gain of fast inhibitory synapses. This analysis suggested that a single neural mass model produces a unimodal spectrum, which can be finely adjusted, but cannot mimic the overall complexity of EEG in an entire cortical area. (2) Hence, in the second stage we built a model of a ROI by combining three neural mass models arranged in parallel. With this model, and using an automatic fitting procedure, we carefully reproduced the PSD of cortical EEG in several ROIs during finger movement, and their temporal changes during a working memory task, by estimating nine parameters. The estimated parameters represent the excitation of each population (mean value and variance of exogenous input noise) and the average gain of fast inhibitory synapses. Cortical EEGs were computed with an inverse propagation algorithm, starting from measurement performed with a high number of electrodes on the scalp (46-96). Results show that the proposed model is able to mimic PSD of cortical activity acting on a few parameters, which represent external activation and short-time synaptic changes. This information may be exploited to reach a quantitative summary of electrical activity in ROIs during a task, and to derive information on connectivity, starting from non-invasive EEG measurements.