**3. DSPACE tool box and design procedures**

While Dspace offers various development tools, it is needed at least Control Desk and RTI block set software packages in order to develop projects under Simulink. After installing software, a tool box shown in Figure 5 is added to Simulink®. It can be also opened dspace library shown in Figure 5 typing 'rti' in the matlab command window. Block sets in the library are divided into two categories: master processor and slave dsp. While master have blocks such as ADC, serial, encoder, digital I/O, slave has such as PWM, ADC and digital I/O.

based on the signal of hall-effect sensors on each motor. A switch-mode 150W power supply with inhibit input and EMI filter is used to supply required energy. Also, an interface board

The Dspace DS1103 real time controller is used to implement control algorithms. DS1103 is a rapid prototyping controller that developed for designing and analyzing complex and difficult control applications. It has various inputs and outputs such as digital, analog digital converter, digital analog converter, serial interface, can-bus, pulse width modulation (PWM) channels and encoders in order to be used lots of peripheral unit like actuators and sensors. DS1103 has a real time interface (RTI) that allows fully programmable from the Simulink® block diagram environment. A dspace toolbox will be added to Simulink® after installing RTI, so it can be configured all I/O graphically by using RTI. You can implement your control and signal processing algorithms on the board quickly and easily. A general DS1103 controller board system is shown in Figure 4. It consists of a DS1103 controller card in expansion box, CLP1103 input-output connector and led panel, DS817 link card and a

was designed between controller and motors.

computer.

Fig. 4. A general DS1103 set-up

I/O.

**3. DSPACE tool box and design procedures** 

While Dspace offers various development tools, it is needed at least Control Desk and RTI block set software packages in order to develop projects under Simulink. After installing software, a tool box shown in Figure 5 is added to Simulink®. It can be also opened dspace library shown in Figure 5 typing 'rti' in the matlab command window. Block sets in the library are divided into two categories: master processor and slave dsp. While master have blocks such as ADC, serial, encoder, digital I/O, slave has such as PWM, ADC and digital

Fig. 5. Dspace toolbox and library

Another software component is the control desk (interface is shown in Figure 6) which allows downloading applications, doing experiments, easily creating graphical user interface and data acquisition.

Fig. 6. Control desk interface

As can be seen from Figure 6, panel on the left side is called "Navigator" and it has four tabs: experiment, instrumentation, platform and test automation. All files written for

Position Control and Trajectory Tracking of the Stewart Platform 185

All development steps can be illustrated basically in the Figure 8 below. This figure is illustrated for DS1103 in an expansion box. It should be finished all connections before this

> Drag&Drop required blocks to model

Open an empty Layout in the Control Desk

Design the gui

Do experiments and show results Switch off DS1103

Power off the system

*l* ) (Fitcher, 1986; Kim & Chung,

: 1,2,...,6 *L R T PB i i XYZ i i* (1)

Switch off PC

Design the control algorithm

Build the model

A controller is needed to move top platform from initial position to desired position and orientation. It will generate required forces for each motor. Position and trajectory control of the platform can be reduced to leg position control after inverse kinematic and path planning algorithms. A PID (proportional-integrator-derivative) and sliding mode position controllers were developed and implemented. Control algorithms designed in Simulink

All robots are electro-mechanic devices consisting of actuators, sensors and mechanical structure. In order to control the robots for desired motions kinematic and dynamic equations of the system should be known. Firstly kinematic solution should be computed before controller design. A schematic model of the SP for kinematic solution is illustrated in Figure 9. In the figure, base *B={X,Y,Z}* and top *T={x,y,z}* coordinate systems are placed and

It is needed to find leg lengths to reach the moving platform to its desired position and orientation according to fixed platform (inverse kinematics). Required leg vectors ( *Li* ) for given position vector *P* and orientation matrix *R* are obtained by using the following

In order to have *Ti* and *Bi* position vectors based on robot structure, an m-file is written and a Simulink model is designed to obtain inverse kinematic solution by using Equation 1. The model shown in Figure 10 uses the m-file to get required variables and takes the desired position (*x*, *y*, *z*) and orientation (*φ, θ, ψ*) of the top platform. It outputs the leg lengths. Desired block in this model is shown in Figure 11. The reference inputs can be entered in

environment and embedded in the Dspace DS1103 real time controller.

base and top joint points are labeled as *B*i (i=1,2, .. 6) and *T*i (i=1,2, .. 6).

equation. Finally, norm of the vectors ( *Li* ) are leg lengths ( *<sup>i</sup>*

1999; Sefrioui & Gosselin, 1993).

this block.

Start Matlab&Simulink

> Start Control Desk

Open a Simulink model and set model parameters

Fig. 8. Basic flow diagram for developing a project

procedure.

Switch on DS1103

Power on the system

Switch on PC

**4. Control** 

conducting experiment are listed in the experiment tab. Instrumentation tab allows building instrument panels in order to change and monitor the variables of a model. Supported simulations and connected boards are shown in platform tab. Test automation tab has functions about automation tasks, other software solution of Dspace.

Bottom side is called "Tool Window" having log viewer, file selector, interpreter and open experiment tabs. It is seen errors and warnings in the log viewer tab and files under selected folder are listed where an application can be loaded by drag and drop action.

In order to create a GUI for an experiment, it should be opened an empty layout from filenew layout click. A lot of instruments are listed in the instrument selector right side on the control desk. Virtual instruments and data acquisition elements are shown in Figure 7 below. An instrument can be placed on the layout plotting with mouse left clicked after selecting from virtual instruments panel. Its position and size can be changed and its properties such as color, text, precision and etc can be settled according to needs. It can be saved and added to an experiment after completing GUI.

Fig. 7. Virtual instruments and data acquisition in the instruments selector window

All development steps can be illustrated basically in the Figure 8 below. This figure is illustrated for DS1103 in an expansion box. It should be finished all connections before this procedure.

Fig. 8. Basic flow diagram for developing a project
