Discrete input to continuous transfer function
12 vues (au cours des 30 derniers jours)
I'm modeling a discrete pid to control a step response for a continuous system.
From left to right:
i have a continuous signal in feedback that is converted using ZOH to it's discrete counterpart. The scopes are there to check what actually happens and i can confirm that it gets correctly converted. Then the discrete signal goes into the discete pid and has the control variable as output, still discrete as it should be (scope confirms).
This is where i get lost (double red '?'): i put the discrete control variable in input to a continuous system and it actually works as intended by having a continuous output. But what actually happens to the signal? does the signal get converted to continuous and used as input to the continuous system? or somehow it uses it as discrete? Shouldn't it need an explicit DAC block (which i couldn't find)?
Any clarification would help.
FYI: the sample time is 0.01
Paul le 14 Fév 2023
Modifié(e) : Paul le 16 Fév 2023
I'm 99.99% sure that the output of a block with a Discrete Sample Time is held constant until it changes. I know that used to be explicitly documented. Maybe it still is, but I can't find it. Nothing else would make sense.
I wouldn't think of Continuous Sample Time as a "very fine sample time." Blocks with Continous Sample Time have to use the ode solver, which could be using variable steps, so it's not really like a very small Discrete Sample Time.
If you want, you can use a Rate Transition Block with appropriate settings to convert the Discrete Sample Time to Continuous, but I really don't think that's needed for basic simulation.
Also, I've always found it interesting (and troubling) that Simulink uses the ZOH block for an ADC, as in your model, even though in control system theory the ZOH is use to represent a DAC.