EGSAN
EGSAN
(2)
where m is the equivalent mass of the system, c is the damping
ratio, k is the spring stiffness, and f(t) is the forcing function in
the x-direction.
Figure E2-1 In this example I will illustrate how to use Simulink to simulate
the response of this system to unit step input.
STEP 1 In Simulink, create a new model window (CTRL+N) and drag the
following blocks from the Simulink library window:
(3)
Based on Eqn 3, we connect the blocks in the diagram as shown in
Figure E2-2. Use CTRL+I and CTRL+R to flip and rotate the blocks as
necessary (select the block first then execute the key sequence). Note
that you can use CTRL+right mouse button to create branches of the
connecting lines. Don't worry about the parameter values and the signs
for these blocks at this point as we'll take care of this in STEP 3. Just
get them connected first.
Figure E2-2
STEP 3 Enter the values of the parameters for each block. In this example, we
will set m = 2.0; c=0.7; k=1. You are encouraged to try different values
and observe the system's response to step input.
STEP 4 Run the simulation by clicking on the button (alternately you may
use keyboard command CTRL+T ). The screenshot of the output from
the Scope block is show in Figure E2-3.
Figure E2-3
To see how you can use the output from the "simout" block (by the
way, you may name the block whatever you wish), go to Matlab
Command window and typ
>> who
Now, you may create a plot of the system response identical to that
shown in the Scope output. The command for creating this plot is:
>>plot(time,simout);grid
Note that the outout format used in the example above is matrix type.
The output sent to workspace can be used for further analysis and
storage in ascii format. Output to workspace allows more options in
plot presentation and further data analysis as the arrays are in ascii
format.