MATLAB: How to intentionally introduce aliasing of signals in Simulink

I want to intentionally create aliasing in my model to see its effects.

Best Answer

The attached model contains a sine wave source block, a zero-order hold block, and a spectrum scope block. The frequency of the sine wave is 100 Hz, and its sampling time is 1000 Hz. The sampling time of the zero-order hold block is 75 Hz. When you run the model, you will see a spike in the spectrum scope block at 25 Hz, representing a sinusoid with a frequency of 25 Hz. This is because the 100 Hz source sinusoid becomes aliased to a 25 Hz sinusoid.
In general, f_image = f - N*fs, where f_image is the created, aliased frequency, f is the frequency of the original sinusoid, fs is the new sampling frequency, and N is an integer chosen such that f_image lies within [0, fs/2).