Modeling discrete-time systems

In this tutorial we're going to see how to model discrete-time systems in Simulink..

What is a system

A system is any process that produces an output signal in response to a signal input. A discrete system in time is any device or algorithm that takes as input a discrete-time signal and produces another discrete-time signal. It is said that a system transforms an input signal x[n] in signal y[n] using the following relationship:

In this case the system is defined by "H"

"H" is defined by a "difference equation" don't confuse it with "diferential equations", bellow we can see a discrete signal sampled at fixed time quantas. Observe that the discrete signal is only valid at certain time step.

Blocks used to represent discrete-time systems

Here we list the basic blocks used to represent discrete-time systems

In Simulink :

Creating a discrete source in Simulink

This video show how to create a signal source composed of two senoidal signals.

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

Modeling a discrete-time system in Simulink from the equation of differences

Now we're going to learn how to create a diagram in Simulink from the difference equation.

  1. Isolate the element that represents the output
  2. Create a delay block for each "[n-x]" in the equation, (in our case we need two)
  3. Use the multiplier and addition block for the right side of the equation
  4. Define the multiplier gains in Matlab Workspace

Modeling a system with "Discrete-Filter" block

We can also use the Discrete Filter block to model a difference equation. Before that we must transform the difference equation in time domain for the frequency domain using the transform Z. Below we show how to do this using the MuPAD (Tool symbolic Matlab).

Now we place our discrete filter block in parallel with the previous diagram

Default simulation settings for discrete systems

By default we use the discrete solver, with fixed step, "auto".