Guy and Seth on Simulink

May 13th, 2010

How to Learn Model-Based Design using Simulink

When my colleague Guy saw my previous post about the MathWorks Academic Virtual Conference, he told me how he learned Model-Based Design and Simulink at l'Université de Sherbrooke. Here is what he said:

Learning Model-Based Design using Simulink

By Guy Rouleau

Model-Based Designer Guy Rouleau

I consider myself lucky to come from a school where we learned and applied Model-Based Design through projects. During my graduate studies, I had the opportunity to teach a class I took as an undergrad titled "Mechatronics Project", where the students had to control a wheeled robot. The project included:

  • Planning: The students had to make a high level "interaction diagram" of the final system. In other words, they began by creating a Simulink model with empty subsystems to describe the interactions between the robot components.
  • Measure the robot motion: Students could use an FPGA to process encoder pulses. As mechanical engineers, the students were very happy to avoid the complexity of FPGA programming and directly use Simulink to generate the FPGA code.
  • Create a plant model: They implemented the robot’s equations of motion in Simulink and experimentally characterized important parameters, like friction.
  • Control the robot motion: They implemented a PID with op-amps and resistors on a breadboard. I cannot imagine the amount of fuses we saved by designing the controller using Simulink, wiring the breadboard only once.
  • Generate the trajectory: For this part, students had to program a microcontroller in C language. They could have used Simulink here too, but it would have made their life too easy!

At the end of the semester, each team had a validated working robot and an equivalent simulation.

Update

I just received a picture of the robot used in this class. Here is what it looks like:

Model-Based Design robotic

Now it's your turn

How did you learn Simulink and Model-Based Design? What's the coolest project you have worked on? Leave a comment here to tell us about it.

3 Responses to “How to Learn Model-Based Design using Simulink”

  1. RAGAVENDAR replied on :

    Hi Seth

    I am trying to design grid impact study of Wind turbine with Asynchronous generator in P.U as a ideal condition it is working fine.I want to make the model a real time one.so tried including stiffness & damping in my model which i have failed to do complete.because the output of turbine block(in distributed resources of Simpowersystems) is torque in pu & the input for shafts block(in Electric drives library of simpowersystems)are speeds in actual value
    and the input from turbine to asynchronous block is torque in PU there existing confusion in this

    I want to include Stiffness & damping of my shaft in my model,please suggest me something in this regard I am struggling to get over this one issue…

  2. HuangHui replied on :

    I want to learn model baseed design, but i an not familiar with it, i need some resourses about it.

  3. Guy Rouleau replied on :

    Hi HuangHui,

    I recommend looking at the following post by my colleague Parasar:

    http://blogs.mathworks.com/seth/2010/06/03/adopting-model-based-design/

    You will find links to a tech-kit containing many PDF files describing model-based design.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


MathWorks
Guy Rouleau and Seth Popinchalk are Application Engineers for MathWorks. They write here about Simulink and other MathWorks tools used in Model-Based Design.

These postings are the author's and don't necessarily represent the opinions of The MathWorks.