Excel을 통해 Signal을 입력 할 시 데이터 입력 오류 발생

4 vues (au cours des 30 derniers jours)
태성
태성 le 5 Mar 2024
Modifié(e) : Harimurali le 27 Mar 2024
엑셀을 통해 Input Value 입력 시 증감을 통해 다른 데이터가 입력이 됨
ex) excel cell에 2를 입력 시 모델은 0,1,2를 차례대로 입력 받아 1을 입력 받게 됨 목표 입력값은 2임
1을 입력을 받아 1번 Sequence를 동작함
  5 commentaires
Angelo Yeo
Angelo Yeo le 5 Mar 2024
사용하시는 workflow를 묘사하는 간단한 모델을 만들어서 공유해주실 수 있으실까요? input을 받기 위해 사용하시는 정확한 방법을 알고 싶습니다.
태성
태성 le 5 Mar 2024
안녕하세요,
빠른 답변 감사드립니다.
현재 시간이 촉박하여, 추가적인 설명 남겨드립니다..
현재 모델은 샘플링 시간이 1ms이고 입력 신호 주기는 50ms 입니다.
0.05초 시점에서 2로 변경 시 0으로 유지 하다가 2로 변경이 되어야 하는데,
0~2의 선형적으로 증가하면서 2로 변경이 됩니다. (Ex : 0.02s : 1 입력)
저희가 원하는 방식은 스텝 방식으로 변경하는 시점에 2에 대한 값을 입력하는 것입니다.
감사합니다.

Connectez-vous pour commenter.

Réponse acceptée

Harimurali
Harimurali le 27 Mar 2024
Modifié(e) : Harimurali le 27 Mar 2024
Hi 태성,
제 모국어가 한국어가 아니기 때문에 이 질문에는 영어로 답변하겠습니다.
The "Sample time" parameter specifies the sample time that the "From Spreadsheet" block uses to read data from the spreadsheet. For each simulation time hit for which the spreadsheet contains no matching time stamp, Simulink software interpolates or extrapolates to obtain the needed data using the selected method.
The "Data interpolation within time range" setting in the block parameters dialog box is by default set to "Linear interpolation". Since the sample time is set to 0.001, the values between the time range 0 and 0.05 at 0.001 second intervals are linearly interpolated, due to which the values are linearly increasing from 0 to 2.
For the value to remain at 0 till the 0.05th second and immediately change to 2 after that, set the "Data interpolation within time range" setting to "Zero order hold".
Please refer to the following documentation for more information on the "From Spreadsheet" block and its parameters: https://www.mathworks.com/help/releases/R2023b/simulink/slref/fromspreadsheet.html

Plus de réponses (0)

Catégories

En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!