Electrical Engineering
Use System Modeler to construct and study electrical circuits, power electronics, and electrical machinery. Combine electrical and mechanical components to build complete system models. Perform analysis tasks and measure performance.
Ball and Beam: Deploy Controller to Hardware
To run this example, you'll need
The latest versions of System Modeler and Mathematica.
Please make a selection:
Get afree trial Continue
with download
The Model
The ball and beam arrangement is modeled in SystemModeler to get a linearized state-space representation of the relationship between the position of the ball and the beam angle. This relationship is then used to auto-tune the parameters of the PID controller in the Wolfram Language.
Model the system in SystemModeler
Model the ball and beam arrangement.

Calibrate Components
The various hardware components are calibrated, and their transfer function is obtained. Subsequently, these transfer functions are connected, and a feedback model with the PID controller is designed.
Calibrate your components
Use the ModelPlug library to calibrate the servo, IR sensor and potentiometers.

Deploy to Hardware
Define your machine-specific settings to communicate with the Arduino UNO board and set up the servo library and connections to pins on the Arduino. Finally, define a sampling period and deploy the controller into the Arduino UNO board.
Deploy controller to hardware in the Wolfram Language
Use the Microcontroller Kit to deploy the controller to hardware.
Wolfram System Modeler
Try
Buy
System Modeler is available in English
and Japanese
on Windows, macOS & Linux »
Questions? Comments? Contact a Wolfram expert »