# Course Simulation Project -- Inverted Pendulum with Fuzzy Controller
In this project, a inverted pendulum system controled by a simple fuzzy controller is simulated in the Matlab environment. The main refereence is the book "*Fuzzy Control*" [1]. The main purpose is to evaluate effects of different parameters. There are three types of files: supported functions, simulation functions and simulation results.
# Supported Functions
1. Model of the inverted pendulum system `InvertedPendulum.m`: Calculate the current enviroment values based on values of previous time step;
2. Fourth order Runge Kutta method `ODE_RK.m`: Solve the ODE by using the fourth order Runge Kutta method. It is used in the `InvertedPendulum.m`;
3. Fuzzy Controller `FuzzyController.m`: Based on the user's settings and measured values to calculate the force which will transferred to the inverted pendulum system. It is only contains two inputs and one outputs. One input is the angle error. Another input is the angle speed error. The output is the force.
4. `ConvertEps2Pdf.sh`: Convert simulation results from eps figures to pdf figures. Only for Mac OS System. How to use it: In terminal, run `chmod +x ./ConvertEps2Pdf.sh;./ConvertEps2Pdf.sh`
# Simulation Functions
1. `test_membershipfunction.m`: Plot the membership functions based on the user's settings. Example results are `e_membershipfunction.pdf`, `de_membershipfunction.pdf` and `F_membershipfunction.pdf` in `Test_Results` floder.;
2. `test_InvertedPendulum_without_controller.m`: Test the model of the inverted pendulum. No control is performed. Example results are `without_control_1.pdf` and `without_control_2.pdf` in `Test_Results` floder.;
3. `test_InvertedPendulum_with_fuzzy_controller.m`: Simulate the fuzzy control process of the inverted pendulum. Example results are `force_**.pdf` and `angleandposition_**.pdf` in `Test_Results` floder.
4. `Diff_Parameters_Diff_Results_triangle_min.m`: This file is to show the simulation results for effects of different parameters. Simulation results are in the `Simulation_Results_triangle_min` floder (Membership functions are triangular. And use minimum to represent the premise and implication and COG classification)
4. `Diff_Parameters_Diff_Results_Gaussian_product.m`: This file is to show the simulation results for effects of different parameters. Simulation results are in the `Simulation_Results_Gaussian_product` floder (Membership functions are Gaussian. And use product to represent the premise and implication and COG classification)
5. `Diff_Parameters_Diff_Results_49rules.m`: For the previous simulations, only 25 rules are used. This simulation is to show the effect of rule base. The number of rules is increased to 49.
# Simulation Results
1. There are some example results for testing simulation functions in the folder `Test_Results`. These example all follows the section "2.4 Simple Desgin Example: The Inverted Pendulum" of [1].
2. Simulation results of `Diff_Parameters_Diff_Results_triangle_min.m` are all in the folder `Simulation_Results_triangle_min`. These simulations also follows the section "2.4 Simple Desgin Example: The Inverted Pendulum" of [1].
3. Simulation results of `Diff_Parameters_Diff_Results_Gaussian_product.m` are all in the folder `Simulation_Results_Gaussian_product`. These simulations are for "2.10 Design Problem 2.1" of [1].
4. Simulation results of `Diff_Parameters_Diff_Results_49rules.m` are all in the folder `Simulation_Results_49rules`. These simulations are for "2.10 Design Problem 2.1" of [1].
# Just for Fun
`GUI_InvertedPendulumSimulation.m` is only for fun. ( ̄┰ ̄)
In MATLAB R2020b (Windows), the GUI is tested successfully.
![GUI Screenshot](https://raw.githubusercontent.com/pikipity/Course-Project--Inverted-Pendulum-with-Fuzzy-Controller/master/GUI%20screenshot.PNG)
# Reference
[1] K. M. Passion and S. Yurkovich, *Fuzzy Cntrol*. Menlo Park, CA: Addison-Wesley, 1998.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随
资源推荐
资源详情
资源评论
收起资源包目录
毕业设计&课设-基于模糊控制器的倒立摆Matlab仿真.zip (143个子文件)
Control_Surface_NotUniform_Center.eps 1.85MB
Control_Surface_Uniform_Center.eps 1.85MB
Control_Surface_NotUniform_Center.eps 726KB
Control_Surface_NotUniform_Center.eps 726KB
Control_Surface_Uniform_Center.eps 726KB
Control_Surface_Uniform_Center.eps 726KB
g0-1_g1-0dot1_h-1_AngleAndPosition.eps 67KB
g0-2_g1-0dot1_h-5_AngleAndPosition.eps 67KB
g0-2_g1-1_h-5_AngleAndPosition.eps 66KB
g0-2_g1-0dot1_h-1_AngleAndPosition.eps 66KB
g0-1_g1-1_h-1_AngleAndPosition.eps 66KB
g0-2_g1-2_h-5_AngleAndPosition.eps 65KB
g0-1_g1-0dot1_h-1_AngleAndPosition.eps 65KB
g0-1_g1-0dot1_h-1_AngleAndPosition.eps 65KB
g0-2_g1-0dot1_h-1_AngleAndPosition.eps 64KB
g0-2_g1-1_h-1_equal_g1-0dot1_AngleAndPosition.eps 64KB
g0-2_g1-0dot1_h-1_AngleAndPosition.eps 64KB
g0-10_g1-2_h-5_AngleAndPosition.eps 64KB
g0-1_g1-1_h-1_AngleAndPosition.eps 64KB
g0-1_g1-1_h-1_AngleAndPosition.eps 64KB
g0-2_g1-0dot1_h-10_NotUniform_NoForce_AngleAndPosition.eps 63KB
g0-2_g1-0dot1_h-10_Uniform_NoForce_AngleAndPosition.eps 63KB
g0-2_g1-0dot1_h-1_equal_h-5_AngleAndPosition.eps 63KB
g0-2_g1-0dot1_h-5_AngleAndPosition.eps 63KB
g0-2_g1-0dot1_h-5_AngleAndPosition.eps 63KB
g0-20_g1-2_h-5_Force_NotUniform_AngleAndPosition.eps 63KB
g0-20_g1-2_h-5_AngleAndPosition.eps 63KB
g0-2_g1-0dot1_h-5_Force_Not_Uniform_AngleAndPosition.eps 63KB
g0-2_g1-0dot1_h-10_Uniform_Force_AngleAndPosition.eps 63KB
g0-20_g1-2_h-5_Force_Uniform_AngleAndPosition.eps 63KB
g0-2_g1-0dot1_h-10_NotUniform_Force_AngleAndPosition.eps 63KB
g0-2_g1-0dot1_h-5_Force_Uniform_AngleAndPosition.eps 63KB
g0-2_g1-0dot1_h-5_ForceAndAcceleration.eps 54KB
g0-1_g1-0dot1_h-1_ForceAndAcceleration.eps 53KB
g0-2_g1-1_h-5_ForceAndAcceleration.eps 53KB
g0-1_g1-1_h-1_ForceAndAcceleration.eps 52KB
g0-2_g1-0dot1_h-1_ForceAndAcceleration.eps 52KB
g0-2_g1-0dot1_h-1_ForceAndAcceleration.eps 51KB
g0-2_g1-1_h-1_equal_g1-0dot1_ForceAndAcceleration.eps 51KB
g0-2_g1-0dot1_h-1_ForceAndAcceleration.eps 51KB
g0-2_g1-0dot1_h-5_Force_Uniform_ForceAndAcceleration.eps 51KB
g0-2_g1-0dot1_h-10_Uniform_Force_ForceAndAcceleration.eps 51KB
g0-20_g1-2_h-5_Force_Uniform_ForceAndAcceleration.eps 51KB
g0-20_g1-2_h-5_Force_NotUniform_ForceAndAcceleration.eps 51KB
g0-2_g1-0dot1_h-10_NotUniform_NoForce_ForceAndAcceleration.eps 51KB
g0-2_g1-0dot1_h-10_NotUniform_Force_ForceAndAcceleration.eps 51KB
g0-2_g1-0dot1_h-10_Uniform_NoForce_ForceAndAcceleration.eps 51KB
g0-2_g1-0dot1_h-1_equal_h-5_ForceAndAcceleration.eps 51KB
g0-2_g1-0dot1_h-5_ForceAndAcceleration.eps 51KB
g0-2_g1-2_h-5_ForceAndAcceleration.eps 51KB
g0-2_g1-0dot1_h-5_ForceAndAcceleration.eps 51KB
g0-1_g1-0dot1_h-1_ForceAndAcceleration.eps 51KB
g0-2_g1-0dot1_h-5_Force_Not_Uniform_ForceAndAcceleration.eps 51KB
g0-20_g1-2_h-5_ForceAndAcceleration.eps 50KB
g0-1_g1-1_h-1_ForceAndAcceleration.eps 50KB
g0-1_g1-0dot1_h-1_ForceAndAcceleration.eps 50KB
g0-1_g1-1_h-1_ForceAndAcceleration.eps 50KB
g0-10_g1-2_h-5_ForceAndAcceleration.eps 50KB
.gitattributes 378B
GUI_InvertedPendulumSimulation.m 34KB
Diff_Parameters_Diff_Results_triangle_min.m 21KB
Diff_Parameters_Diff_Results_Gaussian_product.m 15KB
Diff_Parameters_Diff_Results_49rules.m 14KB
FuzzyController.m 7KB
test_InvertedPendulum_with_fuzzy_controller.m 7KB
test_membershipfunction.m 6KB
test_InvertedPendulum_without_controller.m 3KB
InvertedPendulum.m 3KB
ODE_RK.m 928B
README.md 4KB
Control_Surface_NotUniform_Center.pdf 307KB
Control_Surface_Uniform_Center.pdf 306KB
without_control_2.pdf 202KB
without_control_1.pdf 143KB
angleandposition_g0-1_g1-0dot1_h-1.pdf 118KB
angleandposition_g0-2_g1-0dot1_h-1.pdf 110KB
Control_Surface_NotUniform_Center.pdf 110KB
Control_Surface_NotUniform_Center.pdf 110KB
Control_Surface_Uniform_Center.pdf 110KB
Control_Surface_Uniform_Center.pdf 109KB
angleandposition_g0-2_g1-0dot1_h-5.pdf 102KB
force_g0-1_g1-0dot1_h-1.pdf 101KB
force_g0-2_g1-0dot1_h-1.pdf 98KB
e_membershipfunction.pdf 92KB
force_g0-1_g1-1_h-1.pdf 90KB
force_g0-2_g1-0dot1_h-5.pdf 88KB
de_membershipfunction.pdf 77KB
angleandposition_g0-1_g1-1_h-1.pdf 68KB
F_membershipfunction.pdf 66KB
g0-2_g1-0dot1_h-5_AngleAndPosition.pdf 52KB
g0-2_g1-1_h-5_AngleAndPosition.pdf 49KB
g0-2_g1-0dot1_h-1_AngleAndPosition.pdf 49KB
g0-2_g1-0dot1_h-5_ForceAndAcceleration.pdf 46KB
g0-1_g1-0dot1_h-1_AngleAndPosition.pdf 44KB
g0-1_g1-1_h-1_AngleAndPosition.pdf 43KB
g0-1_g1-0dot1_h-1_AngleAndPosition.pdf 41KB
g0-2_g1-0dot1_h-5_Force_Uniform_AngleAndPosition.pdf 40KB
g0-20_g1-2_h-5_Force_Uniform_AngleAndPosition.pdf 39KB
g0-2_g1-2_h-5_AngleAndPosition.pdf 39KB
g0-2_g1-1_h-5_ForceAndAcceleration.pdf 39KB
共 143 条
- 1
- 2
资源评论
毕业小助手
- 粉丝: 2023
- 资源: 1712
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功