Hi,
I understand that you designed a low-pass filter (LPF) with the goal of attenuating frequencies at ω=200π\omega = 200\pi by at least 20 dB and leaving ω=20π\omega = 20\pi unchanged. However, when you applied this filter to your signal in MATLAB, the output showed unexpected amplification.
I assume that your system is linear and time-invariant, and that you're working in the Laplace domain before converting back to time domain using convolution with the impulse response.
In order to analyze why the signal appears amplified, you can follow the below steps:
Step 1: Check the gain of the filter at desired frequencies
Use bode(LPF) or freqresp to verify that the filter has 0 dB (gain = 1) at ω=20π\omega = 20\pi and ≤ –20 dB at ω=200π\omega = 200\pi. A mistake in normalization or coefficient scaling could have led to unexpected gain.
Step 2: Verify proper scaling of Laplace-domain signal Xcs
You manually constructed Xcs from Laplace transform using zeros, poles, and gain. Make sure the scaling factor k is correct. If the Laplace transform was calculated symbolically, its magnitude could be off due to neglected constants.
Step 3: Ensure proper use of convolution and impulse response
When you use convolution yt = conv(Xct, LPFt), ensure both vectors are sampled properly and LPFt represents the impulse response of the filter. Also, convolution increases the signal length; truncate or adjust time axis accordingly.
Step 4: Normalize the convolution output if needed
If the impulse response was not normalized or time vector t has coarse sampling, the convolution output might be scaled. Normalize yt appropriately or scale by sampling interval dt if applicable.
Step 5: Prefer lsim for filtering over manual convolution
Instead of manually convolving with the impulse response, use:
yt = lsim(LPF, Xct, t);
This uses numerical integration and takes care of system dynamics and time alignment better.
References:
Hope this helps!