06.08.2013 Views

JAVA-BASED REAL-TIME PROGRAMMING

JAVA-BASED REAL-TIME PROGRAMMING

JAVA-BASED REAL-TIME PROGRAMMING

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.2. Our physical world is parallel<br />

For a single (scalar) differential equation, we then have an even harder<br />

type of equality. Apart from the previously mentioned problem, we have to<br />

compute derivatives of variables (representing physical states) and then we also<br />

get truncation and quantification effects due to the binary representation of<br />

data with finite wordlength. Therefore, we can only work with approximations<br />

of the real world object, even if its properties would be known exactly.<br />

For a set of coupled differential equations, modelling our real-world objects,<br />

the sequencing effect is an even bigger problem since all equations are to hold<br />

in parallel. Additionally, state changes may occur at discrete times which<br />

cannot be exactly represented, and our models may include logical relations.<br />

To overcome these problems, the following techniques are used within systems<br />

engineering:<br />

1. For less complex dynamics, equations may be solved and only the explicit<br />

solution need to be implemented. For instance, a real-time computer<br />

game for playing “pinball” includes simulation of the ball dynamics,<br />

which can be expressed as a simple type of numeric integration.<br />

2. For systems with low demands on accuracy or performance, we may approximate<br />

or even omit the model equations. For instance, for soft-stop<br />

control of elevator motions we may use manually-tuned open-loop control<br />

without any internal model. This is opposed to optimal performance<br />

robot motions which require extensive evaluation of motion dynamics.<br />

3. We may use special purpose languages and execution systems that transforms<br />

declarative descriptions to computable expressions, i.e., a combination<br />

of software technology and numerical analysis. For instance, it is<br />

well known within the software oriented part of the control community<br />

that object oriented models of dynamic properties requires declarative<br />

languages such as Modelica. Another example is that certain types of<br />

logical relations may be conveniently expressed in Prolog.<br />

The computational difficulties are taken care of at ‘system design time’, which<br />

means that we use high performance workstations to analyze, simulate, and<br />

to determine a control algorithm that is simple to compute in the embedded<br />

system. For instance, based on the equations and a dynamic model of<br />

a system (like dynamic properties of a vehicle) we may use simulation tools<br />

to compute the behaviour (like rotation, position and velocity) when certain<br />

actions are applied (like speed and steering wheel commands), and some control<br />

design tool help us determine a control law expression which can easily<br />

be implemented and computed in the embedded software.<br />

The conclusion from this section is that our real physical world can be<br />

quite troublesome from a programming point of view. Therefore, we should<br />

not apply object orientation and imperative languages (such as Java) outside<br />

their conceptual limits, and we should design our systems so that algorithmic<br />

19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!