필터 지우기
필터 지우기

How to convert discrete signal to Continuous signal in Simulink?

조회 수: 28 (최근 30일)
Nikita Joshi
Nikita Joshi 2022년 3월 29일
댓글: Fangjun Jiang 2024년 1월 24일
Hello All,
I am working on one project in which I have to convert signals from continuous to discrete and discrete to continuous. For converting from Continuous to discrete, I am using Zero-order hold block with 0.002 sampling time that is perfectly converting the signals. But when i want to convert it back to continuous from discrete, that ZOH block is not helping me for the conversion.
I have tried to convert those discrete signal through Rate transition block also. but it is still remained in discrete signals only.
Can anyone help me for finding that suitable block to convert discrete signals to continuous signals?

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2024년 1월 23일
  댓글 수: 2
Paul
Paul 2024년 1월 23일
편집: Paul 2024년 1월 23일
IIUC, all signals in Simulink (when using a continuous solver) are continuous in the mathematical sense, i.e., every signal has a value at any instant in time. I think the answer to this question depends on what the OP is actually attempting to do (for simulation, I'm not sure about code generation for external targets).
In some cases, no additional effort is required. For example, a signal with discrete sample time > 0 can be fed directly into a block with continuous sample time, like an Integrator.
If there is a need to actually convert the sample time of signal from a discrete sample time to continuous but keep the same value (why would that be needed?), then a Rate Transition block can be used (with appropriate block parameters settings). The output will actually be FiM, but I think that's a distinction without a difference in this case because the signal can only change at the input block sample times anyway.
The output of the first order hold does have a continuous sample time, but the value of the signal is changing between samples, which might be unwanted.
Fangjun Jiang
Fangjun Jiang 2024년 1월 24일
I'd rather think that all signals in Simulink (or in digital computer) are discrete, rather than continuous like a signal in an analog circuit.
Anyway, not sure why I answered this question as it was dormant for almost two years. But I think it is the right answer in case someone is searching for the same topic. It is explained in the document of the First Order Hold block.
In the document for the Zero-Order Holder block, there is a tip regarding using the Rate Transition block.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Prepare Model Inputs and Outputs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by