EXAMPLE 1 - Modeling an Equation

This example demonstrates how an equation can be modeled using Simulink. Let's consider the temperature conversion equation:

In your model window, create (drag from libraries) the following blocks:

  1. Ramp block from Sources library
  2. Constant block from Sources library
  3. Gain block from Math library
  4. Sum block from Math library
  5. Scope block from Sinks library
then make a connection as shown in the figure below

and the display of the scope would look like this:

For an exercise, create a Simulink model to convert Fahrenheit to Celsius degree, or

EXAMPLE 2 - Modeling a Continuous System

In this example, the dynamics of a physical system is represented by

where x and u are functions of time t. Input u(t) is a square wave with amplitude = 1; frequency = 1 radian/sec. In the time domain, Simulink represents the system as

and the scope display should look like this:

You may also consider the system in the frequency domain by taking Laplace transform of the first-order linear differential equation above.  From the Laplace transform, we have

This is the transfer function of the system. In Simulink you can use Transfer Fn block to represent the above relation. The  model may look like this:

which is considerably simpler than the previous model and provides the exact same result.

NOTE: You must change the paramters in the blocks such as in the case for the Transfer Fcn block to change from the default values to your model specifics. To change the parameters, double click on the block and a new window will pop up to prompt you for inputs/changes.