You can use Monitor and Tune feature (also called External mode) to tune parameters of a model running on your Android™ device and monitor the effects of different parameter values in real time. Monitor and Tune feature helps you:
Find the optimal values for performance. This process is called parameter tuning.
Accelerate parameter tuning because you do not have to rerun the model each time you change parameters.
Develop and validate your model using the actual data and hardware for which it is designed.
This workflow lists the tasks required to tune parameters:
In the model on your host computer, click Monitor & Tune from Hardware tab .
(Optional) Place sink blocks in your model and connect them to signals.
Run the model on the Android device in Signal Monitoring and Parameter Tuning feature.
(Optional) Observe signals from Android device using Display or Scope blocks on your host computer.
Change and apply parameter values in the model on your host computer.
Find the optimal parameter values by adjusting and observing the results.
Save the new parameter values, stop Signal Monitoring and Parameter Tuning feature, and save the model.
Verify that you can run your Simulink® model on the Android device, as described in Run Model on Android Devices.
Verify that the Android device is connected to a Wi-Fi network, and to the USB port on the Host computer.
Set the Stop time parameter, located in the Simulation tab of toolstrip.
The default value is
10.0 seconds. To run the model for
an indefinite period, enter
(Optional) To log data from the model while it is running on the Android device:
If it is locked, unlock the screen on the Android device.
Unlocking the screen enables the device to send sensor data back to the host computer. Otherwise, with the screen locked, the host computer receives zeros instead of real sensor data.
To start the simulink, in the Simulation tab, click the Run button.
If your model does not contain a sink block, the Message Viewer displays a warning that “No data has been selected for uploading.” You can disregard this warning or add a sink block to the model.
After several minutes, Simulink starts running your model on the device.
External mode uses the Wi-Fi connection to exchange data with the host computer.
In the model on your host computer, change parameter values.
Observe the corresponding changes in the model running on the hardware.
Any Simulink sink blocks in your model receive data from the hardware and display it on your host computer.
External mode increases the processing burden of the model running on the device. If the software reports an overrun, disable External mode.
To stop signal monitoring and parameter tuning, click the Stop button located in the Hardware tab of the toolstrip.
If the Stop time parameter is set to a specific number of seconds, signal monitoring and parameter stops when that time elapses.