Sonntag, 27. Februar 2011

Global to Local Coordinate Transformation Matrix

T = trans_matrix_beam3d(x0,y0,z0,x1,y1,z1,alpha)
Die Funktion berechnet den Global to Local koordinieren Transformationsmatrix.

Samstag, 26. Februar 2011

outrigger based rollover controller

Matlab & Coordinate Systems

coordinate transformation module

vehicle local coordinate system
kinematic unicycle state Model
[xi yi θi] Cartesian coordinate system
[vi ωi]  the states of linear velocity and the angular velocity

the model equations from the global coordinates to the local coordinates
The Global Coordinates and Local Coordinates for Cyclic Pursuit Strategy
coordinate transformation module --> an Embedded MATLAB function
http://marhes.ece.unm.edu/index.php/Ysong:Project514#Introduction

Implementation of coordinate transformation with rotation around multiple axes
http://alexandria.tue.nl/repository/books/626941.pdf


 Autonomous Vehicle Based on Simulink
http://www.springerlink.com/content/17817601t7836742/fulltext.pdf

Global and Local Coordinate Systems
Cartesian (X, Y, Z components)
Cylindrical (R, θ, Z components)
Spherical (R, θ, φ components)
Cylindrical (R, θ, Y components)
http://www.kxcad.net/ansys/ANSYS/ansyshelp/Hlp_G_MOD3_2.html

Global to Local Coordinate Transformation Matrix

http://www.mathworks.com/matlabcentral/fileexchange/9586-global-to-local-coordinate-transformation-matrix
modeling the vehicle environment


Road model
Test Track Design
Environment Model
global coordinate system of the environment
local coordinate system of the test track
transformation should be made to convert from one coordinate system to another.
Road model
1. coordinate transformation
2. transformation road properties
the global (x,y,z) and local (s,t) coordinate

Environment  module block diagram
1. Road: Vertical Profile ,Horizontal Profile ,Transformation
2. scenario:
3. Traffic Participants

Transformation between the 2 coordinates (local road coordinate (s,t) ,global coordinates(x,y))
Modeling the test track profile
- Matlab M-functions
- Simulink basic components
- Automatically generated S-functions
- Manually written S-function
We found that the automatically generated S-function is the most suitable method because of its low
execution time.

Building S-Functions Automatically
S-Function Builder is a Simulink block that builds an S-function
open_system('sfcndemo_mixedm.mdl');
edit(fullfile(matlabroot,'simulink','src','mixedm.c'))

http://metalab.uniten.edu.my/~farrukh/mywork/s_fun1.pdf 
How the S-Function Builder Builds an S-Function

Freitag, 25. Februar 2011

Converting .mat file to .xml file

Convert MAT file to XML file (.mat file contains a hierarchical structure).
The XML Toolbox converts MATLAB data structures of any level of nesting into an XML string.
xml_format()
xml_formatany()
xml_parse()
xml_parseany()
xml_load()
xml_save()

- converting .xml files to .mat files?
- How to convert XML data
- What Is an S-Function?
- S-function (system-function) , S-functions are compiled as MEX files using the mex utility

- When to Use an S-Function
- Creating new general purpose blocks
- Describing a system as a set of mathematical equations

Donnerstag, 24. Februar 2011

S-Function

The S-function demo library opens:
open_system([matlabroot,'/toolbox/simulink/simdemos/simfeatures/sfundemos.mdl']);

MATLAB S-Function Example:
1. Implement an S-function with an inherited sample time:
edit('msfcn_dsc.m');open_system('msfcndemo_sfundsc1.mdl');

2. Implement a continuous limited integrator where the output is bounded by lower and upper bounds and includes initial conditions.
edit('msfcn_limintm.m');open_system('msfcndemo_limintm.mdl');

3. Implement a multirate system
edit('msfcn_multirate.m');open_system('msfcndemo_multirate.mdl');

4. Implement an S-function that doubles its input
edit('msfcn_times_two.m');open_system('msfcndemo_timestwo.mdl');

5. Implement a unit delay
edit('msfcn_unit_delay.m');open_system('msfcndemo_sfundsc2.mdl');

6. Implement a variable pulse width generator by calling set_param from within a Level-2 MATLAB S-function. Also demonstrates how to use custom set and get methods for the block SimState.
edit('msfcn_varpulse.m');open_system('msfcndemo_varpulse.mdl');  

7. Implement a variable sample time block in which the first input is delayed by an amount of time determined by the second input.
edit('msfcn_vs.m');open_system('msfcndemo_vsfunc.mdl');  



 






Using S-function blocks in Simulink
http://www.chem.mtu.edu/~tbco/cm416/MatlabTutorialPart5.pdf

Mittwoch, 23. Februar 2011

Stabilität im Sinne von Lyapunov

Das Grundprinzip im Sinne vom Lyapunov,obwohl es keine Sprunganregung gibt,aber anhand die beliebige Anfangwerte für die Zustandvariablen ,so sterben die Zustandvariablen gegen Null,weil die gesamte Dynamik in den Zustandvariablen steckt.

Samstag, 19. Februar 2011

spurgeführter Omnibus

Struktur der Spurführungsregelung
Ein Omnibus soll einem Leitkabel geführt werden,das in der Straße verlegt ist.
Die Quarauslenkung ist elektronisch auszuregeln.

Single Track model:
To control the radius of steering maneuver, steering angles on front wheels are different. 
This could be taken into account after the “middle wheel” steering  angle assessment.