I am wondering if it is possible to realize an analog square root raised cosine filter.
Any idea about how to do that with Matlab?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.Sign up to join this community
Here's Octave code for a (digital) RRC filter:
pkg load signal; % Octave needs this; MatLab doesn't Fs = 16000; % sample rate Rs = 400; % symbol rate sps = Fs/Rs; % samples per symbol % % Root raised cosine pulse filter % https://www.michael-joost.de/rrcfilter.pdf % r = 0.22; % bandwidth factor ntaps = 8 * sps + 1; % Pulse duration is 8 symbols st = [-floor(ntaps/2):floor(ntaps/2)] / sps; % symbol time = t/Ts values hpulse = 1/sqrt(sps) * (sin ((1-r)*pi*st) + 4*r*st.*cos((1+r)*pi*st)) ./ (pi*st.*(1-(4*r*st).^2)); % fix the removable singularities hpulse(ceil(ntaps/2)) = 1/sqrt(sps) * (1 - r + 4*r/pi); % t = 0 singulatiry sing_idx = find(abs(1-(4*r*st).^2) < 0.000001); for k = [1:length(sing_idx)] hpulse(sing_idx) = 1/sqrt(sps) * r/sqrt(2) * ((1+2/pi)*sin(pi/(4*r))+(1-2/pi)*cos(pi/(4*r))); endfor % normalize to 0 dB gain hpulse = hpulse / sum(hpulse);
For practical reasons, the filter impulse response is truncated to 8 symbols in duration, as there isn't much benefit in making it any longer.
I'm not sure what you mean by "analog" RRC filter in Matlab. The continuous frequency response of the RRC filter is well understood. It results in an infinitely long time domain impulse response, that is the equation in your question with a scaling factor out front.
In the above code, you can make the sample rate as high as you like, to get more closely spaced samples, to have the RRC filter taps get an ever closer approximation to the continuous function in MatLab.
Matlab itself may have facilities for describing continuous functions in the system toolbox, but I am not familiar with them.
As a technical reality, the infinitely long, continuous RRC filter is not realizable in real-life analog components, as it extends infinitely into the past. Could you implement a truncated continuous RRC filter with analog components? Well maybe, but why? Its use is exclusive to digital modulations and it is easily implemented digitally.