How can I model the integrator show the desired reset behaviour?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I want to model continuous behaviour with its input depending on the discrete behaviour which should be changing per sample time. An example is shown below.
I have the discrete part modelled as shown below.
Now I'm having trouble aligning the continuous part with this discrete part. There should be some reset coming from the discrete part. My current model is shown below with its combined scope plot for t=50.
Data:
I have initial value x0=[12;7.57] , gain A=[0.92 0.08 ; 0.15 0.85] , sample time ts=2 .
The pulse is period is sample time ts=2.
1 comentario
Paul
el 10 de Dic. de 2020
This model seems to be based on the assumption that for a discrete sequence x(k) governed by the difference equation
x(k+1) = A*x(k),x(0)=x0
that there is a continuous time solution between samples given by the equation
xdot(t) = A*x(t), t>=t(k), x(t(k)) = x(k)
The model posted above implements these two equations, but as you've noted it doesn't behave the way you expect. So the question is: why do you think these equations are correct for the process you want to model?
What would really be helpful is if you could explain the two light blue curves in the figure and how they relate to each other. I assume that the stair step curve is the solution to
x(k+1) = A*x(k) , x(0) = x0
But what is the other the light blue curve? Presumably it depends on the stair-step curve, but how? What is the mathematical relationship between them? Once that relationship is defined, it will be straightforward to model and simulate.
By the way, the posted model should be run with a much smaller step size to really see what's going on, maybe even use a variable step solver with a step size of 0.01
Respuestas (1)
Fangjun Jiang
el 9 de Dic. de 2020
Editada: Fangjun Jiang
el 9 de Dic. de 2020
I can say for sure that this is not an Integrator setting issue. For the blue curve, it looks like the response of a highly damped second order system. The stair curve is the input. The controller has an initial condition and then is able to follow the input with a typical second order system response. For the red curve, it is not clear what is the input and what is the ouput, although it also looks like the response of a second order system with a overshoot.
Please refer to Figure 3.14 in this: https://www.sciencedirect.com/topics/engineering/second-order-system
Ver también
Categorías
Más información sobre General Applications en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!