Skip to content

This repo cotains the work done with an Stewart Gough platform at Universidad Nacional de Colombia. This work is done as part of the final project of the class Sensors and Actuators Semester 2021-II

Notifications You must be signed in to change notification settings

jsduenass/Stewart_Gough_platform_UNAL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitlab mirror

Stewart Gough platform (Legacy system)

The mechatronic lab at Universidad Nacional de Colombia has a Stewart Gough platform, a six Degrees Of Freedom parallel manipulator powered by lineal actuators. This repo contains the legacy system used to control this robot.

XPC Interface

Set up host computer

Requirements

  • MATLAB: Install an old version of MATLAB that supports XPCTarget toolbox is required. MATLAB R2011a is recommended 1.

  • xPC Target: Install XPCTarget toolbox version 5.0.

  • C++ compiler: Install C++ compiler compatible with XPC. Getting it by installing visual studio is recommended.

    xpcgetCC('supported')
    output supported compilers

    Testing with various Microsoft compilers, we found that some versions of Microsoft Visual C++ are not recognized by MATLAB and are difficult to find. Therefore, the Open Watcom compiler is recommended.

    Note: Download the version specified by MATLAB (in R2011a, Open Watcom version 1.8).

Set up custom libraries

Once the required programs are installed. Get a copy of this repo and set up the custom libraries located in the ext folder.

  1. Copy the folder thirdpartydrivers folder into the XPC toolbox folder located at matlabroot. Then write the command rehash toolbox to update the files MATLAB toolbox is referencing.
    driverSource = 'libs\thirdpartydrivers';
    driverDestination = strcat(matlabroot,'\toolbox\rtw\targets\xpc\target\build\xpcblocks\thirdpartydrivers')
    copyfile(driverSource, driverDestination)
    rehash toolbox

    Run MATLAB as administrator if matlabroot is a protected folder (error "No matching files were found.").

  2. Add to MATLAB's search path the Simulink's custom Stewart Gough library
    savepath('libs\Stewart_Gough_library')
    savepath('libs\Stewart_Gough_library\Trajectories')
    savepath('libs\Stewart_Gough_library\Functions')

Set up xPC Compiler

Run xpcsetCC('setup') to choose from list of valid compilers and xpcgetCC('installed') to check the available compilers.

The file quickReferenceCommand is a MATLAB script that contains useful commands for setting up the environment.

Default target configuration

Getting started

Simulink model

Motion control Simulink Model

mode: controls de mode of operation of the model

  • 0: disable PWM
  • 1: Pose control
  • 2: Actuator distance control
  • 3: manually set PWM signal control

block reference

  • MM-16-AT Analog Input : addiamondmm16atcustom

  • SG-ADC Sensors: wrapper of MM-16-AT Analog Input. reordering ports and filtering and scaling.

  • Motors-F4 STM - PWM

    • Baseboard Serial
    • fiforead from xpc target library
    • sertxenablebase from xpc target library

Signal PWM name s2 - s7 If Action Subsystem6/Referece/From File1/s2

Signal input distance/current direct without wrapper name p1 - p12 SG-ADC Sensors/MM-16-AT Analog Input/p1

Controler PID

Start by performing proportional control. the linear actuator have a range of 30 cm and the PWM goes from -100 to 100. As a starting point a controller with kP=3 and input signal in centimeters. When there is maximum error 30 cm the PWM signal goes to 90. There is the possibility to increase kP as see fit by testing.

100=Ki*(30n) and n=t/Ts therefore Ki=(100Ts)/(30*t) where Ts=0.01 and a stimated t=3 that results in Ki=0.01

Compiling c files with mex

mex addiamondmm16atcustom.c
mex dadiamondmm16at_custom.c
mex dodiamond16at_custom.c

PCM-4153 (Single Board Computer) files

CAD Model

In order to better understand the operation of the platform and have the parts modeled in an open source CAD program, the model was made in OnShape, a Software-as-a-Service (SaaS) product development platform that combines CAD, built-in data management, real-time collaboration tools, and business analytics9.

Cad Model
Onshape CAD Model

This model was built based on the design plans of Francisco Villate and the models found in the catalogs of commercial parts.

Components:

system architecture

The previos diagram the relation between the subsystems and their interaction in the control loop.

Components
Component type Generic Custom made
Electronic
  • Single board computer (SBC) PCM-4153.
  • PC104 expansion card Diamond MM 16-AT.
  • STM32F407 microcontroller.
  • PC104 to STM32F4 board.
  • STM32F4 Baseboard.
Mechanical
  • Actuators Firgelli Automation FA-PO-35-12-12".
  • Spherical Joints Hephaist SRJ012C.
  • Base plate.
  • Mobile plate.
  • Manual press.
  • Universal joints.
Software
  • STM32F4 OS real time: ChibiOS/RT
  • XPC third party drivers
  • Stewart_Gough_library

(work in progress) Parties involved

  • Daniel Andres Ramirez Rodriguez
  • Edgar Bolivar
  • Francisco Javier Villate Gaona
  • Luis Miguel Mendez - Academic supervisor
  • Jorge Sofrony - Academic supervisor
  • Juan David Muñoz
  • Juan Diego Galeano
  • Ubaldo Gracia Zaragoza
  • Juan David Ramirez
  • Jorge Andrés Acero - Laboratory Technician
  • DIMAUN (Grupo de Trabajo en Nuevas Tecnologías Diseño, Manufactura y Automatización)

Contributors

  • Alexandra - Laboratory Technician
  • Jorge Andrés Acero - Laboratory Technician
  • Alvaro William Roa Gutierrez- Laboratory Technician

References and Resources

Footnotes

  1. Matlab 2011a release

About

This repo cotains the work done with an Stewart Gough platform at Universidad Nacional de Colombia. This work is done as part of the final project of the class Sensors and Actuators Semester 2021-II

Resources

Stars

Watchers

Forks

Packages

No packages published