필터 지우기
필터 지우기

How to type saturation command in MatLab?

조회 수: 199 (최근 30일)
Yuki Wong
Yuki Wong 2012년 2월 25일
편집: Arkadiy Turevskiy 2024년 6월 19일
I got a plant and a controller which controlling the plant. Before the control signals go into the plant transfer function,it have to pass through saturation +-0.1. We can do this easily in Simulink by dragging and make used of the saturation function block. Instead of using the Simulink, do anyone know how to type the saturation command in Matlab command window?

채택된 답변

Walter Roberson
Walter Roberson 2012년 2월 25일
편집: Arkadiy Turevskiy 2024년 6월 19일
saturated_x = min(0.1, max(-0.1, x));
Edit by Arkadiy Turevskiy from MathWorks on 6/19/2024.
You could do it in MATLAB but I would recommend modeling nonlinear control systems, including control saturation effects in Simulink. Simulink was designed to make modeling and simulation of such systems easy. In MATLAB you would need to write code that would solve ordinary differential equations describing dynamics of your plant and your controller one time step at a time. You would have to write ODE solver yourself using a for loop, or you can use ode45 function in MATLAB and write your own implementation of odefun argument that would have to account for saturation.
  댓글 수: 4
Utkarsh Anand
Utkarsh Anand 2018년 5월 9일
You can convert a transfer function into a time signal using 'lsim' in matlab.
雨升 杨
雨升 杨 2022년 4월 8일
Thank you!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Model Identification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by