  Internal shocks caused by fluctuations of the outflow velocity are likely to
power the radio to IR emission of the compact jets of X-ray binaries. The
dynamics of internal shocks and the resulting spectral energy distribution
(SED) of the jet are very sensitive to the time-scales and amplitudes of the
velocity fluctuations injected at the base of the jet. I present a new code
designed to simulate the synchrotron emission of a compact jet powered by
internal shocks. I also develop a semi-analytical formalism allowing one to
estimate the observed SED of the jet as a function of the Power Spectral
Density (PSD) of the assumed fluctuations of the Lorentz factor. I discuss the
cases of a sine modulation of the Lorentz factor and Lorentz factor
fluctuations with a power-law PSD shape. Independently of the details of the
model, the observed nearly flat SEDs are obtained for PSDs of Lorentz factor
fluctuations that are close to a flicker noise spectrum (i.e. P(f)~1/f). The
model also presents a strong wavelength dependent variability that is similar
to that observed in these sources.
