1. Tuyển Mod quản lý diễn đàn. Các thành viên xem chi tiết tại đây

Mô phỏng Fuzzy Logic trong MatLab ?

Chủ đề trong 'Toán học' bởi keepsmiling, 30/10/2004.

  1. 1 người đang xem box này (Thành viên: 0, Khách: 1)
  1. keepsmiling

    keepsmiling Thành viên quen thuộc

    Tham gia ngày:
    21/01/2002
    Bài viết:
    692
    Đã được thích:
    0
    Mô phỏng Fuzzy Logic trong MatLab ?

    Chắc trong đây có rất nhiều người rành về MatLab . Keep đang làm mô phòng 1 hệ thống phun sương để tưới cây , dựa chủ yếu vào 2 input chính là độ ẩm và Thời tiết . Mọi thứ đều tốt đẹp cả chỉ bị stuck 1 chỗ là : Ngoài thể hiện trên GUI Ko biết cách nào để thể hiện để vẽ hẵn 1 cái máy phun sương rồi chỉ việc nhập input thì nó sẽ làm việc thôi . Hoặc ai biết cách đưa nó vào power point ko để tiện thuyết trình ? Xin cám ơn
  2. lan0303

    lan0303 Thành viên mới

    Tham gia ngày:
    24/05/2003
    Bài viết:
    2.622
    Đã được thích:
    0
    Kính Gửi: Bác Keepsmiling!
    Có thể tham khảo lưu đồ giải quyết như sau:
    Có thể xem thêm:
    -Kỹ thuật Lập Trình Mô Phỏng Thế Giới Thực và Ứng Dụng ?" GS.TS Hoàng Kiếm. NXB Thống kê ?" 1997.
    -Lý thuyết Điều Khiển Tuyến Tính - Nguyễn Doãn Phước. NXB KHKT ?" 2002. (có liên hệ ứng dụng Hàm Phức)
    Ngày cuối cùng ĐK VIFOTECH buồn quá các Bác!
  3. lan0303

    lan0303 Thành viên mới

    Tham gia ngày:
    24/05/2003
    Bài viết:
    2.622
    Đã được thích:
    0
    Kính Gửi: Bác Keepsmiling!
    Chú ý:
    1.-Gợi ý mà Tôi đã nêu ở phần trên không quan tâm chi tiết: "dựa chủ yếu vào 2 input chính là độ ẩm và Thời tiết"
    2.-Kỹ thuật Lập Trình Mô Phỏng Thế Giới Thực và Ứng Dụng ?" GS.TS Hoàng Kiếm. NXB Thống kê ?" 1997. (Có mã nguồn (3D, âm, modem .. )rất hay: Liên hệ Khoa Công nghệ Thông tin Đại học Khoa học Tự nhiên, 227 Nguyễn Văn Cừ, Quận 5, TP.Hồ Chí Minh)
    Glossary URL: http://www.levity.com/mavericks/glossary.htm
    Algorithm: A recipe outlining the steps in a procedure for solving a problem; often used to describe key methods used in a computer program.
    Amino Acid: One of the building blocks of proteins in the body.
    Androcratic: See "Dominator Society."
    Anaerobe: An organism that can live without oxygen.
    Ariadne''s Thread: According to myth, Ariadne gave Theseus a thread with which to find his way out of the Labyrinth.
    Attractors: A term used in modern dynamics to denote a limit towards which trajectories of change within a dynamical system move. Attractors generally lie within basins of attraction.
    Axons: A thin neuronal branch that transmits electrical impulses away from the cell body to other neurons (or to muscles or glands).
    Basin: A supporting element and/or foundation in a mathematical equation. In fractals these are the areas of dense information.
    Bell''s Theorem: A mathematical proof derived from physics demonstrating that when ever two particles interact, they are thereafter connected in a mysterious faster-than-light way that doesn''t diminish with time or distance and can''t be shielded. Also known as the "mechanism of non-locality."
    Bifurcation: The splitting or branching of possible states that a system can assume due to changing parameters.
    Catastrophe Theory-- In mathematics, catastrophe theory seeks to describe the structure of phenomena in which sharply discontinuous results follow from continuous processes. The theory was first developed by French mathematician Rene Thom in a paper published in 1968, but it has its roots in such fields as topology and dynamical system theory. While its subjects would include actual catastrophes such as a girder suddenly buckling, it is intended to apply to an abrupt change in any process.
    When catastrophe theory first appeared, controversy was created by some of the claims being made for its possible applications to real-life situations in such diverse fields as sociology and the behavioral sciences. In the following years, however, the theory has become an established area of mathematical research and has demonstrated its usefulness in the study of many problems in physics; its wider relevance continues to be explored.
    Chaos Theory: A new perspective emerging out of the study of dynamics that is discovering and mapping a high level of order and pattern in what has long been thought to be random activity.
    Chaotic Attractor: Any attractor that is more complicated than a single point or cycle.
    Collective Unconcious Carl Jung made a distinction between the personal unconscious, or the repressed feelings and thoughts developed during an individual''s life, and the collective unconscious, or those inherited feelings, thoughts, and memories shared by all humanity. The collective unconscious, according to Jung, is made up of what he called "archetypes," or primordial images. These correspond *****ch experiences as confronting death or choosing a mate and manifest themselves symbolically in religions, myths, fairy tales, and fantasies.
    Copenhagen Interpretation: Physicist Niels Bohr''s notion that an unmeasured atom is, in some sense, not real, and its attributes are created or realized through the act of measurement.
    Cybernetics: A term coined by Norbert Weiner, meaning the study of communication, feedback, and control mechanisms in living systems and machines.
    Dendrites: Tiny tree-like branchings at the electrical impulse-receiving end of a neuron.
    Differential Topology: The study and mapping of changing surfaces.
    Dimorphism: Biological division of structure in a species, such as for ***ual reproduction.
    Directed Panspermia: Francis Crick''s theory to explain the origin of life on earth. He 300 hypothesizes that spores traveling through space on the back of meteorites seed planets throughout the galaxy.
    DMT: Dimetyltryptamine-- an extremely powerful, short-acting hallucinogenic mol ecule found in the South American shamanic brew Ayahuasca.
    DNA: Deoxyribonucleic acid-- the long complex macro-molecule, consisting of two interconnected helical strands, that resides in the nucleus of every living cell, and encodes the genetic instructions for building each organism.
    Dominator Society: A type of society in which one ***, or one group, dominates or rules over another. Also known as "Androcratic."
    Dynamical Systems Theory: Mathematical models devised for understanding the pro cesses of whole systems.
    Dynamics: The study of systems in motion, which overlaps both physics and mathematics, and seeks to devise mechanical models used to understand processes.
    ECCO: John Lilly''s acronym for the Earth Coincidence Control Office. A hypothetical hierarchy of entities who manage coincidences in a fashion intended to accelerate the motion of human beings along their psyche-spiritual evolutionary pathways.
    EEG: Electroencephalogram- electrical potentials recorded by placing electrodes on the scalp or in the brain.
    Empiricism: in philosophy, a doctrine that affirms that all knowledge is based on experience, and denies the possibility of spontaneous ideas or a priori thought.
    Endogenous: Found naturally within the body.
    Epistemology: (Greek episteme, "knowledge"; logos, "theory"), branch of philosophy that addresses the philosophical problems surrounding the theory of knowledge. Epistemology is concerned with the definition of knowledge and related concepts, the sources and criteria of knowledge, the kinds of knowledge possible and the degree to which each is certain, and the exact relation between the one who knows and the object known.
    Eros: Eros is love. Originally Eros was considered to have been one of the great forces spawned from the primordial chaos. In this role Eros causes the fury of procreation that brings into being the world as we recognize it. In later myths Eros has been reduced to a pleasant but, minor god. By Roman times Eros had become Cupid.
    Eucharist: Central rite of the Christian religion, in which bread and wine are consecrated by an ordained minister and consumed by the minister and members of the congregation in obedience to Jesus'' command at the Last Supper, "Do this in remembrance of me." In the Orthodox and Roman Catholic churches, and in the Anglican, Lutheran, and many other Protestant churches, it is regarded as a sacrament, which both symbolizes and effects the union of Christ with the faithful. Baptists and others refer to Holy Communion as an "institution," rather than a sacrament, emphasizing obedience to a commandment.
    Excitatory: Excites, speeds up. To describe the other type of neurotransmitter.
    Field: A region of physical influence that interrelates and interconnects matter and energy. Fields are not a form of matter; rather matter is energy bound within fields.
    Fractal: Computer-generated images corresponding to mathematical equations, that repeat self-similar patterns at infinitely receding levels of organization.
    Gaia: A model for interpreting the dynamics that occur on planet earth as being part of a single self-regulating organism.
    Genome: The complete set of genetic material or genes for a single organism.
    Gylanic: See "Partnership Society."
    Holographic: The con***ion upon which the information for creating a whole system is stored in each of its parts.
    Hypnogogic: The twilight state of awareness, characterized by vivid dream-like imagery, that occurs as one is falling asleep.
    Hypnopompic: The dream-like state of awareness that occurs as one is waking up from sleep.
    Information: Non-predictable patterns that carry a message.
    Information Theory: A branch of cybernetics that attempts to define the amount of information required to control a process of given complexity.
    Ketamine: A dissociative anesthetic agent with profound psychedelic properties.
    Left Brain: The left hemisphere of the human brain associated with the processing of symbolic information in a linear, analytical mode.
    Limbic System: A region of the brain believed to be important in the processing of emotions.
    Lucid Dreaming: The phenomenon of being conscious and aware that one is dreaming, while one is in the process of dreaming.
    Mechanism of Non-locality: See "Bell''s Theorem."
    Meme: A term coined by Richard Dawkins, who defines it as "a unit of cultural inheritance, hypothesized as analogous to the particulate gene and as naturally selected by virtue of its ''phenotypic'' consequences on its own survival and replication in the cultural environment."
    Metaprogramming Circuits: A hypothesized part of the brain that is responsible for over-riding social and cultural con***ioning.
    Morphic Field: Defined by Rupert Sheldrake as "a field within and around a morphic unit which organizes its characteristic structure and pattern of activity. They underlie the form and behavior of holons or morphic units at all levels of complexity. This term includes morphogenetic, behavioral, social, cultural, and mental fields. They are shaped and stabilized by morphic resonance from previous similar morphic units, which were under the influence of fields of the same kind. They consequently contain a kind of cumulative memory and tend to become increasingly habitual."
    Morphic Resonance: The influence of previous structures of activity on subsequent similar structures of activity organized by morphic fields.
    Morphogenesis: The coming into being of form.
    Morphogenetic Field: A non-material region of influence that guides the structural development of organic forms.
    MRI: Magnetic Resonance Imagery-- A scanning technique that creates a visual image using electro-magnetic fields to see inside the body.
    Nanotechnology: Atomic engineering--the ability to devise self-replicating machines, robots, and computers that are molecular sized.
    Natural Selection: Charles Darwin''s theory of biological evolution, based on the survival and replication of the fittest and most adaptable genes, through competition over limited natural resources.
    Neural Network: An interconnected system of brain cells. Neurophysiology: The physiological study of the nervous system.
    Neurotransmitter: Chemicals that transmit impulses between nerve cells or between nerve cells and effector cells.
    Non-linear Dynamics: The study of chaotic processes.
    Noosphere: A term coined by Teilhard de Chardin, defined as a non-material sheath that surrounds the earth, containing all of humanity''s cultural achievements.
    Ontology: Metaphysics is customarily divided into ontology, which deals with the question of how many fundamentally distinct sorts of entities compose the universe, and metaphysics proper, which is concerned with describing the most general traits of reality.
    Paradigm: A cognitive model for explaining a set of data. Paradigm Shift. A change in the perception of information.
    Paranormal: Phenomena that are out of the realm of that which is explainable through conventional science.
    Partnership Society. A type of society in which both ***es and all people have complete equal rights and representation, and live together in peaceful cooperation. Also known as "Gylanic."
    PCP: Phencyclidine-- an analgesic-anesthetic compound with powerful hallucinogenic effects.
    Peptides: A compound consisting of two or several amino acids.
    Phase Portrait: Images that display the state of a system at a moment frozen in time.
    Phenome: The smallest linguistic unit.
    Phenomenology: 20th-century philosophical movement dedicated to describing the structures of experience as they present themselves to consciousness, without recourse to theory, deduction, or assumptions from other disciplines such as the natural sciences.
    Pheromone: Odor produced by an animal that affects the behavior of other animals. The way pheromones work is analogous to the way hormones in the body send specific chemical signals from one set of cells to another, causing them to perform a certain action.
    Precursor: A chemical that precedes another in a series of metabolic breakdowns.
    Quantum Physics: The scientific study of sub-atomic reality.
    REM: The phase of the sleep cycle where there are "rapid eye movements," and dreaming occurs.
    Right Brain: The right hemisphere of the human brain which is associated with pattern recognition and nonlinear holistic thinking.
    Selfish Gene Theory: Darwin''s theory of natural selection applied at the genetic level, which proposes that the unit of selection in evolution is not the species or the organism, but the gene.
    Separatrix: The threshold between attractors in a dynamic system.
    Sociobiology: The biological study of social behavior in animals, based upon the understanding that social behaviors can be genetically encoded and evolve through the evolutionary process of natural selection.
    Space-time Warp: A crinkle, tear, or bend in the space-time continuum.
    Strange Attractor: The orbital point in the mathematical mapping of a dynamic system that is neither fixed nor oscillating, but rather spirals inward.
    Symbiosis: (Greek symbioun, "to live together"), in biology, term for the interdependence of different species, which are sometimes called symbionts.
    Tangles: Diagrams that map the skeletal structure of a dynamical system.
    Teleology: The study of ends or final causes; the explanation of phenomena by reference to goals or purposes.
    Theory of Formative Causation: The hypothesis that organisms or morphic units at all levels of complexity are organized by morphic fields, which are themselves influenced and stabilized by morphic resonance from all previous similar morphic units.
    Topological Manifold: A multi-leveled surface area.
    Unified Field Theory: The Holy Grail of physics, which would mathematically unite all the known forces of the universe under a single comprehensive framework.
    Virtual Reality: Interactive technology which totally controls sensory input and creates the convincing illusion that one is completely immersed in a computer-generated world.
    Thân!
    Được lan0303 sửa chữa / chuyển vào 07:01 ngày 31/10/2004
  4. keepsmiling

    keepsmiling Thành viên quen thuộc

    Tham gia ngày:
    21/01/2002
    Bài viết:
    692
    Đã được thích:
    0
    hic , trước tiên xin cám ơn bác lan0303 vì sự nhiệt tình giúp đỡ trên . Thú thật bài của em ko cần kiến thức nhiều như vậy đâu .
    Em đã làm 1 cái mô phỏng hệ thống máy phun sương (simulation) dựa vào 2 input là nhiệt độ và độ ẩm . Qua quá trình defuzzication và dùng những hàm AND OR , nên cũng khá đơn giản . Nhưng chỉ có 1 vấn đề khó nhất về MatLab mà em chưa biết là làm thế nào để diễn tả nó bằng hình ảnh cụ thể ? hoặc qua Power point cũng được ?
  5. loveoflife

    loveoflife Thành viên mới

    Tham gia ngày:
    09/01/2002
    Bài viết:
    94
    Đã được thích:
    0
    Hi,
    Theo như tôi hiểu thì bạn muốn thể hiện kết quả chạy mô phỏng của bạn dưới dạng giao diện đồ hoạ animation (giống như một số demo của Simulink). Nếu vậy thì bạn có thể lập trình MatLab để tạo giao diện đồ hoạ. Khả năng đồ hoạ của MatLab rất mạnh. Tuy nhiên việc lập trình này cũng không hề đơn giản. Nếu bạn gặp khó khăn và bạn ở Hà Nội thì bạn có thể gặp tôi. Tôi là giảng viên ở Bộ môn Điều khiển tự động, Đại học Bách Khoa Hà Nội. Nếu cần gặp thì bạn phải liên hệ trước vì sắp đến mùa sinh viên làm tốt nghiệp nên tôi rất bận.
  6. keepsmiling

    keepsmiling Thành viên quen thuộc

    Tham gia ngày:
    21/01/2002
    Bài viết:
    692
    Đã được thích:
    0
    Đúng là anh Lovelife trong nghề có khác , em ko phải dân tin , chỉ đọc tutorial của MatLab mà làm theo thôi , nhưng cũng tạm được nhưng em chưa biết sao để mô phỏng dạng animation .
    Em ở TPHCM . Nếu ko phiền xin anh LL cho em 1 vài cái link hướng dẫn hay ví dụ về vấn đề này được ko ?
  7. Tachuterotic

    Tachuterotic Thành viên quen thuộc

    Tham gia ngày:
    06/04/2002
    Bài viết:
    244
    Đã được thích:
    0
    Thực ra đúng là vấn đề của bạn nểu giải quyết theo hướng ứng dụng(xây dựng giao diện ứng dụng thì có thể phức tạp) còn việc chỉ dừng lại ở mô phỏng kết quả thì việc sử dụng Matlab là hợp lý.
    Bác loveoflife quả là dân có nghề, có nghề, nhưng chắc bác chưa nghiên cứu hết các tính năng của Matlab Version 6.5 R13.(Không biết bác là Trường hay là Hiếu đấy ) thực ra trong Toolbox của Matlab 6.5 có một công cụ rất mạnh hỗ trợ các đối tượng đồ hoạ,có khả năng liên kết với các Sfunction trong Workspace, đó là toolbox Virtual Reality. Trong việc thể hiện các luật điều khiển ( gồm cả Fuzzy ) thì đều rất dẽ dàng với tính năng kéo thả của nó. Việc xây dựng đòi hỏi duy nhất bạn phải đọc User Manual của Matlab kĩ càng và VRcomplier thưòng được cài sẵn kèm Matlab phải chạy được( hồi trước tôi sử dụng thỉnh thoảng hay bị lỗi cái này). Chúc thành công.
    Được tachuterotic sửa chữa / chuyển vào 10:02 ngày 01/11/2004
  8. loveoflife

    loveoflife Thành viên mới

    Tham gia ngày:
    09/01/2002
    Bài viết:
    94
    Đã được thích:
    0
    Thực ra tôi đã nghiên cứu hầu hết các tính năng của MatLab 6.5, kể cả VR, xPC, RTW, mô phỏng cơ khí,... (chỉ trừ mấy cái chắc sẽ không dùng đến như Database, Map). Mặc dù VR rất hay và có thể tạo ra giao diện 3-D đẹp nhưng thú thực là tôi không thích cái VR lắm, vì chạy hơi nặng (có lẽ do máy PC của tôi yếu), với cả việc thiết kế 3-D đối với tôi là hơi phức tạp (khiếu nghệ thuật hơi bị thấp ). Ah, Tachuterotic có phải là Thiêm K44 không? Đừng ngạc nhiên nhé, vì ngồi cạnh anh là Mai Thế Ánh. Anh là Trường.
    To keepsmiling: tài liệu về MatLab & Simulink thì đọc help có lẽ là hay nhất. Các ví dụ về tạo giao diện animation kết hợp với Simulink (chắc bạn dùng Simulink) thì có thể tham khảo trong chính các demo của Simulink (toilet, inverted pendulum, double spring,...). Tôi cũng có viết một chương trình như vậy nhưng không thể cho bạn được vì đó là bài thí nghiệm và bài thi cho sinh viên. Nói chung việc học và lập trình một chương trình như của bạn chắc sẽ khá vất vả nếu bạn chưa quen. Tuy nhiên nó rất đáng để thử vì qua đó bạn sẽ học được rất nhiều điều và kỹ năng lập trình của bạn sẽ lên rất nhiều.
    Bạn nên đọc về một số vấn đề sau:
    - Lập trình MatLab (đương nhiên rồi)
    - MatLab graphics, và cả phần handle graphics
    - Simulink: phần tạo các masked block
    - S-Function (thuộc Simulink), tập trung vào S-Function dạng M-file.
    - Nên đọc thêm về cách sử dụng các ActiveX trong MatLab. Nếu tận dụng được các ActiveX sẵn có để tạo giao diện thì sẽ rất tốt vì vừa nhàn hạ mà tốc độ lại nhanh. Bên cạnh đó, nếu bạn thạo Java thì có thể lập trình giao diện bằng Java và nhúng vào trong MatLab.
  9. aivoges

    aivoges Thành viên quen thuộc

    Tham gia ngày:
    06/11/2002
    Bài viết:
    413
    Đã được thích:
    0
    Cấu hình máy tính của bác như thế nào? Tôi không nghĩ là dùng VR quá nặng đâu, nhất là đối với mô hình đơn giản như bác. Vấn đề là bác tạo file VR thế nào thôi, nếu bác dựng mô hình 3D bằng một phần mềm trung gian như Solid Works ... thì khi xuất sang VR sẽ rất nặng. Tôi vẫn dùng VR kết hợp với Simulink để mô phỏng robot, thậm chí còn tạo interaction với Joystick nữa. Nhưng có cái dở là VRView không cho phép xuất trực tiếp ra file avi, tôi vẫn phải dùng một phần mềm trung gian như HyperCam để ghi thành file avi.
    Một điều nữa là nếu bạn biết lập trình C/C++ thì nên dùng C/C++ s-function, nhanh hơn M-file rất nhiều và điều đó cũng tăng tốc độ mô phỏng của bạn lên đáng kể. Tôi thấy các đoạn M-code của MATLAB viết lằng nhằng lắm, nhất là xử lí ma trận. Lại thêm các đoạn báo lỗi nhiều khi không cần thiết. Với C s-function bạn có thể chủ động hơn, chẳng hạn như với M-code bạn phải tính ma trận nghịch đảo khi muốn giải 1 hệ phương trình tuyến tính, trong khi với C bạn có thể lập trình để giải bằng khử Gauss.
    Được aivoges sửa chữa / chuyển vào 20:00 ngày 01/11/2004
  10. keepsmiling

    keepsmiling Thành viên quen thuộc

    Tham gia ngày:
    21/01/2002
    Bài viết:
    692
    Đã được thích:
    0
    Cám ơn bác loveoffline , aivoges , Tach ,... Em ko phải là chuyên môn về science ,em là dân du học về Finance , nhưng có cô bạn học Biotech hay nhờ làm giúp bài tập . Kiến thức về lập trình và máy tính toàn là mày mò cả nên cũng có nhiều hạn chế . Những ý kiến đóng góp vừa rồi thật quí báu , em sẽ cố gắng làm thử tiếp , nếu lại gặp rắc rối thì xin hỏi thêm các bác tiếp . Mình dùng Matlab 7.0 Xin cám ơn
    Được keepsmiling sửa chữa / chuyển vào 00:15 ngày 02/11/2004
    Được keepsmiling sửa chữa / chuyển vào 21:44 ngày 02/11/2004

Chia sẻ trang này