Discrete Step Response Works With 'Bilinear' But Not With 'ZOH' #1238
Replies: 4 comments
-
|
I do not think this points to a For the numbers in the example, that produces a discrete closed-loop pole well outside the unit circle with So the failed process_fdbk = ct.feedback(ct.c2d(Ls, Ts=T, method="zoh"), 1)
print(ct.poles(process_fdbk))Conceptually, process_fdbk = ct.c2d(fdbk_Ls, Ts=T, method="zoh")Those are different systems, which is why the |
Beta Was this translation helpful? Give feedback.
-
|
thank you for your time for looking into this. Point 1. Point 2. Tbh, for me this is a little odd since it is ok to perform the open-loop (L(s)) continuous to discrete time conversion in the case when you want to perform the root locus test. Again, appreciate your feedback and your time. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Thanks, those are good questions. I would separate three different uses that are easy to mix together here. 1. Why an exception instead of just plotting the unstable response? In principle, yes, an unstable discrete system can be plotted. In this specific case the unstable pole is very large in magnitude, about So I would treat the exception as possibly a usability/error-message issue, but the underlying control result is still: the discrete closed loop created by 2. Should you always discretize only after closing the loop? No, not always. It depends what system you are trying to model. If you want the sampled response of the already-designed continuous closed loop, then this is appropriate: process_fdbk = ct.c2d(Ls_fdbk, T, method="zoh")But that is not the same as modeling an implemented digital controller. For a digital controller, the usual block diagram is closer to: In that case, the plant gets the ZOH discretization, while the controller is already discrete, or is discretized separately using whatever method you intend to implement. Schematically: Gz = ct.c2d(plant, T, method="zoh")
Dz = ct.c2d(Gc, T, method="bilinear") # if starting from an analog compensator
Lz = ct.series(Dz, Gz)
process_fdbk = ct.feedback(Lz, 1)If your compensator is already 3. Why is open-loop conversion OK for root locus? Root locus is indeed based on the open-loop transfer function. The issue is not "open loop vs closed loop" by itself. The issue is whether the open-loop transfer function you discretized represents the physical digital loop you intend. For digital root locus, the open-loop object should usually be something like: Lz = D(z) * G_zoh(z)where So yes: if you close the continuous loop first and then discretize, you bypass the detail that the ZOH belongs at the plant input. That can be useful for comparing sampled behavior of a continuous design, but it is not the model I would use to validate an actual digital compensator implementation. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello community,
I am performing a step response for a unity feedback plant - compensator process combination. It works fine when testing in the continuous time domain. However, when transitioning to the discrete time domain, it fails if I select the 'zoh' method but works fine if using the 'bilinear' method. Is this to be expected or is it a 'zoh' issue?
Here is the Python test script:
Step response observed results recap:
Can someone please advise if this is to be expected or if this is a bug.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions