Optimal offset calculation for cyclic CAN BUS message scheduling

Calculate optimal offset for cyclic CAN bus message scheduling
ダウンロード: 140
更新 2016/2/19

ライセンスの表示

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
%

引用

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. 取得済み .

MATLAB リリースの互換性
作成: R2014b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0