Step III (In MATLAB)

 

Step to build Simulink model with RecurDyn Plant Block

1.  Run the MATLAB program.

2.  Change the working directory to the directory that includes the M file and RecurDyn model (the RDYN file).

 

Figure 1  Changing the working directory

 

3.  In the MATLAB command window, enter the name of M file.

 

Figure 2  Reserved variables from M file

 

4.  In the MATLAB command window, enter “rdblock”. Or “rdlib” (RecurDyn recommends the “rdblock” command. If the user wants to use “rdlib” command, RecurDyn has to be closed before starting the simulation.)

 

Figure 3  Entered rdlib or rdblock

 

5.  And then, a new Simulink window with RecurDyn Plant Block appears.

 

Figure 4  RecurDyn Plant Block

 

6.  Open the Simulink model (simouse.mdl).

7.  Drag and drop RecurDyn Plant Block on the opened Simulink model window.

8.  Construct the control algorithm as shown in Figure 5.

9.  Save the Simulink model.

 

Figure 5  Steps to design control algorithm