Optimal offset calculation for cyclic CAN BUS message scheduling

Calculate optimal offset for cyclic CAN bus message scheduling
142 Descargas
Actualizado 19 feb 2016

Ver licencia

The function calculates optimal (best balanced transmission queue load) transmission offset for a single CAN bus node given a vector of transmitted messages cycle times (in milliseconds) with a given time-quantum granularity (i.e. microcontroller CANBUS task periodic routine).
Please see test_canbus_msg_opt_offset.m for some examples.
The algorithm places next message at the maximum distance from the other allocated messages, within the longest contiguos sequence of time slots with lowest load.
No toolbox required.
% CANBUS_MSG_OPT_OFFSET Calculate optimal offset for cyclic CAN bus message scheduling
%
% [ Offset_ms, Load, MsgAllocation ] = canbus_msg_opt_offset( T_msg_ms, granularity_ms )
% calculates optimal (best balanced transmission queue load) transmission
% offset for a single CAN bus node given a vector of transmitted messages
% cycle times (in milliseconds) with a given time-quantum granularity
% (i.e. microcontroller CANBUS task periodic routine).
%
% INPUT
% T_msg_ms vector of message cyclic times [ms], orderered by
% increasing cycle time and decreasing priority
% granularity_ms resolution of cyclic message handler routine
%
% OUTPUT
% Offset_ms optimal time offset for message in milliseconds,
% same order as T_msg_ms
% Load size of queue at time-quantum
% MsgAllocation matrix visualizing message scheduling
% where MsgAllocation(row,col) is the message index
% as per T_msg_ms input vector transmitted at
% time-quantum "col" and at queue position "row"
%
% Based on paper:
%
% Scheduling messages with offsets on Controller
% Area Network - a major performance boost
% Mathieu Grenier1, Lionel Havet2, Nicolas Navet2
% August 9, 2008
%
% Available at: http://nicolas.navet.eu/publi/offsetsCAN_RTaW.pdf
%

Citar como

Guido Albertin (2024). Optimal offset calculation for cyclic CAN BUS message scheduling (https://www.mathworks.com/matlabcentral/fileexchange/55506-optimal-offset-calculation-for-cyclic-can-bus-message-scheduling), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2014b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Genetic Algorithm en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0