# Automatic Depth Control System For A Robot Submarine

ECE350

Summer 2014

Automatic Depth Control System

For A

Robot Submarine

Background:

An automatic depth control system for a robot submarine is shown below. When the gain of the stern plane actuator is one, the vertical velocity is 25m/s.

Part One: transfer function of system in terms of the gain K. H(S) =Y(S)/R(S) =

H(S) =

When K=1

H(S) =

Part Two: differential equation relating input and output.

Part Three:

The transfer function of this system contains the constant K (gain) as one of its parameters. In this project we are simulating the step response for K=0.1, K=10 and K=100. The effects of the varying gains will be analyzed by plotting the input, output and error of the system for each of the three different gains.

When K=0.1

H(S) =

This transfer function is modeled by the following Simulink diagram.

Graph of Input and Output for K=0.1

Graph of Error signal

When K=10

H(S) =

This transfer function is modeled by the following Simulink diagram.

Graph of Input and Output when K=10.

Graph of error signal when K=10

When K=100

H(S) =

This transfer function is modeled by the following Simulink diagram.

Graph of input and output when K= 100.

Graph of error signal when K=100

Part Four:

In this section of the project we determine if the system reaches the desired steady state and if so how long does it take. We will also determine poles for and specify which systems are stable. Then I will make a recommendation of which K value to use.

When K=0.1

The poles of this system and the graph are found using the following MATLAB code: >> H=tf([0.1 0.2 0.1],[1.2 0.5 1.4 0.1]);

>> iopzmap(H);

>> poles=roots([1.2 0.5 1.4 0.1])

poles =

-0.1718 + 1.0545i

-0.1718 - 1.0545i

-0.0730 + 0.0000i

Since all the poles are on the left hand side, this system is stable. Based on the graph generated by the Simulink model the system takes at least 10 seconds to reach the desired steady state.

When K=10

The poles and graph of this system are found by using the following MATLAB code:

>> H=tf([10 20 10],[21 50 41 10]);

>> iopzmap(H);

>> poles=roots([21 50 41 10])

Poles=

-0.9783 + 0.4062i

-0.9783 - 0.4062i

-0.4244 + 0.0000i

Since all the poles are in the left hand plane this system is stable. Based on the graph of the Simulink model this system reaches its desired steady state around 5.5 seconds. When K=100

The poles and graph of this system are found by using the following MATLAB code: >> H=tf([100 200 100],[201 500 401 100]);

>> iopzmap(H);

>> poles=roots([201 500 401 100])

Poles=

-0.9996 + 0.1395i

-0.9996 - 0.1395i

-0.4884 + 0.0000i

Since all the poles are in the left hand plane, the system is stable. Based on the graph of the Simulink model the system reaches its desired steady state after 4.5 seconds.

Conclusion:

I would recommend a gain of 100 (k=100) because it reaches its desired steady state the quickest during the step response.

Please join StudyMode to read the full document