In this video, we would like to model in the Hybrid Equation Toolbox,
the model of a network,
that in this case could be transmitting information
received from the output of a physical component,
a plant of a system.
And we are going to do that with the idea of
having a window of when the events will occur.
Remember the model we described in a previous lecture, in a previous video,
we have a signal that is applied to the network and
that signal gets to the end of the network after some time.
That time is governed by a timer.
The timer that decreases linearly,
and when the timer expires,
which is when it reaches zero,
it's reset to a value that belongs to the window TN min,
TN max, here it is.
When that happens in the event of resetting that follows that particular event,
I'd say T1, will occur no sooner than TN min and no later than TN max.
And that's one way to model
this uncertainty of when the events are going to occur within a window.
So the way we're going to do that is by using the models that we are already creating in
the Hybrid Equation Toolbox for the subtle physical system simulation.
And we want to make sure, as we said,
the output of a physical components,
so this is the physical component given by one of the other modules in the toolbox.
This is a state X, which is multiplied by a constant,
which will have to regenerate the output.
So this you can think as the output M
times the state of a plant to generate the output Y.
That signal Y, will be what is being given to the network,
and the network every event
corresponding to a timer and expiring will sample this signal and put
it in the memory state corresponding to
the component for that in the state of the network.
Also the network has a timer that triggers the events.
So, you're going to initialize these,
and then we are going to look at the internals of those blocks.
So, in these initialization file,
what I have is this is going to be the horizon,
the maximum time in-between events will be
10 seconds and the minimum time will be 0.2 seconds.
And the way that we actually create these events according to these parameters is
by creating a sequence of time TK that are being generated beforehand,
but these are different every time that a simulation is being run.
So therefore, one will we be actually generating solutions or picking
a specific solution to the nondeterministic model of the network.
And then, the initial conditions will be given
according to these values that we have right here.
We will need to have,
also you need your conditions for the timer.
So these are the conditions here,
and for to the measurements of the output of the sample of your output.
For tanking resource, the network model also includes
parameter J that is going to actually be useful in triggering the event internally.
We don't need to get into the details of that.
So let's run this script that initializes all these variables
including the times that you have communication events which again,
will change when we run this another time.
And now, open the network model and simulate.