You are on page 1of 8

Chapter 18

The Additional Math Increment / Decrement Library

his chapter is an introduction to the Additional Math Increment / Decrement Library.


This is the seventeenth and last library in the Simulink group of libraries and contains the
blocks shown below. We will describe the function of each block included in this library
and we will perform simulation examples to illustrate their applications.

Introduction to Simulink with Engineering Applications


Copyright Orchard Publications

181

Chapter 18 The Additional Math Increment / Decrement Library


18.1 The Increment Real World Block

The Increment Real World block increases the realworld value of the signal by one.
Example 18.1
The model of Figure 18.1 implements the function y = 3x + 5 as indicated by the XY Graph in
Figure 18.2.

Figure 18.1. Model for Example 18.1

Figure 18.2. The XY graph for the model of Figure 18.1

182

Introduction to Simulink with Engineering Applications


Copyright Orchard Publications

The Decrement Real World Block


18.2 The Decrement Real World Block

The Decrement Real World block decreases the realworld value of the signal by one.
Example 18.2
The model of Figure 18.3 implements the function y = 3 ( x + 1 ) as indicated by the XY Graph
in Figure 18.4.

Figure 18.3. Model for Example 18.2

Figure 18.4. XY graph for the model of Figure 18.3

Introduction to Simulink with Engineering Applications


Copyright Orchard Publications

183

Chapter 18 The Additional Math Increment / Decrement Library


18.3 The Increment Stored Integer Block

The Increment Stored Integer block increases the stored integer value of a signal by one.
Example 18.3
The model of Figure 18.5 implements the function y = ( 2 + x ) sin x 1 . The XY Graph for this
model is shown in Figure 18.6.

Figure 18.5. Model for Example 18.3

Figure 18.6. XY graph for the model of Figure 18.5

184

Introduction to Simulink with Engineering Applications


Copyright Orchard Publications

The Decrement Stored Integer Block


18.4 The Decrement Stored Integer Block

The Decrement Stored Integer block decreases the stored integer value of a signal by one.
Example 18.4
The model of Figure 18.7 implements the function y = 2x 4 + 1 . The XY Graph for this model is
shown in Figure 18.8.

Figure 18.7. Model for Example 18.4

Figure 18.8. XY graph for the model of Figure 18.7

Introduction to Simulink with Engineering Applications


Copyright Orchard Publications

185

Chapter 18 The Additional Math Increment / Decrement Library


18.5 The Decrement to Zero Block

The Decrement To Zero block decreases the realworld value of the signal by one. The output
never goes below zero.
Example 18.5
For the model of Figure 18.9, the output value never goes below zero as shown in Figure 18.10.

Figure 18.9. Model for Example 18.5

Figure 18.10. XY graph for the model of Figure 18.9

186

Introduction to Simulink with Engineering Applications


Copyright Orchard Publications

The Decrement Time To Zero Block


18.6 The Decrement Time To Zero Block

The Decrement Time To Zero block decreases the realworld value of the signal by the sample
time, Ts . This block works only with fixed sample rates and the output never goes below zero.
Example 18.6
The model of Figure 18.11 implements the waveform shown in Figure 18.12.

Figure 18.11. Model for Example 18.6

Figure 18.12. XY graph for the model of Figure 18.11

Introduction to Simulink with Engineering Applications


Copyright Orchard Publications

187

Chapter 18 The Additional Math Increment / Decrement Library


18.7 Summary
The Increment Real World block increases the realworld value of the signal by one.
The Decrement Real World block decreases the realworld value of the signal by one.
The Increment Stored Integer block increases the stored integer value of a signal by one.
The Decrement Stored Integer block decreases the stored integer value of a signal by one.
The Decrement To Zero block decreases the realworld value of the signal by one. The output never goes below zero.
The Decrement Time To Zero block decreases the realworld value of the signal by the sample time, Ts . This block works only with fixed sample rates and the output never goes below
zero.

188

Introduction to Simulink with Engineering Applications


Copyright Orchard Publications

You might also like