Modeling Continuous time systems
Continuous systems are systems whose behavior is described and modeled using infinite points. A continuous system is valid under all quantas in time an example is the continuous mass-spring system in the figure bellow. Normally continuous systems are modeled with differential equations or ordinary equations when those systems don't have blocks that store energy, for example, a circuit composed only of resistors.


Mathematical tools used in Continuous Systems
Normally those tools are used for design/analysis of continuous systems.
- Laplace Transform
- Diferential Equations
Modeling a mass-spring system
Below is a simulation of this system. This model is described with the following equation differential.
This system has the following transfer function:
Where:
- X (s) = Output System (Displacement in the frequency spectrum)
- F (s) = Input System (Force in the frequency spectrum)
- m = Mass of body
- b = Coefficient of friction
- k = elastic coefficient
This model was obtained in Symbolic Computation
Modeling the system in Simulink using "Transfer Function" block
We shall see how to model a Transfer function in Simulink using the block "Transfer Function", an observation, Simulink is based on time, and even using the "transfer function" block in frequency spectrum (Laplace) the Simulink internally converts it to time.
The block "Transfer Function" is in the library "Simulink->Continuous". Clicking twice on the block, you will find how to enter the transfer function.
The coefficients of the numerator and denominator of the transfer function are represented by polynomials where the number of elements indicate the maximum order of the polynomial, example in the denominator we want:
In this case we have as a higher order of "s" value 2, then we have to have 3 elements, each being multiplied by the power of s, starting at zero (any number raised to zero is 1), then we have:
[m b k]
Let's create workspace in the values of m, b, k equal to the tutorial on symbolic computing
>> k=10;
>> m=10;
>> b=1;
Modeling the system in Simulink from the differential equation model
We gonna see how to implement a Simulink diagram for the differential equation the system directly, which will be very useful for modeling nonlinear systems.
To model the system from the differential equations, we use the integrator block, the number of integrators is equal to the order of the system, in this case with a system second order we need two integrator blocks. Below are the steps used to transform a differential equation in a block diagram.
- Isolate the element of higher order derivative
- Insert "n" blocks integrators (Depending on the order of the differential equation)
- Building the right side of the equation
- set the initial conditions
1) Isolating high order derivative term:
2) Inserting two integrators
3) Building the equation's right side
4) Setting the initial conditions
Now the results (Observe that the results are the same as the Transfer Function sample)