Content Preview

Copyright © 1998, 1999, 2000 by Prentice Hall, Inc.
NOT FOR DISTRIBUTION


 

System Simulation

Sometimes, engineers must model the dynamic behavior of a system, that is, the way in which the various parts of a system interact and evolve with time. A dynamic analysis differs from the static analyses provided by simulation tools such as ProEngineer and SolidWorks in that the various parts of the system are represented mathematically in block diagram form, rather than as dimensioned objects having physical properties such as density and elasticity. Dynamic simulation tools are useful for solving systems that obey differential equations.

One popular dynamic system simulation tool that runs as an appendage to MATLAB is called Simulink®. The Simulink user draws a block diagram on the computer that represents the dynamic system to be simulated. The program then determines the relevant equations and sends them to MATLAB for solution and display. This layering of software shells, wherein one program produces code that can be solved by another, is common in software engineering.

EXAMPLE
Thermostat Control

The concept for the following example is derived from an example found in the instruction manual that comes with the student version of Simulink.1 The block diagrams provided here are more generic than those actually used within Simulink but serve to illustrate the concepts involved. Suppose that you were given the task of designing a temperature control system for a small building heated by a furnace. Because the building has thermal memory, that is, it retains heat for some time when the furnace goes off and requires time to heat up when the furnace is turned on, the furnace-building combination constitutes a dynamic system. The variables of the system include the desired temperature (the setting of the thermostat) and the actual indoor temperature. The program determines the difference between the two temperatures and turns on the switch if Tactual< Tthermostat. Turning on the switch causes the furnace to produce heat that acts to increase the indoor temperature, but with a time delay 1(sometimes called a time constant.) In the meantime, regardless of the status of the furnace, heat continually flows out of the building in proportion to the difference between the indoor and outdoor temperatures. The time constant governing this outward heat flow is 2.

A block diagram description of the system is shown in Figure 31. The output of the system, produced by Simulink for the parameters Tthermostat = 68°F, Toutdoor = 32°F, 1 = 4 min, and 2 = 12 min, is shown in Figure 32. This plot indicates that the temperature falls slowly until Tactual falls below Tthermostat. At that point in time, the furnace turns on and raises the temperature until Tactual = Tthermostat. Note that the building temperature continues to rise for some time after the furnace is turned off. This phenomenon occurs because of the non-zero time delays in the system. Although the system recognizes that Tactual has reached Tthermostat, the time delay between the furnace and the building causes additional heat to flow from the former to the latter.


31. Block diagram description of the dynamic system of a building and its heating furnace.


32. Results of the simulation with Tthermostat = 68°F, Toutdoor = 32°F, 1 = 4 min, and 2 = 12 min.

1 MATLAB Student Version: Learning Simulink 4 © 2001 The Mathworks, pp 2.3–2.5.


Footer