WOLFRAM SYSTEM MODELER
InversionControlledCraneCrab crane with a model inversion control setup |
SystemModel["IndustryExamples.HeavyEquipment.ModelInversionControl.InversionControlledCrane"]
This model requires the PlanarMechanics library.
This model shows an inversion-based controller that is used to control a hoist crane.
The hoist crane is modeled using the PlanarMechanics Modelica library. Force is applied to a prismatic joint that pushes a crab along a one-dimensional beam. Attached to the crab is a dampened revolute joint that connects to the load through a stiff rod.
In the controller, a filtered pulse is used as a reference signal to control the position of the load. Using a constrained inverse block, the force that should be applied to the crab can be calculated from the reference signal.
To simulate the model, click the Simulate button:
Explore how the crane is positioned relative to its reference position by examining the plot that is automatically displayed after simulating the model. The first variable describes the actual position of the crane, while the second describes the reference position that is input into the controller.
PlanarMechanics and Multibody systems have visualizers to show what a real-world system would look like.
To show a 3D animation of the model, click the Animation button:
Use your mouse or trackpad to drag the animation to a good angle and zoom in with your scroll wheel or by using the trackpad.
Changing parameters for the simulation can be done rapidly in Simulation Center. The crane_I parameter determines the "real" inertia of the load. The model used inside the controller also has an inertia parameter that determines what the controller expects the load inertia to be. When the real and the expected inertia differ from each other, the controller will not be able to accurately predict what force to apply to the crane.
Try changing the inertia for the load and see how this affects the controller:
You should now see the graph below:
In order to get the full experience of this example, you need a desktop Wolfram Language product. A free trial download is available at www.wolfram.com/mathematica/trial/
For the full example, open the accompanying notebook ModelInversionControl.nb.
pulsePeriod |
Value: 20 Type: Time (s) Description: Period of the input pulse, position switches every half period |
---|---|
inputFilter |
Value: 0.2 Type: Frequency (Hz) Description: Cut-off frequency of the input filter, higher values give sharper movement |
crane_I |
Value: 0.5 Type: Inertia (kg⋅m²) Description: Inertia of the physical crane body |
craneModel_I |
Value: 0.5 Type: Inertia (kg⋅m²) Description: Inertia of the inverted crane body model. |
useCorrectiveController |
Value: false Type: Boolean Description: Complement open loop control with closed loop corrective controller. |
k_PID |
Value: 100 Type: Real Description: Proportional gain of corrective controller. |
Ti_PID |
Value: 100 Type: Real Description: Time constant of integrative part of corrective controller. |
Td_PID |
Value: 0.1 Type: Real Description: Time constant of derivative part of corrective controller. |
initType |
Value: Modelica.Blocks.Types.Init.SteadyState Type: Init Description: Type of initialization used for PID controller |
filter |
Type: Filter Description: Input signal filter, smoothing the signal. |
|
---|---|---|
reference |
Type: Pulse Description: Load position reference, going back and forth between 0 and 1 meters along the X-axis. |
|
planarWorld |
Type: PlanarWorld Description: Coordinate system. |
|
crane |
Type: CraneCrabDamped Description: Crab crane setup. |
|
feedback |
Type: Feedback Description: Corrective closed loop feedback of crane position. |
|
invertedModel |
Type: InverseBlockConstraints Description: Crab crane inversion block. Open loop control. |
|
feedbackController |
Type: PID Description: Corrective PID-controller. |
|
add |
Type: Add Description: Input force sum. |
|
craneControlModel |
Type: CraneCrabDamped Description: Crab crane model. |