We study the single electron spectra from $D-$ and $B-$meson semileptonic decays in Au+Au collisions at $sqrt{s_{rm NN}}=$200, 62.4, and 19.2 GeV by employing the parton-hadron-string dynamics (PHSD) transport approach that has been shown to reasonably describe the charm dynamics at RHIC and LHC energies on a microscopic level. In this approach the initial heavy quarks are produced by using the PYTHIA which is tuned to reproduce the FONLL calculations. The produced heavy quarks interact with off-shell massive partons in QGP with scattering cross sections which are calculated in the dynamical quasi-particle model (DQPM). At energy densities close to the critical energy density the heavy quarks are hadronized into heavy mesons through either coalescence or fragmentation. After hadronization the heavy mesons interact with the light hadrons by employing the scattering cross sections from an effective Lagrangian. The final heavy mesons then produce single electrons through semileptonic decay. We find that the PHSD approach well describes the nuclear modification factor $R_{rm AA}$ and elliptic flow $v_2$ of single electrons in d+Au and Au+Au collisions at $sqrt{s_{rm NN}}=$ 200 GeV and the elliptic flow in Au+Au reactions at $sqrt{s_{rm NN}}=$ 62.4 GeV from the PHENIX collaboration, however, the large $R_{rm AA}$ at $sqrt{s_{rm NN}}=$ 62.4 GeV is not described at all. Furthermore, we make predictions for the $R_{rm AA}$ of $D-$mesons and of single electrons at the lower energy of $sqrt{s_{rm NN}}=$ 19.2 GeV. Additionally, the medium modification of the azimuthal angle $phi$ between a heavy quark and a heavy antiquark is studied. We find that the transverse flow enhances the azimuthal angular distributions close to $phi=$ 0 because the heavy flavors strongly interact with nuclear medium in relativistic heavy-ion collisions and almost flow with the bulk matter.