Real-Time Interface (RTI)

在 dSPACE 硬件上运行模型的实施软件

RTI 让您能将精力完全集中在实际设计过程,并执行快速的设计迭代。它扩展了 C 代码生成器 Simulink Coder™(旧版本称为 Real-Time Workshop ® )的功能,能够在实时硬件上无缝地自动实施 Simulink 和 Stateflow 模型。

应用领域

无论您要执行快速控制原型还是硬件在环仿真,都要通过实时接口 (RTI),实现dSPACE 硬件与 MathWorks ® 开发软件 MATLAB/Simulink/Stateflow的连接。

使用 RTI

要将模型连接到 dSPACE I/O 板,只需从 RTI 模块库中拖放 I/O 模块然后连接到 Simulink 模块即可。所有设置(如参数化)都能通过点击相应的模块来完成。Simulink Coder™(旧版 Real-Time Workshop ® )用于生成模型代码,而 RTI 则提供相应的模块,用于在 Simulink 模型中实施 dSPACE 系统 I/O 功能,从而为实时应用程序准备模型。实时模型会自动在实时硬件上编译、下载和启动,无需编写代码。RTI 会指导您如何配置。并检查配置中的一致性,因此可以在编译过程之前或编译过程中检测出模型的潜在错误。

全面的功能

RTI 可处理任何类型的连续时间系统、离散时间系统及多速率系统。根据 I/O 硬件的差异,同一 I/O 板卡的各通道可采用不同的采样率,即使在不同的子系统中也同样如此。RTI 支持异步事件,也可以让您设置任务优先级和任务溢出策略,以执行中断驱动型子系统。它还支持时间触发型任务和时间表,允许您以可变延时或预定义延时(相对于相关触发事件)实施任务和任务组。这使得模型中的任务处理变得十分灵活。此外,RTI还具有检查功能,以免通道出现重复或使用不当。

主要优点

RTI 让您能将精力完全集中在实际设计过程,并执行快速的设计迭代。它扩展了 C 代码生成器 Simulink Coder™(旧版本称为 Real-Time Workshop ® )的功能,能够在实时硬件上无缝地自动实施 Simulink 和 Stateflow 模型。实施时间显著减少。RTI引导您完成硬件配置,并提供自动的一致性检查以避免参数化错误。为了实现最大灵活性,每个 RTI 版本都支持多个不同版本的 MATLAB(详见 www.dspace.com/go/Compatibility)。使用新版本 RTI 时,旧版本 MATLAB 和 RTI 的模型都会自动升级到当前所用版本。

模型设计

在本例中,硬盘定位系统的闭合控制回路如框图所示。控制器和受控系统的模型是在MATLAB/Simulink开发环境中设计的。

图形化I/O配置

在 Simulink 中完成模型测试后,需要准备在实时硬件上实施。装置模型被I/O模块取代,形成连接实际受控系统的接口。要增加I/O模型,只需将一个模块从RTI I/O库拖动至模型中,并将该模块与控制器的I/O相连。

参数说明

双击I/O模块,在图形用户界面中输入数据,即可指定I/O参数。在本例中,输入信号是反馈值和参考信号。此时,参考信号来自外部信号发生器,并被ADC模块读入。控制器的输出信号为控制信号u_M,由硬件通过DAC模块输出。

在 dSPACE 硬件上实施

在 dSPACE 硬件上自动实施Simulink模型是快速设计迭代的关键。运用RTI,在该流程中您不会看到一行代码。点击“构建”开始实施,其中包括生成、编译和下载代码。您可以在“配置参数”对话框的“求解器”页面中选择一个集成算法和步长。构建程序也可以在脚本的帮助下自动进行。这对于大模型尤其有用。

与实现软件交互

当您的应用程序在实时硬件上运行时,您可以随意使用整个 dSPACE 实现软件。RTI 可以确保您在实施过程之后立即控制各个变量。
ControlDesk会提供一个仪表面板,您可以更改参数和监控信号,无需重新生成代码。ControlDesk还会显示您的应用程序所用变量的时间历程。

支持dSPACE硬件

无论您使用的是采用DS1104 R&D控制器板卡、MicroAutoBox II还是MicroLabBox的dSPACE系统:RTI方便建模和进行dSPACE系统的I/O配置。

Blockset

Description

Further Information

(See relevant product information)

Real-Time Interface for Multiprocessor Systems

  • For graphical setup of multicore structures
  • Real-Time Interface for Multiprocessor Systems (RTI-MP)

RTI Bypass Blockset

  • Part of the ECU Interface Base Package
  • For configuring bypass applications
  • ECU Interface Base Package

CAN Blocksets

  • For combining dSPACE systems with CAN communication networks
  • RTI CAN Blockset
  • RTI CAN MultiMessage Blockset

RTI LIN MultiMessage Blockset

  • For combining dSPACE systems with LIN communication networks
  • RTI LIN MultiMessage Blockset

dSPACE FlexRay Configuration Package

  • For configuring dSPACE systems in FlexRay communication networks
  • dSPACE FlexRay Configuration Package

FPGA Programming Blockset

  • Integrating FPGA models in dSPACE systems
  • FPGA Programming Blockset

Ethernet Blocksets

  • Connecting dSPACE hardware to other devices via Ethernet
  • Ethernet Blocksets

RTI Electric Motor Control Blockset

  • For combining dSPACE MicroLabBox with electric drive systems
  • RTI Electric Motor Control Blockset

RTI DS1552 I/O Extension Blockset

  • Part of the RTI package
  • For making the additional I/O channels of the DS1552 Multi-I/O Module available to model-based control applications running on MicroAutoBox II
  • MicroAutoBox II

RTI RapidPro Control Unit Blockset

  • Extensive I/O functionalities for the MicroAutoBox II used in combination with the RapidPro Control Unit, e.g., for engine, chassis, and drives control
  • RTI RapidPro Control Unit Blockset

RTI USB Flight Recorder Blockset

  • Part of the RTI package
  • For long-term data acquisition on MicroAutoBox II or MicroLabBox

RTI Watchdog Blockset

  • For implementing various safety mechanisms on
    MicroAutoBox II
  • MicroAutoBox II

RTI Synchronized Time Base Manager Blockset

  • For creating and accessing synchronized time base manager instances

Functionality Description
I/O configuration
  • Comprehensive block library for specifying the hardware setup
  • Configuration of dSPACE I/O simply by connecting the relevant blocks to the Simulink blocks
  • I/O parameter specification, such as voltage ranges, resolutions, digital I/O, serial interface parameters, and PWM frequencies
  • Automatic checks on parameter ranges and consistency
  • I/O access anywhere in your model and at different sample rates
  • Separate blocks for different functions of complex I/O modules
  • Data typing and data-typed I/O
  • Asynchronous execution of Simulink subsystems triggered by hardware or software interrupts
  • S-functions and user-written code
Generating real-time code
  • Generation of C code by Simulink Coder™ (formerly Real-Time Workshop ® )
  • C code optimization for real-time implementations
  • Support of Simulink Coder (formerly Real-Time Workshop) code optimizations
  • Generation of initialization functions and I/O function calls
Automatic task definition
  • Support of multirate systems and preemptive, priority-based multitasking
  • Single timer and multiple timer task mode
  • Asynchronous tasks
  • External hardware interrupts
  • Software interrupts
  • Configurable priority and overrun handling for each task
  • Turnaround time measurement for each task
  • Optional synchronization of periodic timer tasks to external events
  • Time-triggered tasks and timetables
  • Non-real-time simulation modes
Invoking the compiler
  • Automatic compiler call that compiles and links the model
Loading and starting the application
  • Program download to the real-time hardware
  • Simulation control
  • Interactive control, monitoring, and data acquisition with ControlDesk
  • Data acquisition with time stamps, for example, directly on MicroAutoBox II for long-term simulation

Documentation Contact Information

推动创新进程。我们始终在技术开发的最前沿。

欢迎订阅我们简讯,了解我们的专业技术以及产品。希望我们的成功案例能够对您有所帮助。快速了解仿真和验证的最新信息。欢迎订阅/管理dSPACE简讯和dSPACE航空速报。

Enable form call

At this point, an input form from Click Dimensions is integrated. This enables us to process your newsletter subscription. The form is currently hidden due to your privacy settings for our website.

External input form

By activating the input form, you consent to personal data being transmitted to Click Dimensions within the EU, in the USA, Canada or Australia. More on this in our privacy policy.