Automatic Control Principle MATLAB Experiment

Source: Internet
Author: User
1. Evaluate the transfer function
1. If the zero point, pole, and zero pole gain of the system are known, the transfer function of the system is obtained.

G = zpk ([], [0,-1,-2], 4)


 

Zero/pole/gain:

4

-------------

S (S + 1) (S + 2)

 

2. Obtain the molecular and denominator polynomial coefficients of the transferred function.

Num = 4;

Den = Conv ([1 0], [1 2]);

G = TF (Num, Den)


 

Transfer Function:

4

-----------------

S ^ 3 + 3 s ^ 2 + 2 S

 

Ii. system model described by State Equations

Four coefficients matrix A, B, C, and D based on the state equation

A = [-, 1; 0,-;, 0];

B = [0; 2; 0];

C = [2, 0, 0];

D = 0;

G = SS (A, B, C, D)

 


 

A =

X1 X2 X3

X1-2 0 1

X2 0-1 0

X3 0 1 0

 

B =

U1

X1 0

X2 2

X3 0

 

C =

X1 X2 X3

Y1 2 0 0

 

D =

U1

Y1 0

 

Continuous-time model.

3. interchange between different models
1.
G1 = zpk ([], [0,-1,-2], 4) % Model 1

G2 = SS (G1) % Model 2

 


 

Zero/pole/gain:

4

-------------

S (S + 1) (S + 2)

 

 

A =

X1 X2 X3

X1 0 1 0

X2 0-1 1 1

X3 0 0-2

 

B =

U1

X1 0

X2 0

X3 2

 

C =

X1 X2 X3

Y1 2 0 0

 

D =

U1

Y1 0

 

Continuous-time model.

2.

A = [-, 1; 0,-;, 0];

B = [0; 2; 0];

C = [2, 0, 0];

D = 0;

G1 = SS (A, B, C, D) % Model 1

G2 = TF (G1) % Model 2

 


 

A =

X1 X2 X3

X1-2 0 1

X2 0-1 0

X3 0 1 0

 

B =

U1

X1 0

X2 2

X3 0

 

C =

X1 X2 X3

Y1 2 0 0

 

D =

U1

Y1 0

 

Continuous-time model.

 

Transfer Function:

4

-----------------

S ^ 3 + 3 s ^ 2 + 2 S

 

4. Establish complex mathematical models

For a negative feedback system, the forward channel is composed of G1 and G2, and the feedback channel is represented by H.

G1 = TF ([1 7 24], [1 10 35 50 24]);

G2 = TF ([10, 5], [1, 0]);

H = TF ([1], [0.01, 1]);

GC = feedback (G1 * G2, H)

 


 

Transfer Function:

 

0.1 s ^ 5 + 10.75 s ^ 4 + 77.75 s ^ 3 + 278.6 s ^ 2 + 361.2 S + 120

------------------------------------------------------------------

0.01 s ^ 6 + 1.1 s ^ 5 + 20.35 s ^ 4 + 110.5 s ^ 3 + 325.2 s ^ 2 + 384 S + 120

 

5. Stability Analysis

Find all the vertices of the system and check whether there are vertices with real parts greater than or equal to 0.

1.

G1 = TF ([1 7 24], [1 10 35 50 24]);

EIG (G1) % method 1

Roots (g1.den {1}) % method 1

G2 = zpk (G1 );

G2.p {1} % method 1


 

Ans =

-4.0000

-3.0000

-2.0000

-1.0000

Ans =

-4.0000

-3.0000

-2.0000

-1.0000

Ans =

-4.0000

-3.0000

-2.0000

-1.0000

2.

G = zpk ([], [0-1-2], 4); % 4 is the Open Loop Gain

GC = feedback (G, 1 );

Pole (GC)

 

Ans =

-2.7963

-0.1018 + 1.1917i

-0.1018-1.1917i

 

When the open-loop gain is 8, the system becomes unstable.

Ans =

0.0832 + 1.5874i

0.0832-1.5874i

-3.1663

The larger the open-loop gain, the more unstable the closed-loop system is.

6. Solving temporal response
1.

G = TF (100, [1 4 100]);

T = 0: PI/50: 2 * PI;

U = sin (t );

Y = lsim (G, U, t );

Plot (T, Y, T, U)

 


 

2.

STEP (g) % unit step response


3.

Impulse (g) % Unit Impulse Response


 

 

VII. Root track analysis
1.

G = zpk ([], [0-1-2], 1 );

Rloocus (g)

 


2.

G = TF (1, [Conv ([1, 3], [1, 2]), 0]);

Rloocus (g)


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.