# Reversing the order of up and downsampling

When we are dealing with the problem of changing the sampling rate by a noninteger factor like L/M, we first need to the do the upsampling, and then the downsampling.

My question is that under which condition can we reverse this order?

• Are you familiar with the reason behind the ordering of these operations? – A_A Feb 18 '19 at 16:35
• I know about the reason why we use a low-pass filter, roughly speaking before the compressor and after the expander. – Niousha Feb 18 '19 at 16:42

The problem with downsampling is that it can be lossy -- since you're reducing the sampling rate, you can introduce aliasing. So, you can reverse the order whenever downsampling does not result in aliasing.

For example, say your discrete-time signal $$x[n]$$ contains energy in frequencies up to $$f_N/3$$, where $$f_N$$ is the Nyquist frequency. Then, downsampling by a factor of 2 will not affect the signal: the "new" Nyquist frequency is $$f_N/2$$, so there is no aliasing.

Apart from the Aliasing reason explained, the most important point when the order can be interchanged is when the up sampling and downsampling factors are co-prime