Borrar filtros
Borrar filtros

array for transfer function

15 visualizaciones (últimos 30 días)
Tim
Tim el 3 de Abr. de 2011
I have created a transfer function demonstrating the movement of a robotic arm for a course that I am doing using matlab. I have been told to apply reference signals to the transfer function using matlab the reference signals are to be in the form of an array. Ref signal 1 rotates the arm to the several specified locations and ref signal 2 moves the arm grabber vertically down to pick up and place boxes. I have no idea how to do this in matlab, can anyone help?

Respuesta aceptada

Jarrod Rivituso
Jarrod Rivituso el 3 de Abr. de 2011
I'm not sure if your question is a basic "how do I create arrays" question, or if you are more interested in performing the simulation of your transfer function. I've assumed the latter here.
How are you representing the transfer function in MATLAB? Are you using the Control System Toolbox, such as shown below?
>> sys = tf(1,[1 2 1]);
If so, you could use the lsim function to perform a linear simulation using input data. For example
>> t = 0:0.1:2*pi;
>> u = sin(t);
>> lsim(sys,u,t);
However, I might recommend that you also consider using Simulink. You can model the transfer function using a single block (the Transfer Function block) and you can use either MATLAB to define your input signals or you can design them graphically using the Signal Builder block.
  2 comentarios
Tim
Tim el 3 de Abr. de 2011
My initial explanation was not very good. I actually created two transfer functions. One function controls the rotation of the robotic arm on the vertical axis, and the other allows the arm to move vertically up and down. The first reference signal controls the vertical rotation, while the second reference signal controls the vertical movement. Its a little awkward to explain so I will us an example: Say at t=2 the arm receives a signal to rotate 30 degrees to the right, this signal last for 10 seconds, in that 10 seconds the arm receives a signal to move vertically down 300mm to pick up a box, and this signal lasts for say 7 seconds etc.
So what I am trying to do is; first I would like to group my two functions using the array setup so that it becomes one, and second create an array of the reference signals to act as inputs for the transfer functions so that the whole thing can act as single system.
Jarrod Rivituso
Jarrod Rivituso el 3 de Abr. de 2011
Hi Tim,
For such a controls application, I feel like you would be well off using Simulink, provided that you have access to it. There are even some demo models, such as rct_robotarm0, that provide an example of a similar application.
If you take the Simulink approach, you will can add two separate transfer function blocks to your model and then provide separate inputs to each one. There are lots of Simulink demo models you can view to get a feel for this.
http://www.mathworks.com/products/simulink/demos.html
If you do not have access to Simulink, you can do this using the transfer function objects in the Control System Toolbox. However, IMO, it is less intuitive (I personally favor the graphical modeling environment of Simulink for controls applications).
For reference, a way you could do this is similar to as follows, except where you would define t and u to be different based on your desired inputs.
>> fullSys(1,1) = sys1;
>> fullSys(2,2) = sys2;
>> t = (0:0.1:2*pi)';
>> u = [sin(t), cos(t)];
>> lsim(fullSys,u,t)
Hope this helps!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by