主要内容

magball Simulink 模型

R2026b

Simulink® 模型 magball 包括一个单环反馈系统中的非线性 Magnetic Ball Plant。

Simulink block diagram of the magball model. A Desired Height constant block with value 0.05 provides the Reference Signal to a summing junction, which computes the Error Signal by subtracting the feedback. The Error Signal passes through a Controller block, which outputs a voltage V to the Magnetic Ball Plant block. The plant outputs the ball height h, which feeds back to the summing junction and also connects to a Scope block.

Magnetic Ball Plant 子系统如下图所示。

Simulink block diagram of the Magnetic Ball Plant subsystem. The upper path models the mechanical dynamics: a Gravity constant of 9.81 feeds into a summing junction along with a magnetic force term computed from a beta/m gain and a Divide block. The result integrates twice through dhdt and height integrator blocks to produce the output h. The lower path models the electrical dynamics: the input voltage V passes through a 1/L gain and a summing junction with an R/L feedback term, then integrates through a Current integrator block. The current is squared and divided by the height to compute the magnetic force that couples the two paths.

Magnetic Ball Plant 模型表示质量为 M 的铁球。此球在重力 Mg 和感应磁力 βi2h 的作用下运动。感应磁力中存在平方项,这导致生成一个非线性被控对象。

如下图所示,电路中的电感器产生感应磁力。此电路还包括电压源和电阻器。

Schematic diagram of the magnetic ball system. An electric circuit on the left contains a voltage source V in series with a resistor R and an inductor L, with current i flowing through the circuit. Below the inductor, an iron ball is suspended at height h. An upward arrow represents the induced magnetic force beta i squared over h, and a downward arrow represents the gravitational force Mg acting on the ball.

下表描述 Magnetic Ball Plant 子系统的变量、参数、微分方程、状态、输入和输出。

变量

h 是球的高度。

i 是电流。

V 是电路中的电压。

参数

M 是球的质量。

g 是重力加速度。

β 是与磁力有关的常量。

L 是线圈的电感。

R 是电路的电阻。

微分方程

球的高度 h 用以下方程描述:

Md2hdt2=Mg−βi2h

电路中的电流 i 用以下方程描述:

Ldidt=V−iR

状态

h

dh/dt

i

输入V
输出h

另请参阅

主题