AC Connection Block
Description:
This block connects a Simulink vehicle simulation to AVDS through shared memory. User inputs and elapsed time are collected from AVDS and sent through shared memory to this block. Simulink calculates the vehicle linear and angular positions and sends them back through shared memory to AVDS for display. This block uses the S-function "AVDSSimulation" to connect to AVDS.
Inputs:
The signals that are input to this block are sent to the "MATLAB_AC" user defined simulation block in AVDS. There is one input port that contains 25 signals.
Input Signal |
Input Name |
Input Definition |
1. 3. |
xpos, ypos, zpos |
The position of the vehicle along the North and East axes, and the altitude, respectively. These values are in feet. |
4. 6. |
xrot, yrot, zrot |
The angular orientation of the vehicle given in Eurler angle in radians. These angles are Phi, Theta and Psi, respectively. |
7. |
alpha |
The angle of attack in radians. |
8. |
beta |
The sideslip angle in radians. |
9. |
G |
Number of induced Gs. |
10. |
Velocity |
Total velocity in feet/second. |
11. |
M |
Mach number. |
12. |
DeltaRudder |
Rudder deflection in radians. |
13. |
DeltaElevator |
Elevator deflection in radians. |
14. |
DeltaAileron |
Aileron deflection in radians. |
15. |
eng |
The engine level. Must in the range of [0,1]. |
16.. - 25. |
ToAVDS01 -ToAVDS10 |
These are generic signals to AVDS for user definition. |
Outputs:
The signals that are output from this block are sent from the "MATLAB_AC" user defined simulation block in AVDS. There is one input port that contains 16 signals. Note: the definitions in this table are for the default use of these signals in AVDS. The user can change the meaning of these signals by changing the simulation configuration in AVDS.
Output Signal |
Output Name |
Output Definition |
1. |
Alive |
A flag sent from AVDS to indicate if AVDS is running the simulation. When the simulation is running this flag is set to 1. Otherwise it is set to 0. |
2. |
dElevator |
The elevator command from the FCS. |
3. |
dAileron |
The aileron command from the FCS. |
4. |
dRudder |
The rudder command from the FCS. |
5. |
dThrottle |
The throttle command. This signal either originates in the FCS or comes directly from the joystick. |
6. |
ElapsedTime |
The elapsed simulation time based on the computers clock. This should be very close to real-time. |
7. - 16. |
ToMATLAB01 - ToMATLAB10 |
These are generic signals for user definition. |
Real-time check box - if this box is checked then the block will slow the simulation down to match the computer's high precision timer. If the simulation runs slower that real-time, then checking this block will have no effect.
Examples:
The AC Connection block is used in the example:
"
MATLABToolbox\Examples\SimulationExample\ExampleAC.mdl".