0% found this document useful (0 votes)
13 views15 pages

Final Project-Modeling

The final report details the modeling and simulation of a system using Matlab/Simulink, including the development of a mathematical model, controller design, and system simulation. It covers the identification of system parameters and compares the performance of systems with and without controllers, highlighting improvements in stability and response time. The report concludes that the designed controller enhances system performance significantly.

Uploaded by

22142002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views15 pages

Final Project-Modeling

The final report details the modeling and simulation of a system using Matlab/Simulink, including the development of a mathematical model, controller design, and system simulation. It covers the identification of system parameters and compares the performance of systems with and without controllers, highlighting improvements in stability and response time. The report concludes that the designed controller enhances system performance significantly.

Uploaded by

22142002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUẬT TP.

HCM

KHOA ĐÀO TẠO QUỐC TẾ

FINAL REPORT

MODELING AND SIMULATION USING COMPUTER

Student Name Student ID


Trương Quốc Phú 22151036
Trần Lê Tuấn Anh 22142002

Thành phố Hồ Chí Minh, tháng 12, năm 2024


Question 1: Modeling
a) Build a mathematical model
b) Perform simulation using Matlab/Simulink
c) Design a controller for the above system
d) Simulate the system with the controller using Matlab and Simulink.

SOLUTION
a) Build a mathematical model

di 1
L + Ri + ∫ i dt =e i
dt C
1
C
∫ i dt=e 0
Taking the Laplace transform of this Equation, assuming zero initial conditions, we
obtain:
1 1
LsI ( s )+ RI ( s ) + I ( s )=Ei ( s )
C s
1 1
I ( s )=E0 ( s )
Cs

If e i is assumed to be the input and e 0 is the output, then the transfer function of this
system is found to be:
E0 ( s ) 1
=
Ei ( s ) LC s + RCs+1
2

Find state-Space model of this system: First, note that the differential equation for the
system can be obtained from the transfer function Equation as:
R 1 1
ë 0 + ė 0 + e 0= e
L LC LC i
Then by defining state variables by:

1
x 1=e 0

x 2=ė 0

And the input and output variables by:


u=ei

y=x 1=e0

We obtain:

[][ ][ ] [ ]
0 1 0
ẋ1 x1
= −1 −R + 1 u
ẋ2 x2
LC L LC

And

[ y ] =[ 1 0 ]
[]
x1
x2

These two Equations give a mathematical model of the system in state space.
b) Perform simulation using Matlab/Simulink
Let:
R=50
L=0.1
C=0.000001

[][ ][ ] [ ]
0 1 0
ẋ1 x1
= −1 −50 + 1 u
ẋ2 x2
0.1× 0.000001 0.1 0.1 × 0.000001

2
Sine:

Square

3
c) Design a controller for the above system

4
d) Simulate the system with the controller using Matlab and Simulink.
Sine:

Square:

5
-The controller is designed to improve characteristics such as stability, transient time,
robustness, and reduce steady-state errors.
-Simulations for systems with controllers often exhibit faster response, less oscillation,
and stable convergence to the desired value.

Question 2: Identification
• Select model
• Build the datasheet
• Use Matlab's Identification tool to find mathematical models
• Use Matlab's Parameter estimation to identify system parameters.
• Simulation comparison between recognition model and original model
• Design Controller
• System simulation with controller (Matlab/Simulink).

SOLUTION
• Select model:

In this Figure we assume that displacements x i , x 0, and y are measured from their
respective steady-state positions. Then the Equations of motion for the mechanical
systerm shown in this Figure are:

6
b 1 ( ẋ i− ẋ 0 ) +k 1 ( x i−x 0 )=b2 ¿

b 2 ( ẋ 0− ẏ ) =k 2 y

By taking the Laplace transforms of these two Equations, assunming zero initial
conditions, we have:
b 1 [ s X i ( s )−s X 0 ( s ) ] + k 1 [ X i ( s ) −X 0 ( s ) ]=b 2 [ s X i ( s )−sY ( s ) ]

b 2 [ s X i ( s )−sY ( s ) ]=k 2 Y ( s )

If we eliminate Y ( s ) from the last two equation, then we obtain:

b2 s X 0 ( s )
b 1 [ s X i ( s )−s X 0 ( s ) ] + k 1 [ X i ( s ) −X 0 ( s ) ]=b 2 s X 0 ( s )−b2 s
b2 s +k 2

Or
b2 s
(b ¿ ¿ 1 s+ k 1) X i ( s )=(b1 s +k 1 +b 2 s−b2 s )X ( s ) ¿
b2 s +k 2 0

Hence the transfer function can be obtained as:


b1 b2
( s+1)( s+1)
X0 (s ) k1 k2
=

( )( )
Xi (s ) b1 b b
s+1 2 s+1 + 2 s
k1 k2 k1

• Build the datasheet

7
• Use Matlab's Identification tool to find mathematical models

8
Collect data:

9
New set of parameters:

• Use Matlab's Parameter estimation to identify system parameters.

10
• Simulation comparison between recognition model and original model

11
• Design Controller
PID:

12
• System simulation with controller (Matlab/Simulink).

13
-Systems without controllers: Simulations often show large, difficult-to-control
fluctuations, or failure to reach steady state in a short time.
-System with controller: Simulations demonstrate that the controller significantly
improves performance parameters. In particular, with the mentioned PID set, the system is
able to converge faster and reach the desired steady state.

14

You might also like