what is the sampling frequency limit in 'c2d' cmd for a stable discrete system?
13 views (last 30 days)
Show older comments
I'm converting a continuous transfer function into a discrete one, using 'c2d' cmd.
But realised that different sampling frequency / discretized step time would effect system stability.
The transfer function I'm working on is a 9th order system.
dt = 1/7993 can offer a stable discrete system while dt = 1/7993/226 would result in an unstable system.
Therefore, I'm wondering what the upbound limit for sampling frequency for c2d is.
And is there any other way that I can get a discrete system using dt = 1/7993/226 or even higher sampling rate?
Thanks!
4 Comments
Accepted Answer
Paul
on 8 Oct 2020
It appears to be a numerical issue when using c2d with you transfer function model. Try converting to state space first:
sys = tf(Numerator,Denomenator);
bode(c2d(ss(sys),dt1/226),c2d(ss(sys),dt1/226,'tustin'),c2d(ss(sys),dt1/226,'matched'),sys),grid
abs(pole(c2d(ss(sys),dt1/226,'tustin')))
ans =
9.9826e-01
9.9826e-01
9.9919e-01
9.9919e-01
9.9775e-01
9.9775e-01
9.9480e-01
9.9480e-01
9.9865e-01
A quick look under the hood showed that c2d converts the input tf to ss anyway and then converts back to tf. That conversion back is probably where the problem lies. Convert your model to ss and stay there. If you can, avoid the transfer function form altogether and build your model directly in ss form and stay in ss form.
You should add the bode plot of your discrete model using dt1 to those plots to see if you get what you need for that sample time.
More Answers (0)
See Also
Categories
Find more on Continuous Waveforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!