Graphics Reference
In-Depth Information
However, this configuration also demands separation of the plant and controller
into different execution threads because the rendering process must run asynchro-
nously and in tandem with the controller thread. A common mistake in structuring
the code is to have the controller implemented in the same process. The results may
be significantly slower frame rates due to hogging of CPU time by the controller
when it shares a CPU time slice with the plant.
In Configuration B, the plant and controller execute as separate process within
the same machine. A simple illustration is the use of two applications to realise this
architecture, for example, using a specialised controller application that can com-
municate with the rendering application in real time. This is usually done via inter-
process or network communications within the local computer.
Since rendering processes vary in complexity and computational requirements,
Configuration C provides a system architecture that decouples the plant and controller.
This means that the controller can execute properly even if the plant computer is
not suitable for running run both processes. Furthermore, Configuration C allows
the control system to run without subjecting each process to the limitations of the
underlying operating system (e.g., application window handling) and helps minimise
the effects of kernel process disturbances on the control system. We conducted the
experiments described in this chapter using Configuration C because:
The controller was designed and simulated in Simulink ® /MATLAB ® and
run as part of the main Simulink/MATLAB application.
Due to development practices, MATLAB provided several useful graph-
ing windows for debugging and performance monitoring. Configuration B
could not be adopted because the Windows operating system does not sup-
port multiple visible windows with equal CPU usage priority—at least not
with MATLAB application windows and our rendering application. Using
Configuration B for our control system implementation would have kept the
controller or plant from running properly.
By using separate and dedicated computers for the controller and plant, we
circumvented the above problems.
A noteworthy point at this juncture is that our conduct of experiments using
Configuration C does not suggest that the other two configurations are not useful.
The adoption of any configuration depends on the system designer's choice of the
optimal way to devise a control system based on application requirements, nature of
system, components to be used, and time and effort available.
Figure 7.1 is a timing diagram of our plant (rendering) application. Note that a
thread is created for network communication at the beginning of the application
and kept running until the end of the application's life. The intent is to prevent the
fetching and sending of data from and to a remote computer from bogging down
the main rendering process. After the application initialises all required resources,
the network communication thread works with the main process rendering loop at
every frame to ensure that the control action is parsed and put into effect as needed.
In addition, the controller also receives feedback information—essentially the frame
rate from the plant for processing.
Search WWH ::




Custom Search