WOLFRAM

電気工学

System Modelerを使うと,電気回路,パワーエレクトロニクス,電気機械を構築し,研究することができます.電気と機械のコンポーネントを組み合せて完全なシステムモデルを構築したり,解析タスクを実行して性能を測定したりできます.

Ball and Beam: Deploy Controller to Hardware

Implement the V-model for control system design, deployment and testing. Model your system in SystemModeler, then design a controller in the Wolfram Language. Use the Microcontroller Kit to generate automated code and deploy it into a microcontroller. Subsequently, validate your standalone model with the control targets. This example shows how to design, deploy and test a PID controller to balance a ball on a beam.

この例を実行するためには以下が必要です.

System ModelerとMathematicaの最新版

どちらかお選びください.

無料評価版を
取得する
ダウンロードを
続行する

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.

Model of 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.

Schematic representation of the PID controller and the related hardware components.

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.

Ball and beam model in action.