The conventional Walsh function just takes values of +1 and −1 and can only track limited signal states. However, based on the characteristics of Walsh functions that can capture the frequency of square wave signals, this article proposes a generalized Walsh transform algorithm to process multi-valued rectangular wave signals. As an extension of the traditional Walsh functions, generalized Walsh functions have advantages in signal frequency matching and sequency spectrum amplitude extraction, which makes them well suited to express the valuable signal. First, we infer the invariance displacement theory in the time and sequency domains, limiting the value of a circular time shift to ensure the concentrated distribution of the signal sequency energy. This limitation lays a good foundation for constructing generalized Walsh functions. Then, two types of generalized Walsh functions are built by combining the characteristics of different periodic rectangular waves. We deduce two properties of orthogonality and completeness to prove the ability of the constructed functions to match the frequency and the extracted energy. Finally, we compare multiple filtering methods to verify the reliability of the proposed method.