WOLFRAM

Other

Use examples from a wide range of application areas to learn about modeling and simulation with System Modeler and the Modelica language.

Depth Control of a Submarine

Navigating quickly from one depth to another is an operational requirement for a submarine. For stealth operations, it is important that there be no oscillations during this motion. The following example shows how to design a controller for such applications.

To run this example, you'll need

The latest versions of System Modeler and Mathematica.

Please make a selection:

Get a
free trial
Continue
with download

Model of a Submarine

The submarine adjusts its depth by varying its weight. The weight varies by adjusting the volume of water stored in the submarine’s ballast tanks.

Diagram of the submarine model.

Easily Linearize around the Equilibrium Point

The nonlinear submarine model is linearized around its equilibrium point using the system modeling functionality.

State-space representation of the linearized model.

Quickly Design and Connect a Controller

A controller is designed using pole placement gains such that the closed-loop poles stabilize the system. The controller is then automatically connected to the nonlinear submarine model.

Wolfram Language workflow to design and connect the controller with the nonlinear submarine model.

Response of the Controlled Submarine

The ballast tanks of the submarine take in water and the average density of the submarine increases, thus sinking the submarine. The controller tracks the reference signal, and the submarine reaches the specified depth without any oscillations.

In the left plot, the blue curve represents the average density of the submarine. In the right plot, the blue curve represents the reference depth and the orange curve represents the actual depth of the submarine.

Streamlined Design of Tracking Controllers

Depth control of a submarine using the improved control system functionality.