MathWorks - Mobile View
  • MathWorks 계정에 로그인합니다.MathWorks 계정에 로그인합니다.
  • Access your MathWorks Account
    • 내 계정
    • 나의 커뮤니티 프로필
    • 라이선스를 계정에 연결
    • 로그아웃
  • 제품
  • 솔루션
  • 아카데미아
  • 지원
  • 커뮤니티
  • 이벤트
  • MATLAB 다운로드
MathWorks
  • 제품
  • 솔루션
  • 아카데미아
  • 지원
  • 커뮤니티
  • 이벤트
  • MATLAB 다운로드
  • MathWorks 계정에 로그인합니다.MathWorks 계정에 로그인합니다.
  • Access your MathWorks Account
    • 내 계정
    • 나의 커뮤니티 프로필
    • 라이선스를 계정에 연결
    • 로그아웃

비디오 및 웨비나

  • MathWorks
  • 비디오
  • 비디오 홈
  • 검색
  • 비디오 홈
  • 검색
  • 영업 상담
  • 평가판 신청
  Register to watch video
  • Description
  • Full Transcript
  • Related Resources

How to Combine Modeling Styles with Schedulable Components in Simulink

From the series: Run-Time Software Modeling

Teresa Hubscher-Younger, MathWorks

With Schedulable Components, all types of modeling styles can be partitioned and scheduled, which means conversion to a different modeling style is not needed and different modeling styles can be combined. Rate-based modeling styles can be directly partitioned and scheduled with Export Functions using this feature, allowing you to interleave the triggering of different components at different times. This helps you combine different components into larger systems.

Schedulable components allow you to take two very different modeling styles, rate-based modeling and export function modeling, combine these, and schedule them in the same model, helping you save time by catching problems early when you combine different components.

This modeling style gives you two big benefits. This gives you full control over scheduling model components, rather than letting Simulink schedule the components. And there is no need to deal with data dependency issues between components, because there are only data transfers.

Let me show you an example motivating the need for schedulable components. In this model, we have two different modeling styles. At the top level, we have Simulated Pedal Input, going into a Throttle Sensors and Monitor model block. The sensors data is going to the Throttle Position Controller and Actuator model block. This system is then being simulated by a model of the Throttle Body acting as the plant. Inside the Throttle Position Controller and Actuator model block, there are two Export Function components – one for the Controller and another for the Actuator

Inside, the Throttle Sensors and Monitor model block, there are rate-based subsystems for the sensors and monitor. Three of them are running at 5 milliseconds – the Throttle Position Sensor Primary and Secondary, as well as the Monitor. One of them is running at 10 milliseconds – The Acceleration Pedal Position sensor.

What I want is to schedule the Controller to run before the sensors. I must rearchitect the model to interleave the scheduling of these different modeling styles. To do this, I can configure the Throttle Sensors and Monitor model block to schedule the model’s rate-based components via a periodic event port. Now inside the Throttle Sensors and Monitor model block, all the subsystems are triggered by two events, which come from outside the model block. They are labeled D1 and D2.

With both Export Functions and Schedulable Components, no inherent scheduler is assumed, allowing you to more flexibly integrate to a custom environment.

So, we can use the Schedule Editor to schedule both types of components at the top level. In this case, we are interleaving calls to both the export functions and schedulable components. The ControllerRun5ms and ActuatorRun5ms events control the function calls in the Throttle Position Controller and Actuator model block. The D1 and D2 control the Schedulable Component.

But we want to have the controller be executed first in the Execution Order, so in this case, we simply drag and drop it to the place in which we want it to run.

When you get different IP with different modeling styles from different places, this explicit scheduling and interleaving of compositions is very useful.

Related Products

  • Simulink
  • Embedded Coder

Feedback

Featured Product

Simulink

  • Request Trial
  • Get Pricing

Up Next:

Use Simulink Functions to model software services. A Function Caller block can model and generate code for the client’s call to services, especially I/O services, and a Simulink Function block provides those services.
3:07
How to Model Software Services with Simulink Functions
View full series (5 Videos)

Related Videos:

29:49
Modeling Physical Components, Part 1: Mathematical Models
29:49
Modeling Physical Components, Part 2: Data-Driven Concepts
19:09
Modeling HDL Components for FPGAs in Control Applications
36:42
Simulink: Tips and Tricks
41:49
How to Develop Interactive User Interfaces for Simulink...

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web site

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • 영업 상담
  • 평가판 신청

제품 소개

  • MATLAB
  • Simulink
  • 학생용 소프트웨어
  • 하드웨어 지원
  • File Exchange

다운로드 및 구매

  • 다운로드
  • 평가판 신청
  • 영업 상담
  • 가격 및 라이선스
  • MathWorks 스토어

사용 방법

  • 문서
  • 튜토리얼
  • 예제
  • 비디오 및 웨비나
  • 교육

지원

  • 설치 도움말
  • 사용자 커뮤니티
  • 컨설팅
  • 라이선스 센터
  • 지원 문의

회사 정보

  • 채용
  • 뉴스 룸
  • 사회적 미션
  • 영업 상담
  • 회사 정보

MathWorks

Accelerating the pace of engineering and science

MathWorks는 엔지니어와 과학자들을 위한 테크니컬 컴퓨팅 소프트웨어 분야의 선도적인 개발업체입니다.

활용 분야 …

  • Select a Web Site United States
  • 특허
  • 등록 상표
  • 정보 취급 방침
  • 불법 복제 방지
  • 매스웍스코리아 유한회사
  • 주소: 서울시 강남구 삼성동 테헤란로 521 파르나스타워 14층
  • 전화번호: 02-6006-5100
  • 대표자 : 이종민
  • 사업자 등록번호 : 120-86-60062

© 1994-2021 The MathWorks, Inc.

  • Naver
  • Facebook
  • Twitter
  • YouTube
  • LinkedIn
  • RSS

대화에 참여하기