Biomedical Engineering Reference
In-Depth Information
would happen in the vergence model if the neural
components responsible for the pulse signal (upper
pathway) were not functioning, or functioning errati-
cally perhaps due to a brain tumor? Systems-type models
are even easier to simulate than analog models because
MATLAB provides a software package known as Simu-
link that uses graphics to convert a system model into
computer code. Simulink simulations of the vergence
model produce responses that are very close to actual
vergence eye movements. Although Simulink is only
developed for systems models, it is easy to convert
analog models into system format so this software can
be used to simulate analog models as well. Alternatively,
there are programs such as pSpice specifically designed
to simulate electronic circuits that can also be used for
analog models.
Figures 2.3-9 and 2.3-10 show another important
property of systems models. The influence of one
process on another is explicitly stated and indicated by
the line connecting two processes. This line has a di-
rection usually indicated by an arrow, which implies
that the influence or information flow travels only in
that direction. If there is also a reverse flow of in-
formation, such as in the case in feedback systems, this
must be explicitly stated in the form of an additional
connecting line showing information flow in the reverse
direction.
The next example has some of the flavor of the sim-
ulation approach, but will not require the use of Simulink.
interpret. Going back to basic calculus, recall that the
derivative of a sine is a cosine, and the integral of a sine is
a negative cosine. Thus, if the input signal were a sine, the
output would still be sinusoidal even if the process
contained integrations and/or differentiations. If the
process contained derivative or integral operations, the
sinusoidal output would be scaled (by the frequency),
but this scaling would apply to all sine inputs.
Our strategy will be to input different sines having
different amplitudes. If the output signals are pro-
portional to the input amplitudes, we would guess that
process_x is a linear process over the values tested.
Because the work will be done on a computer, we can use
any number of sine inputs, so let us try 100 different
input signals ranging in amplitude from 1to 100. If
we plot the amplitude of the sinusoidal output, it should
plot as straight line if the system is linear, and some other
curve if it is not. The MATLAB code for this evaluation is
as follows:
% Example 2.3.3 Example to evaluate an unknown
process
% called 'process_x' to determine if it is
linear.
%
t ¼ 0:2*pi/500:2*pi; % Sine wave argument
for k ¼ 1:100 % Amplitudes will vary
from 1
% to 100
x ¼ k*sin(t); % Generate a 1 cycle sine
wave
y ¼ process_x(x); % Input sine to process
output(k) ¼ max(y); % Save max value of
output
Example 2.3.3: There is a MATLAB function on the
disk that simulates some unknown process. The func-
tion is called process_x and takes an input variable,
x, and generates a variable signal, y. (The Courier
typeface is used to indicate a MATLAB variable, func-
tion, or code.) The function expects the input to be
a signal represented by an array of numbers (as if x were
a digitized signal), and produces an output signal that
will be an array of number the same length as the input.
We are to determine if process_x is a linear process
over an input stimulus range of 0 to 100. We can input
to the process any signal we desire and examine the
output.
end
plot (output); % Plot and label output
xlabel ('Input Amplitude');
ylabel ('Output Amplitude');
Analysis: Within the for-loop, the program generates
a one-cycle sine wave having the desired amplitude. The
amplitudes are incremented from 1 to 100 as the loop
progresses. The sine wave, stored as variable x, becomes
the input signal to process_x. The function produces
an output signal, y. The maximum value of the output
signal is found using MATLAB's max routine, and save in
variable array, output. When the loop completes, the
100 values of output are plotted.
The figure below shows one of the input signals (solid
curve) and the corresponding output (dashed curve)
produced by process_x. The input signal looks like
a sine function as expected, whereas the output looks like
a cosine function. This suggests that the process contains
a derivative operation. The output signal is also slightly
larger than the input signal.
Solution: Our basic strategy will be to input different
signals having values within the desired range and see if
the outputs are proportional. However, what is the best
signal to use? The easiest might be to input two or three
signals that have a constant value; for example, x ( t ) ¼ 1,
then x ( t ) ¼ 10, then x ( t ) ¼ 100, along with the negative
values. The output should be proportional. However,
what if the process contains a derivative operation? Al-
though the derivative is a linear operation, the derivative
of a constant is zero, and so we would get zero out for all
three signals. Similarly, if the process contains in-
tegrations, the output to a constant could be difficult to
Search WWH ::




Custom Search