Control through Simulink

Most control engineers use Matlab's Simulink to develop their control models. EZPhysics places ODE simulation capabilities available through an interface similar to the real robots inputs. The integration with Simulink is made through a TCP/IP connection (done in a provided s_function), follow this video to run the Demo:

The function will block Matlab waiting for a packet of data from EZPhysics, hence it is normal that Matlab is unresponsive between the start of Simulink simulation and EZPhysics Editor simulation. Also it is necessary to design the Simulink model accordingly. For instance, such as in the example provided a “Unit delay” block is necessary to be able to work with the EZPhysics block.

EZPhysics simulation receives a target velocity for each joint, if possible with maximum torque value, the joint will be at that velocity in the next simulator step (ODE Step field). This is an important factor to notice when designing your control mechanism for Simulink, for it is not a real world alike behaviour.

Editing the s_function

The next video details the most relevant aspects to alter in the s-function that connects Simulink with EZPhysics. It is very relevant when trying to use a new robot with this system.

Important Note: If you are working with EZPhysics Editor you need to set the “Send info” and/or “Receive Controls” (as shown in remote_controller chapter) flag in each element you want to communicate with.

After altering the s_function, i.e. to change the address or port, it is necessary to re-compile the library, these are the necessary steps:

 
simulink_integrated_remote_controller.txt · Last modified: 2012/01/25 19:09 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki