I suggest you start by writing down on paper the equations or pseudo code that you think will solve the requirements of your problem.
For a discrete-time implementation, difference equations are great.
Mini-review of difference equations.
v(k) = the value of signal v at the k-th time step
v(k-1) = the value of signal v at the at the (k-1)-th time step
Less formally, you might describe this as
v(k) is the value of signal v "NOW"
v(k-1) is the "PREVIOUS" value of signal v
Note: to understand what time step k corresponds to you need to multiply by the sample rate.
For example, if the sample rate is 0.125 seconds for the unit delay then the k-th time step corresponds to time k * 0.125 seconds.
In Simulink, let's assume a wire represent a signal v.
At any time step k, the value on that signal wire will be v(k).
If you pass that signal as input to a unit delay, then the output will be v(k-1).
When you convert your difference equations to a Simulink model, unit delay blocks will be key elements in your discrete time design.
As you experiement with possible solutions and debug your wiring up of the Simulink diagram, it will be very helpful to drop in display blocks connected to each signal of interest. Use the Simulink stepper to move the simulation forward one step at a time. Look at each of the display blocks to see if the values shown agree with your mental model of what should be happening. This process should quickly identify errors and misunderstandings and build your expertise.