We develop an analytical expression for predicting electromotive force (EMF) waveforms resulting from permanent magnets (PMs) in electrical machines. The expressions for the flux linkage are based on a volume integral over the magnet volume, rather than the usual surface integral over the coil. The proposed method consists of applying a virtual current in the coil of the machine and calculating the magnetic field generated inside the PM volume. The EMF waveform is obtained by taking the derivative of the flux linkage with respect to time. We present analytical expressions of the EMF for various PM shapes and Halbach magnetization patterns. We tested a total of four configurations of PMs, and the experimental waveforms confirmed the validity of the expressions obtained theoretically.