Step Three – Setup MATLAB
First you will start MATLAB, and then you will create a simulink model for control system design. You will use the antenna model files from the last section, plus several additional files.
To start MATLAB:
1. Start MATLAB in the same directory as the one the model and Simulink files reside.
2. Set up the MEX utility, if not already set up.
Enter
mex -setup from the MATLAB command window, and then select the appropriate compiler. (see
http://www.mscsoftware.com/Support/Platform-Support/Default.aspx under Hardware & Software Requirements for a list of supported compilers)
3. At the prompt (>>), type ant_test.
MATLAB displays:
%%%INFO:Adams plant actuators names:
1 control_torque
%%%INFO:Adams plant sensors names:
1 rotor_velocity
2 azimuth_position.
4. At the prompt, type who to view the list of variables defined in the files.
MATLAB displays the following relevant information:
ADAMS_cwd | ADAMS_inputs | ADAMS_poutput | ADAMS_sysdir |
ADAMS_exec | ADAMS_mode | ADAMS_prefix | ADAMS_uy_ids |
ADAMS_host | ADAMS_outputs | ADAMS_solver_type | |
ADAMS_init | ADAMS_pinput | ADAMS_static | |
You can check any of the above variables by entering them at the MATLAB prompt. For example, if you enter Adams_outputs, MATLAB displays all of the outputs defined for your mechanism. For example:
ADAMS_outputs = rotor_velocity!azimuth_position