Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Motion Platform

Motion platform

Library

Environment and Targets

phasedenvlib

Description

The Motion Platform block models the motion of multiple platforms such as airplanes, ground vehicles, and/or receiving and transmitting sensors arrays, determining their positions and velocities. The platforms move along trajectories determined by initial positions and velocities, according to which motion model you choose — the velocity or acceleration model. The platform positions and velocities are updated at each simulation step. In addition, you can specify initial orientations for the platforms and obtain orientation updates.

Parameters

Model of object motion

Specify the motion model as either Velocity or Acceleration. The same motion model applies to all platforms.

Initial position (m)

Specify the initial position of the platform in meters as a 3-by-N matrix where each column represents the initial position of a platform in the form [x;y;z]. The quantity N is the number of platforms.

Initial velocity (m/s)

Specify the initial velocity of the platform in m/s as a 3-by-N matrix where each column represents the initial velocity of a platform in the form [vx;vy;vz]. The quantity N is the number of platforms. This parameter appears only when you set the Source of velocity or the Source of acceleration parameters to Input port.

Source of velocity

This parameter appears only when you set the Model of object motion parameter to Velocity. Then, you must supply velocity data for the model. Specify the Source of velocity data as either coming from a Property or an Input port.

Source of velocityUse these model parameters or ports
Property

Initial position (m) parameter

Velocity (m/s) parameter

Input port

Initial position (m) parameter

Initial velocity (m/s) parameter

Vel input port

Velocity (m/s)

Specify the current velocity of the platforms in m/s as a 3-by-N matrix where each column represents the current velocity of a platform in the form [vx;vy;vz]. This parameter appears only when you set the Model of object motion parameter to Velocity and set the Source of velocity parameter to Property.

Source of acceleration

This parameter appears only when you set the Model of object motion parameter to Acceleration. Then, you must supply acceleration values for the model. Specify the Source of acceleration data as either coming from a Property or an Input port.

Source of accelerationUse these model parameters or ports
Property

Initial Position (m) parameter

Initial Velocity (m/s) parameter

Acceleration (m/s^2) parameter

Input port

Initial Position (m) parameter

Initial Velocity (m/s) parameter

Acl input port

Acceleration (m/s^2)

Specify the current acceleration of the platforms in m/s^2 as a 3-by-N matrix where each column represents the current acceleration of a platform in the form [ax;ay;az]. This parameter appears only when you set the Model of object motion parameter to Acceleration and set the Source of acceleration parameter to Property.

Initial orientation axes

Specify the three axes that define the initial local (x, y, z) coordinate system at the platform as a 3-by-3-by-N matrix. Each column of the matrix represents an axis of the local coordinate system. The three axes must be orthonormal.

Enable orientation axes output

Select this check box to obtain the instantaneous orientation axes of the platform via the output port LAxes. The port appears only when the checkbox is selected.

Source of elapsed simulation time

Specify the source for elapsed simulation time as Auto or Derive from reference input port. When you choose Auto, the block computes the elapsed time. When you choose Derive from reference input port the block uses the time duration of a reference signal passed into the Ref input port.

Inherit sample rate

Select this check box to inherit the sample rate from upstream blocks. Otherwise, specify the sample rate using the Sample rate parameter.

Sample rate

Specify the signal sampling rate (in hertz) as a positive scalar. This parameter appears only when the Inherit sample rate parameter is not selected.

Simulate using

Block simulation method, specified as Interpreted Execution or Code Generation. If you want your block to use the MATLAB® interpreter, choose Interpreted Execution. If you want your block to run as compiled code, choose Code Generation. Compiled code requires time to compile but usually runs faster.

Interpreted execution is useful when you are developing and tuning a model. The block runs the underlying System object™ in MATLAB. You can change and execute your model quickly. When you are satisfied with your results, you can then run the block using Code Generation. Long simulations run faster than they would in interpreted execution. You can run repeated executions without recompiling. However, if you change any block parameters, then the block automatically recompiles before execution.

When setting this parameter, you must take into account the overall model simulation mode. The table shows how the Simulate using parameter interacts with the overall simulation mode.

When the Simulink® model is in Accelerator mode, the block mode specified using Simulate using overrides the simulation mode.

Acceleration Modes

Block SimulationSimulation Behavior
NormalAcceleratorRapid Accelerator
Interpreted ExecutionThe block executes using the MATLAB interpreter.The block executes using the MATLAB interpreter.Creates a standalone executable from the model.
Code GenerationThe block is compiled.All blocks in the model are compiled.
For more information, see Choosing a Simulation Mode (Simulink) from the Simulink documentation.

Ports

Note

The block input and output ports correspond to the input and output parameters described in the step method of the underlying System object. See link at the bottom of this page.

PortDescriptionSupported Data Types
VelPlatform velocity inputDouble-precision floating point
AclPlatform acceleration inputDouble-precision floating point
RefReference signal inputDouble-precision floating point
PosPlatform position outputDouble-precision floating point
VelPlatform velocity outputDouble-precision floating point
LAxesPlatform orientation outputDouble-precision floating point

Introduced in R2014b

Was this topic helpful?