Problem with continuous filter discretization using c2d function

4 views (last 30 days)
I'm trying to convert a transfer function in continuous frequency space (Fc) to discrete (Fc_d), using c2d, which I then transfer into SImulink by manually inputting its parameters into simulink "discrete filter" or "discrete transfer function" blocks. However, the signal I get as a response from Fc_d grows without bound, for example, if I input a 6Hz sinusoid into it. All responses from Fc are stable. So somehow a get an unstable system from the stable one after discretization.
Continuous tf is characterized by numer = [0, 26.8912, 0]; denom = [1.0000, 6.1922, 2.9191];
Descrete tf obtained via c2d(Fc, 0.001) has numer = 1.0e-03 * [0,0.9969,-0.9969]; denom = [1.0000,-1.9938,0.9938];
I tried to code up the filter response in Matlab via its difference equation and it gives the same response, which I suspect is due to large value for the coefficient of y[n-1], which is -1.9938. I tried frequency prewarping at the centre frequency of the continuous band pass filter, but got the same diverging response from the digital filter.
I've attached the simulink responses for Fc and Fc_d and the response from matlab code using lsim.
If I use lsim in Matlab, then everything works fine, which I find strange. What could be the cause of this and how can i achieve stable performance for this discretized transfer function in Simulink?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!