Bode plots of discrete systems with different sample times
19 views (last 30 days)
Show older comments
Hello everyone,
I am struggling with following problem: To optimize my control system I plotted the control loops using Bode diagram. It worked well as continuous. Now I want to refine it and respect the sampling times. So I am using the macro c2d to discretize it. However, I cannot mix transfer functions of blocks with different sampling times (e.g. 125 us, 500 us). Does anyone have any idea how to make it? It would help me A LOT! Thanks for any hint!
Martin
1 Comment
Paulo Silva
on 10 Mar 2011
That's one interesting question, hope someone can provide a good solution for it, +1 vote , good luck
Answers (1)
Doug Eastman
on 18 Apr 2011
The only way to combine those two different transfer functions with the Control System Toolbox is to resample the faster model to the slower 500 us sample time using d2d.
With Simulink, however, you can combine discrete systems of different rates and continuous systems very easily. To get the bode plot you would need to either linearize the Simulink model (which will give you the same result as resampling) or do frequency response estimation using Simulink Control Design.
3 Comments
Doug Eastman
on 19 Apr 2011
I couldn't find a good reference to confirm, but I think in general the best approach (and what Simulink Control Design defaults to) is to use the LCM (least common multiple) of the sample times which in Martin's case is 500 us (or the slowest rate). This will always involve downsampling the transfer functions to slower rates.
Alternatively you could pick the GCF (greatest common factor) which would involve upsampling the transfer functions to the fastest rate (or possibly a faster rate than any of the TFs). And again I don't have any good resources to point to, but my hunch (based on one simple experiment I performed) is that this does not give you accurate results (or at least creates much higher order transfer functions that don't include any additional useful information).
Doug Eastman
on 19 Apr 2011
But if someone has more information about when to upsample vs. downsample I'd love to hear it!
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!