<< Chapter < Page Chapter >> Page >
Đây là giáo trình về symbolic và simulink

Mục tiêu

Hiểu một cách cơ bản về hai công cụ mạnh và hữu hiệu của Matlab, đó là Symbolic và Simulink, để từ đó sinh viên có thể tự mình phát huy các chức năng cao hơn của hai công cụ này trong tính toán và mô phỏng hệ thống.

Tham khảo

[1].The Mathworks Inc., Matlab Notebook User’s Guide, 2003.

[2].Nguyễn Hoài Sơn - Đỗ Thanh Việt - Bùi Xuân Lâm, Ứng dụng MATLAB trong tính toán kỹ thuật, Tập 1, NXB ĐHQG Tp. HCM, 2000

[3]. Nguyễn Chí Ngôn, Bài thí nghiệm Kỹ thuật mô phỏng trong Điều khiển tự động, Bộ môn Viễn Thông&Tự động hóa, khoa Công nghệ thông tin, Đại học Cần thơ, 2002.

[4].Nguyễn Công Định, Phân tích và tổng hợp các hệ thống điều khiển bằng máy tính, NXB Khoa học và Kỹ thuật, 2002.

[5]. (External Link)

Thực hành

Symbolic và Simulink đều chứa thư viện chức năng rất phong phú, bài thí nghiệm này chỉ có thể đề cập đến những gì gọi là cơ bản nhất. Từ đó, sinh viên có thể tự mình nghiên cứu và phát triển tiếp.

Symbolic

Phiên bản mới nhất của Symbolic toolbox được Mathworks giới thiệu trong Matlab 6.5 vào tháng 6-2003. Đó là một thư viện toán học kiểu ký tự, được phát triển từ Symbolic Maple của trường Đại học Waterloo, Canada. Để có cái nhìn tổng quát về các chức năng của Symbolic, sinh viên hãy gõ:

>>help symbolic

Một số hàm thông dụng của Symbolic:

Tên hàm Chức năng Tên hàm Chức năng
diff Đạo hàm fourier Biến đổi Fourier
int Tích phân ifourier Biến đổi Fourier ngược
taylor Khai triển Taylor laplace Biến đổi Laplace
det Định thức của ma trận laplace Biến đổi Laplace ngược
numden Tử và mẫu của phân số ezplot Vẽ hàm,  plot
subs Thay biến sym bằng trị số ezpolar Vẽ hàm, tọa độ cực  polar
dsolve Giải phương trình vi phân ezmesh Vẽ mặt lưới  mesh
solve Giải phương trình đại số ezsurf Vẽ mặt  surf

Để biến đổi một số, một biến hay một đối tượng nào đó thành kiểu Symbolic ta có thể sử dụng một trong các cách sau:

>>s=sym(A)

>>x=sym(x)

>>syms x y z% khai báo kết hợp  x, y và z là biến symbolic

Tính đạo hàm bằng hàm diff của symbolic: Nếu S là biểu thức symbolic thì:

diff(S)đạo hàm của S theo biến tự do

diff(S,’v’)đạo hàm của S theo biến v

diff(S,’v’,n)đạo hàm cấp n của S theo v.

Ví dụ: Tính đạo hàm của y = sinx3.

>>syms x% khai bao x la bien kieu symbolic

>>y=sin(x^3);

>>z=diff(y)% dao ham cua y

z =

3*cos(x^3)*x^2% sinh vien kiem tra ket qua

>>pretty(z)% hien thi dang quen thuoc

3 cos(x3) x2

>>ezplot(x,y)% ve y theo x

Hình 3.1 – Vẽ đồ thị hàm symbolic

Tính vi phân bằng hàm int - Nếu S là biểu thức Symbolic thì:

int(S)tích phân không xác định của S theo biến mặc nhiên (muốn biết biến mặc nhiên này ta dùng hàm findsym).

int(S,v)tích phân không xác định của S theo v.

int(S,a,b)tích phân xác định của S trên cận [a,b]

int(S,v,a,b)tích phân xác định của S theo v trên cận [a,b]

Ví dụ: Tính 0 1 2x 2 19 + 12 x 2 7 x 2 + 1 dx size 12{ Int cSub { size 8{0} } cSup { size 8{1} } { { {2x rSup { size 8{2} } left ("19"+"12"x rSup { size 8{2} } right )} over {7 left (x rSup { size 8{2} } +1 right )} } } ital "dx"} {}

>>syms x

>>S=2*x^2*(19+12*x^2)/(7*(x^2+1))

>>y=int(S,x,0,1)% tích phân S theo x trên cận [0,1]

>>subs(y)% đổi sang kiểu số

Giải hệ phương trình bằng hàm solve:

>>help solve

>>syms x y

>>[x,y]= solve('x^2*sin(x^2)-3*y=7','x+y=1')

Sau khi thu được nghiệm x và y, sinh viên hãy thay vào 2 phương trình trên và nhận xét kết quả.

Questions & Answers

what does preconceived mean
sammie Reply
physiological Psychology
Nwosu Reply
How can I develope my cognitive domain
Amanyire Reply
why is communication effective
Dakolo Reply
Communication is effective because it allows individuals to share ideas, thoughts, and information with others.
effective communication can lead to improved outcomes in various settings, including personal relationships, business environments, and educational settings. By communicating effectively, individuals can negotiate effectively, solve problems collaboratively, and work towards common goals.
it starts up serve and return practice/assessments.it helps find voice talking therapy also assessments through relaxed conversation.
miss
Every time someone flushes a toilet in the apartment building, the person begins to jumb back automatically after hearing the flush, before the water temperature changes. Identify the types of learning, if it is classical conditioning identify the NS, UCS, CS and CR. If it is operant conditioning, identify the type of consequence positive reinforcement, negative reinforcement or punishment
Wekolamo Reply
please i need answer
Wekolamo
because it helps many people around the world to understand how to interact with other people and understand them well, for example at work (job).
Manix Reply
Agreed 👍 There are many parts of our brains and behaviors, we really need to get to know. Blessings for everyone and happy Sunday!
ARC
A child is a member of community not society elucidate ?
JESSY Reply
Isn't practices worldwide, be it psychology, be it science. isn't much just a false belief of control over something the mind cannot truly comprehend?
Simon Reply
compare and contrast skinner's perspective on personality development on freud
namakula Reply
Skinner skipped the whole unconscious phenomenon and rather emphasized on classical conditioning
war
explain how nature and nurture affect the development and later the productivity of an individual.
Amesalu Reply
nature is an hereditary factor while nurture is an environmental factor which constitute an individual personality. so if an individual's parent has a deviant behavior and was also brought up in an deviant environment, observation of the behavior and the inborn trait we make the individual deviant.
Samuel
I am taking this course because I am hoping that I could somehow learn more about my chosen field of interest and due to the fact that being a PsyD really ignites my passion as an individual the more I hope to learn about developing and literally explore the complexity of my critical thinking skills
Zyryn Reply
good👍
Jonathan
and having a good philosophy of the world is like a sandwich and a peanut butter 👍
Jonathan
generally amnesi how long yrs memory loss
Kelu Reply
interpersonal relationships
Abdulfatai Reply
What would be the best educational aid(s) for gifted kids/savants?
Heidi Reply
treat them normal, if they want help then give them. that will make everyone happy
Saurabh
What are the treatment for autism?
Magret Reply
hello. autism is a umbrella term. autistic kids have different disorder overlapping. for example. a kid may show symptoms of ADHD and also learning disabilities. before treatment please make sure the kid doesn't have physical disabilities like hearing..vision..speech problem. sometimes these
Jharna
continue.. sometimes due to these physical problems..the diagnosis may be misdiagnosed. treatment for autism. well it depends on the severity. since autistic kids have problems in communicating and adopting to the environment.. it's best to expose the child in situations where the child
Jharna
child interact with other kids under doc supervision. play therapy. speech therapy. Engaging in different activities that activate most parts of the brain.. like drawing..painting. matching color board game. string and beads game. the more you interact with the child the more effective
Jharna
results you'll get.. please consult a therapist to know what suits best on your child. and last as a parent. I know sometimes it's overwhelming to guide a special kid. but trust the process and be strong and patient as a parent.
Jharna
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Thí nghiệm cad (computer-aided design). OpenStax CNX. Jul 29, 2009 Download for free at http://cnx.org/content/col10797/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Thí nghiệm cad (computer-aided design)' conversation and receive update notifications?

Ask